[PATCH libdrm 1/3] tests/util: Reindent using editorconfig settings

Thierry Reding thierry.reding at gmail.com
Mon Jan 30 10:32:43 UTC 2017


On Mon, Jan 30, 2017 at 11:29:21AM +0100, Thierry Reding wrote:
> From: Thierry Reding <treding at nvidia.com>
> 
> Apply editorconfig settings to the tests/util library code in order to
> facilitate making subsequent changes.
> 
> Signed-off-by: Thierry Reding <treding at nvidia.com>
> ---
>  tests/util/format.c  |  128 ++---
>  tests/util/format.h  |   36 +-
>  tests/util/kms.c     |  186 +++----
>  tests/util/pattern.c | 1446 +++++++++++++++++++++++++-------------------------
>  tests/util/pattern.h |   10 +-
>  5 files changed, 899 insertions(+), 907 deletions(-)

This is obviously a lot of churn, but for reference, here's the diff
ignoring all whitespace changes (--ignore-all-space):

--- >8 ---
commit f920fb0b72ddd12f18c42ddd96114213868331e3
Author: Thierry Reding <treding at nvidia.com>
Date:   Fri Jan 27 11:36:10 2017 +0100

    tests/util: Reindent using editorconfig settings
    
    Apply editorconfig settings to the tests/util library code in order to
    facilitate making subsequent changes.
    
    Signed-off-by: Thierry Reding <treding at nvidia.com>

diff --git a/tests/util/pattern.c b/tests/util/pattern.c
index 00b08a8cb8eb..5d653afbee24 100644
--- a/tests/util/pattern.c
+++ b/tests/util/pattern.c
@@ -472,8 +472,8 @@ static void fill_smpte(const struct util_format_info *info, void *planes[3],
     case DRM_FORMAT_VYUY:
     case DRM_FORMAT_YUYV:
     case DRM_FORMAT_YVYU:
-		return fill_smpte_yuv_packed(&info->yuv, planes[0], width,
-					     height, stride);
+        return fill_smpte_yuv_packed(&info->yuv, planes[0], width, height,
+                                     stride);
 
     case DRM_FORMAT_NV12:
     case DRM_FORMAT_NV21:
@@ -481,8 +481,8 @@ static void fill_smpte(const struct util_format_info *info, void *planes[3],
     case DRM_FORMAT_NV61:
         u = info->yuv.order & YUV_YCbCr ? planes[1] : planes[1] + 1;
         v = info->yuv.order & YUV_YCrCb ? planes[1] : planes[1] + 1;
-		return fill_smpte_yuv_planar(&info->yuv, planes[0], u, v,
-					     width, height, stride);
+        return fill_smpte_yuv_planar(&info->yuv, planes[0], u, v, width,
+                                     height, stride);
 
     case DRM_FORMAT_YUV420:
         return fill_smpte_yuv_planar(&info->yuv, planes[0], planes[1],
@@ -510,13 +510,12 @@ static void fill_smpte(const struct util_format_info *info, void *planes[3],
     case DRM_FORMAT_RGBX5551:
     case DRM_FORMAT_BGRA5551:
     case DRM_FORMAT_BGRX5551:
-		return fill_smpte_rgb16(&info->rgb, planes[0],
-					width, height, stride);
+        return fill_smpte_rgb16(&info->rgb, planes[0], width, height, stride);
 
     case DRM_FORMAT_BGR888:
     case DRM_FORMAT_RGB888:
-		return fill_smpte_rgb24(&info->rgb, planes[0],
-					width, height, stride);
+        return fill_smpte_rgb24(&info->rgb, planes[0], width, height, stride);
+
     case DRM_FORMAT_ARGB8888:
     case DRM_FORMAT_XRGB8888:
     case DRM_FORMAT_ABGR8888:
@@ -533,8 +532,7 @@ static void fill_smpte(const struct util_format_info *info, void *planes[3],
     case DRM_FORMAT_RGBX1010102:
     case DRM_FORMAT_BGRA1010102:
     case DRM_FORMAT_BGRX1010102:
-		return fill_smpte_rgb32(&info->rgb, planes[0],
-					width, height, stride);
+        return fill_smpte_rgb32(&info->rgb, planes[0], width, height, stride);
     }
 }
 
@@ -568,10 +566,8 @@ static void make_pwetty(void *data, unsigned int width, unsigned int height,
         return;
     }
 
-	surface = cairo_image_surface_create_for_data(data,
-						      cairo_format,
-						      width, height,
-						      stride);
+    surface = cairo_image_surface_create_for_data(data, cairo_format, width,
+                                                  height, stride);
     cr = cairo_create(surface);
     cairo_surface_destroy(surface);
 
@@ -758,8 +754,7 @@ static void fill_tiles(const struct util_format_info *info, void *planes[3],
     case DRM_FORMAT_VYUY:
     case DRM_FORMAT_YUYV:
     case DRM_FORMAT_YVYU:
-		return fill_tiles_yuv_packed(info, planes[0],
-					     width, height, stride);
+        return fill_tiles_yuv_packed(info, planes[0], width, height, stride);
 
     case DRM_FORMAT_NV12:
     case DRM_FORMAT_NV21:
@@ -767,16 +762,16 @@ static void fill_tiles(const struct util_format_info *info, void *planes[3],
     case DRM_FORMAT_NV61:
         u = info->yuv.order & YUV_YCbCr ? planes[1] : planes[1] + 1;
         v = info->yuv.order & YUV_YCrCb ? planes[1] : planes[1] + 1;
-		return fill_tiles_yuv_planar(info, planes[0], u, v,
-					     width, height, stride);
+        return fill_tiles_yuv_planar(info, planes[0], u, v, width, height,
+                                     stride);
 
     case DRM_FORMAT_YUV420:
-		return fill_tiles_yuv_planar(info, planes[0], planes[1],
-					     planes[2], width, height, stride);
+        return fill_tiles_yuv_planar(info, planes[0], planes[1], planes[2],
+                                     width, height, stride);
 
     case DRM_FORMAT_YVU420:
-		return fill_tiles_yuv_planar(info, planes[0], planes[2],
-					     planes[1], width, height, stride);
+        return fill_tiles_yuv_planar(info, planes[0], planes[2], planes[1],
+                                     width, height, stride);
 
     case DRM_FORMAT_ARGB4444:
     case DRM_FORMAT_XRGB4444:
@@ -796,13 +791,11 @@ static void fill_tiles(const struct util_format_info *info, void *planes[3],
     case DRM_FORMAT_RGBX5551:
     case DRM_FORMAT_BGRA5551:
     case DRM_FORMAT_BGRX5551:
-		return fill_tiles_rgb16(info, planes[0],
-					width, height, stride);
+        return fill_tiles_rgb16(info, planes[0], width, height, stride);
 
     case DRM_FORMAT_BGR888:
     case DRM_FORMAT_RGB888:
-		return fill_tiles_rgb24(info, planes[0],
-					width, height, stride);
+        return fill_tiles_rgb24(info, planes[0], width, height, stride);
     case DRM_FORMAT_ARGB8888:
     case DRM_FORMAT_XRGB8888:
     case DRM_FORMAT_ABGR8888:
@@ -819,8 +812,7 @@ static void fill_tiles(const struct util_format_info *info, void *planes[3],
     case DRM_FORMAT_RGBX1010102:
     case DRM_FORMAT_BGRA1010102:
     case DRM_FORMAT_BGRX1010102:
-		return fill_tiles_rgb32(info, planes[0],
-					width, height, stride);
+        return fill_tiles_rgb32(info, planes[0], width, height, stride);
     }
 }
 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: not available
URL: <https://lists.freedesktop.org/archives/dri-devel/attachments/20170130/f537ddd2/attachment.sig>


More information about the dri-devel mailing list