dri-devel.lists.freedesktop.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 00/29] treewide: Convert comma separated statements
@ 2020-08-25  4:55 Joe Perches
  2020-08-25  4:56 ` [PATCH 08/29] dma-buf: Avoid " Joe Perches
                   ` (4 more replies)
  0 siblings, 5 replies; 22+ messages in thread
From: Joe Perches @ 2020-08-25  4:55 UTC (permalink / raw)
  To: Jiri Kosina, oprofile-list, linux-ide, drbd-dev, linux-media,
	dri-devel, linaro-mm-sig, intel-gfx, linux-hwmon, linux-input,
	linux-bcache, netdev, linuxppc-dev, linux-arm-kernel,
	linux-fsdevel, reiserfs-devel, linux-nfs
  Cc: devel, linux-s390, linux-fbdev, linux-ia64, linux-scsi,
	linux-doc, linux-pm, linux-kernel, linux-block, linux-mtd,
	linux-kselftest, linux-alpha, sparclinux

There are many comma separated statements in the kernel.
See:https://lore.kernel.org/lkml/alpine.DEB.2.22.394.2008201856110.2524@hadrien/

Convert the comma separated statements that are in if/do/while blocks
to use braces and semicolons.

Many comma separated statements still exist but those are changes for
another day.

Joe Perches (29):
  coding-style.rst: Avoid comma statements
  alpha: Avoid comma separated statements
  ia64: Avoid comma separated statements
  sparc: Avoid comma separated statements
  ata: Avoid comma separated statements
  drbd: Avoid comma separated statements
  lp: Avoid comma separated statements
  dma-buf: Avoid comma separated statements
  drm/gma500: Avoid comma separated statements
  drm/i915: Avoid comma separated statements
  hwmon: (scmi-hwmon): Avoid comma separated statements
  Input: MT - Avoid comma separated statements
  bcache: Avoid comma separated statements
  media: Avoid comma separated statements
  mtd: Avoid comma separated statements
  8390: Avoid comma separated statements
  fs_enet: Avoid comma separated statements
  wan: sbni: Avoid comma separated statements
  s390/tty3270: Avoid comma separated statements
  scai/arm: Avoid comma separated statements
  media: atomisp: Avoid comma separated statements
  video: fbdev: Avoid comma separated statements
  fuse: Avoid comma separated statements
  reiserfs: Avoid comma separated statements
  lib/zlib: Avoid comma separated statements
  lib: zstd: Avoid comma separated statements
  ipv6: fib6: Avoid comma separated statements
  sunrpc: Avoid comma separated statements
  tools: Avoid comma separated statements

 Documentation/process/coding-style.rst        |  17 +
 arch/alpha/kernel/pci_iommu.c                 |   8 +-
 arch/alpha/oprofile/op_model_ev4.c            |  22 +-
 arch/alpha/oprofile/op_model_ev5.c            |   8 +-
 arch/ia64/kernel/smpboot.c                    |   7 +-
 arch/sparc/kernel/smp_64.c                    |   7 +-
 drivers/ata/pata_icside.c                     |  21 +-
 drivers/block/drbd/drbd_receiver.c            |   6 +-
 drivers/char/lp.c                             |   6 +-
 drivers/dma-buf/st-dma-fence.c                |   7 +-
 drivers/gpu/drm/gma500/mdfld_intel_display.c  |  44 ++-
 drivers/gpu/drm/i915/gt/gen8_ppgtt.c          |   8 +-
 drivers/gpu/drm/i915/gt/intel_gt_requests.c   |   6 +-
 .../gpu/drm/i915/gt/selftest_workarounds.c    |   6 +-
 drivers/gpu/drm/i915/intel_runtime_pm.c       |   6 +-
 drivers/hwmon/scmi-hwmon.c                    |   6 +-
 drivers/input/input-mt.c                      |  11 +-
 drivers/md/bcache/bset.c                      |  12 +-
 drivers/md/bcache/sysfs.c                     |   6 +-
 drivers/media/i2c/msp3400-kthreads.c          |  12 +-
 drivers/media/pci/bt8xx/bttv-cards.c          |   6 +-
 drivers/media/pci/saa7134/saa7134-video.c     |   7 +-
 drivers/mtd/devices/lart.c                    |  10 +-
 drivers/net/ethernet/8390/axnet_cs.c          |  19 +-
 drivers/net/ethernet/8390/lib8390.c           |  14 +-
 drivers/net/ethernet/8390/pcnet_cs.c          |   6 +-
 .../ethernet/freescale/fs_enet/fs_enet-main.c |  11 +-
 drivers/net/wan/sbni.c                        | 101 +++---
 drivers/s390/char/tty3270.c                   |   6 +-
 drivers/scsi/arm/cumana_2.c                   |  19 +-
 drivers/scsi/arm/eesox.c                      |   9 +-
 drivers/scsi/arm/powertec.c                   |   9 +-
 .../media/atomisp/pci/atomisp_subdev.c        |   6 +-
 drivers/video/fbdev/tgafb.c                   |  12 +-
 fs/fuse/dir.c                                 |  24 +-
 fs/reiserfs/fix_node.c                        |  36 ++-
 lib/zlib_deflate/deftree.c                    |  49 ++-
 lib/zstd/compress.c                           | 120 ++++---
 lib/zstd/fse_compress.c                       |  24 +-
 lib/zstd/huf_compress.c                       |   6 +-
 net/ipv6/ip6_fib.c                            |  12 +-
 net/sunrpc/sysctl.c                           |   6 +-
 tools/lib/subcmd/help.c                       |  10 +-
 tools/power/cpupower/utils/cpufreq-set.c      |  14 +-
 tools/testing/selftests/vm/gup_benchmark.c    |  18 +-
 tools/testing/selftests/vm/userfaultfd.c      | 296 +++++++++++-------
 46 files changed, 694 insertions(+), 382 deletions(-)

-- 
2.26.0

_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

^ permalink raw reply	[flat|nested] 22+ messages in thread

* [PATCH 08/29] dma-buf: Avoid comma separated statements
  2020-08-25  4:55 [PATCH 00/29] treewide: Convert comma separated statements Joe Perches
@ 2020-08-25  4:56 ` Joe Perches
  2020-08-26 15:08   ` Christian König
                     ` (2 more replies)
  2020-08-25  4:56 ` [PATCH 09/29] drm/gma500: " Joe Perches
                   ` (3 subsequent siblings)
  4 siblings, 3 replies; 22+ messages in thread
From: Joe Perches @ 2020-08-25  4:56 UTC (permalink / raw)
  To: Jiri Kosina, Sumit Semwal, Christian König
  Cc: linaro-mm-sig, linux-kernel, dri-devel, linux-media

Use semicolons and braces.

Signed-off-by: Joe Perches <joe@perches.com>
---
 drivers/dma-buf/st-dma-fence.c | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)

diff --git a/drivers/dma-buf/st-dma-fence.c b/drivers/dma-buf/st-dma-fence.c
index e593064341c8..c8a12d7ad71a 100644
--- a/drivers/dma-buf/st-dma-fence.c
+++ b/drivers/dma-buf/st-dma-fence.c
@@ -471,8 +471,11 @@ static int thread_signal_callback(void *arg)
 			dma_fence_signal(f1);
 
 		smp_store_mb(cb.seen, false);
-		if (!f2 || dma_fence_add_callback(f2, &cb.cb, simple_callback))
-			miss++, cb.seen = true;
+		if (!f2 ||
+		    dma_fence_add_callback(f2, &cb.cb, simple_callback)) {
+			miss++;
+			cb.seen = true;
+		}
 
 		if (!t->before)
 			dma_fence_signal(f1);
-- 
2.26.0

_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

^ permalink raw reply related	[flat|nested] 22+ messages in thread

* [PATCH 09/29] drm/gma500: Avoid comma separated statements
  2020-08-25  4:55 [PATCH 00/29] treewide: Convert comma separated statements Joe Perches
  2020-08-25  4:56 ` [PATCH 08/29] dma-buf: Avoid " Joe Perches
@ 2020-08-25  4:56 ` Joe Perches
  2021-01-30 18:47   ` Joe Perches
  2020-08-25  4:56 ` [PATCH 10/29] drm/i915: " Joe Perches
                   ` (2 subsequent siblings)
  4 siblings, 1 reply; 22+ messages in thread
From: Joe Perches @ 2020-08-25  4:56 UTC (permalink / raw)
  To: Jiri Kosina, Patrik Jakobsson; +Cc: David Airlie, dri-devel, linux-kernel

Use semicolons and braces.

Signed-off-by: Joe Perches <joe@perches.com>
---
 drivers/gpu/drm/gma500/mdfld_intel_display.c | 44 +++++++++++++-------
 1 file changed, 28 insertions(+), 16 deletions(-)

diff --git a/drivers/gpu/drm/gma500/mdfld_intel_display.c b/drivers/gpu/drm/gma500/mdfld_intel_display.c
index aae2d358364c..bfa330df9443 100644
--- a/drivers/gpu/drm/gma500/mdfld_intel_display.c
+++ b/drivers/gpu/drm/gma500/mdfld_intel_display.c
@@ -824,33 +824,45 @@ static int mdfld_crtc_mode_set(struct drm_crtc *crtc,
 		if ((ksel == KSEL_CRYSTAL_19) || (ksel == KSEL_BYPASS_19)) {
 			refclk = 19200;
 
-			if (is_mipi || is_mipi2)
-				clk_n = 1, clk_p2 = 8;
-			else if (is_hdmi)
-				clk_n = 1, clk_p2 = 10;
+			if (is_mipi || is_mipi2) {
+				clk_n = 1;
+				clk_p2 = 8;
+			} else if (is_hdmi) {
+				clk_n = 1;
+				clk_p2 = 10;
+			}
 		} else if (ksel == KSEL_BYPASS_25) {
 			refclk = 25000;
 
-			if (is_mipi || is_mipi2)
-				clk_n = 1, clk_p2 = 8;
-			else if (is_hdmi)
-				clk_n = 1, clk_p2 = 10;
+			if (is_mipi || is_mipi2) {
+				clk_n = 1;
+				clk_p2 = 8;
+			} else if (is_hdmi) {
+				clk_n = 1;
+				clk_p2 = 10;
+			}
 		} else if ((ksel == KSEL_BYPASS_83_100) &&
 					dev_priv->core_freq == 166) {
 			refclk = 83000;
 
-			if (is_mipi || is_mipi2)
-				clk_n = 4, clk_p2 = 8;
-			else if (is_hdmi)
-				clk_n = 4, clk_p2 = 10;
+			if (is_mipi || is_mipi2) {
+				clk_n = 4;
+				clk_p2 = 8;
+			} else if (is_hdmi) {
+				clk_n = 4;
+				clk_p2 = 10;
+			}
 		} else if ((ksel == KSEL_BYPASS_83_100) &&
 					(dev_priv->core_freq == 100 ||
 					dev_priv->core_freq == 200)) {
 			refclk = 100000;
-			if (is_mipi || is_mipi2)
-				clk_n = 4, clk_p2 = 8;
-			else if (is_hdmi)
-				clk_n = 4, clk_p2 = 10;
+			if (is_mipi || is_mipi2) {
+				clk_n = 4;
+				clk_p2 = 8;
+			} else if (is_hdmi) {
+				clk_n = 4;
+				clk_p2 = 10;
+			}
 		}
 
 		if (is_mipi)
-- 
2.26.0

_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

^ permalink raw reply related	[flat|nested] 22+ messages in thread

* [PATCH 10/29] drm/i915: Avoid comma separated statements
  2020-08-25  4:55 [PATCH 00/29] treewide: Convert comma separated statements Joe Perches
  2020-08-25  4:56 ` [PATCH 08/29] dma-buf: Avoid " Joe Perches
  2020-08-25  4:56 ` [PATCH 09/29] drm/gma500: " Joe Perches
@ 2020-08-25  4:56 ` Joe Perches
  2021-01-30 18:47   ` Joe Perches
  2020-08-25  4:56 ` [PATCH 22/29] video: fbdev: " Joe Perches
  2020-09-09  2:09 ` [PATCH 00/29] treewide: Convert " Martin K. Petersen
  4 siblings, 1 reply; 22+ messages in thread
From: Joe Perches @ 2020-08-25  4:56 UTC (permalink / raw)
  To: Jiri Kosina, Jani Nikula, Joonas Lahtinen, Rodrigo Vivi
  Cc: David Airlie, intel-gfx, dri-devel, linux-kernel

Use semicolons and braces.

Signed-off-by: Joe Perches <joe@perches.com>
---
 drivers/gpu/drm/i915/gt/gen8_ppgtt.c           | 8 +++++---
 drivers/gpu/drm/i915/gt/intel_gt_requests.c    | 6 ++++--
 drivers/gpu/drm/i915/gt/selftest_workarounds.c | 6 ++++--
 drivers/gpu/drm/i915/intel_runtime_pm.c        | 6 ++++--
 4 files changed, 17 insertions(+), 9 deletions(-)

diff --git a/drivers/gpu/drm/i915/gt/gen8_ppgtt.c b/drivers/gpu/drm/i915/gt/gen8_ppgtt.c
index 699125928272..114c13285ff1 100644
--- a/drivers/gpu/drm/i915/gt/gen8_ppgtt.c
+++ b/drivers/gpu/drm/i915/gt/gen8_ppgtt.c
@@ -323,10 +323,12 @@ static int __gen8_ppgtt_alloc(struct i915_address_space * const vm,
 			}
 
 			spin_lock(&pd->lock);
-			if (likely(!pd->entry[idx]))
+			if (likely(!pd->entry[idx])) {
 				set_pd_entry(pd, idx, pt);
-			else
-				alloc = pt, pt = pd->entry[idx];
+			} else {
+				alloc = pt;
+				pt = pd->entry[idx];
+			}
 		}
 
 		if (lvl) {
diff --git a/drivers/gpu/drm/i915/gt/intel_gt_requests.c b/drivers/gpu/drm/i915/gt/intel_gt_requests.c
index 66fcbf9d0fdd..54408d0b5e6e 100644
--- a/drivers/gpu/drm/i915/gt/intel_gt_requests.c
+++ b/drivers/gpu/drm/i915/gt/intel_gt_requests.c
@@ -139,8 +139,10 @@ long intel_gt_retire_requests_timeout(struct intel_gt *gt, long timeout)
 	LIST_HEAD(free);
 
 	interruptible = true;
-	if (unlikely(timeout < 0))
-		timeout = -timeout, interruptible = false;
+	if (unlikely(timeout < 0)) {
+		timeout = -timeout;
+		interruptible = false;
+	}
 
 	flush_submission(gt, timeout); /* kick the ksoftirqd tasklets */
 	spin_lock(&timelines->lock);
diff --git a/drivers/gpu/drm/i915/gt/selftest_workarounds.c b/drivers/gpu/drm/i915/gt/selftest_workarounds.c
index febc9e6692ba..3e4cbeed20bd 100644
--- a/drivers/gpu/drm/i915/gt/selftest_workarounds.c
+++ b/drivers/gpu/drm/i915/gt/selftest_workarounds.c
@@ -521,8 +521,10 @@ static int check_dirty_whitelist(struct intel_context *ce)
 
 		srm = MI_STORE_REGISTER_MEM;
 		lrm = MI_LOAD_REGISTER_MEM;
-		if (INTEL_GEN(engine->i915) >= 8)
-			lrm++, srm++;
+		if (INTEL_GEN(engine->i915) >= 8) {
+			lrm++;
+			srm++;
+		}
 
 		pr_debug("%s: Writing garbage to %x\n",
 			 engine->name, reg);
diff --git a/drivers/gpu/drm/i915/intel_runtime_pm.c b/drivers/gpu/drm/i915/intel_runtime_pm.c
index 153ca9e65382..f498f1c80755 100644
--- a/drivers/gpu/drm/i915/intel_runtime_pm.c
+++ b/drivers/gpu/drm/i915/intel_runtime_pm.c
@@ -201,8 +201,10 @@ __print_intel_runtime_pm_wakeref(struct drm_printer *p,
 		unsigned long rep;
 
 		rep = 1;
-		while (i + 1 < dbg->count && dbg->owners[i + 1] == stack)
-			rep++, i++;
+		while (i + 1 < dbg->count && dbg->owners[i + 1] == stack) {
+			rep++;
+			i++;
+		}
 		__print_depot_stack(stack, buf, PAGE_SIZE, 2);
 		drm_printf(p, "Wakeref x%lu taken at:\n%s", rep, buf);
 	}
-- 
2.26.0

_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

^ permalink raw reply related	[flat|nested] 22+ messages in thread

* [PATCH 22/29] video: fbdev: Avoid comma separated statements
  2020-08-25  4:55 [PATCH 00/29] treewide: Convert comma separated statements Joe Perches
                   ` (2 preceding siblings ...)
  2020-08-25  4:56 ` [PATCH 10/29] drm/i915: " Joe Perches
@ 2020-08-25  4:56 ` Joe Perches
  2020-09-08 11:37   ` Bartlomiej Zolnierkiewicz
  2020-09-09  2:09 ` [PATCH 00/29] treewide: Convert " Martin K. Petersen
  4 siblings, 1 reply; 22+ messages in thread
From: Joe Perches @ 2020-08-25  4:56 UTC (permalink / raw)
  To: Jiri Kosina, linux-kernel
  Cc: linux-fbdev, dri-devel, Bartlomiej Zolnierkiewicz

Use semicolons and braces.

Signed-off-by: Joe Perches <joe@perches.com>
---
 drivers/video/fbdev/tgafb.c | 12 ++++++++----
 1 file changed, 8 insertions(+), 4 deletions(-)

diff --git a/drivers/video/fbdev/tgafb.c b/drivers/video/fbdev/tgafb.c
index e9869135d833..666fbe2f671c 100644
--- a/drivers/video/fbdev/tgafb.c
+++ b/drivers/video/fbdev/tgafb.c
@@ -989,8 +989,10 @@ tgafb_fillrect(struct fb_info *info, const struct fb_fillrect *rect)
 	/* We can fill 2k pixels per operation.  Notice blocks that fit
 	   the width of the screen so that we can take advantage of this
 	   and fill more than one line per write.  */
-	if (width == line_length)
-		width *= height, height = 1;
+	if (width == line_length) {
+		width *= height;
+		height = 1;
+	}
 
 	/* The write into the frame buffer must be aligned to 4 bytes,
 	   but we are allowed to encode the offset within the word in
@@ -1171,8 +1173,10 @@ copyarea_8bpp(struct fb_info *info, u32 dx, u32 dy, u32 sx, u32 sy,
 	   More than anything else, these control how we do copies.  */
 	depos = dy * line_length + dx;
 	sepos = sy * line_length + sx;
-	if (backward)
-		depos += width, sepos += width;
+	if (backward) {
+		depos += width;
+		sepos += width;
+	}
 
 	/* Next copy full words at a time.  */
 	n32 = width / 32;
-- 
2.26.0

_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

^ permalink raw reply related	[flat|nested] 22+ messages in thread

* Re: [PATCH 08/29] dma-buf: Avoid comma separated statements
  2020-08-25  4:56 ` [PATCH 08/29] dma-buf: Avoid " Joe Perches
@ 2020-08-26 15:08   ` Christian König
  2020-09-03 12:21     ` Sumit Semwal
  2020-09-04 11:42   ` Kieran Bingham
  2021-01-30 18:47   ` Joe Perches
  2 siblings, 1 reply; 22+ messages in thread
From: Christian König @ 2020-08-26 15:08 UTC (permalink / raw)
  To: Joe Perches, Jiri Kosina, Sumit Semwal
  Cc: linaro-mm-sig, linux-kernel, dri-devel, linux-media

Am 25.08.20 um 06:56 schrieb Joe Perches:
> Use semicolons and braces.
>
> Signed-off-by: Joe Perches <joe@perches.com>

Acked-by: Christian König <christian.koenig@amd.com>

> ---
>   drivers/dma-buf/st-dma-fence.c | 7 +++++--
>   1 file changed, 5 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/dma-buf/st-dma-fence.c b/drivers/dma-buf/st-dma-fence.c
> index e593064341c8..c8a12d7ad71a 100644
> --- a/drivers/dma-buf/st-dma-fence.c
> +++ b/drivers/dma-buf/st-dma-fence.c
> @@ -471,8 +471,11 @@ static int thread_signal_callback(void *arg)
>   			dma_fence_signal(f1);
>   
>   		smp_store_mb(cb.seen, false);
> -		if (!f2 || dma_fence_add_callback(f2, &cb.cb, simple_callback))
> -			miss++, cb.seen = true;
> +		if (!f2 ||
> +		    dma_fence_add_callback(f2, &cb.cb, simple_callback)) {
> +			miss++;
> +			cb.seen = true;
> +		}
>   
>   		if (!t->before)
>   			dma_fence_signal(f1);

_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

^ permalink raw reply	[flat|nested] 22+ messages in thread

* Re: [PATCH 08/29] dma-buf: Avoid comma separated statements
  2020-08-26 15:08   ` Christian König
@ 2020-09-03 12:21     ` Sumit Semwal
  0 siblings, 0 replies; 22+ messages in thread
From: Sumit Semwal @ 2020-09-03 12:21 UTC (permalink / raw)
  To: Christian König
  Cc: Jiri Kosina, LKML, DRI mailing list, Linaro MM SIG, Joe Perches,
	open list:DMA BUFFER SHARING FRAMEWORK

Hello Joe,

On Wed, 26 Aug 2020 at 20:38, Christian König <christian.koenig@amd.com> wrote:
>
> Am 25.08.20 um 06:56 schrieb Joe Perches:
> > Use semicolons and braces.
> >
> > Signed-off-by: Joe Perches <joe@perches.com>
>
> Acked-by: Christian König <christian.koenig@amd.com>
FWIW,
Acked-by: Sumit Semwal <sumit.semwal@linaro.org>

>
> > ---
> >   drivers/dma-buf/st-dma-fence.c | 7 +++++--
> >   1 file changed, 5 insertions(+), 2 deletions(-)
> >
> > diff --git a/drivers/dma-buf/st-dma-fence.c b/drivers/dma-buf/st-dma-fence.c
> > index e593064341c8..c8a12d7ad71a 100644
> > --- a/drivers/dma-buf/st-dma-fence.c
> > +++ b/drivers/dma-buf/st-dma-fence.c
> > @@ -471,8 +471,11 @@ static int thread_signal_callback(void *arg)
> >                       dma_fence_signal(f1);
> >
> >               smp_store_mb(cb.seen, false);
> > -             if (!f2 || dma_fence_add_callback(f2, &cb.cb, simple_callback))
> > -                     miss++, cb.seen = true;
> > +             if (!f2 ||
> > +                 dma_fence_add_callback(f2, &cb.cb, simple_callback)) {
> > +                     miss++;
> > +                     cb.seen = true;
> > +             }
> >
> >               if (!t->before)
> >                       dma_fence_signal(f1);
>
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

^ permalink raw reply	[flat|nested] 22+ messages in thread

* Re: [PATCH 08/29] dma-buf: Avoid comma separated statements
  2020-08-25  4:56 ` [PATCH 08/29] dma-buf: Avoid " Joe Perches
  2020-08-26 15:08   ` Christian König
@ 2020-09-04 11:42   ` Kieran Bingham
  2020-09-04 21:33     ` Joe Perches
  2021-01-30 18:47   ` Joe Perches
  2 siblings, 1 reply; 22+ messages in thread
From: Kieran Bingham @ 2020-09-04 11:42 UTC (permalink / raw)
  To: Joe Perches, Jiri Kosina, Sumit Semwal, Christian König
  Cc: linaro-mm-sig, linux-kernel, dri-devel, linux-media

Hi Joe,

Nice, I only see three of these on the linux-media list, so I'll only
look at those, but I'm pleased to see this is treewide ;-)

Definitely prefer this.

On 25/08/2020 05:56, Joe Perches wrote:
> Use semicolons and braces.
> 
> Signed-off-by: Joe Perches <joe@perches.com>

Reviewed-by: Kieran Bingham <kieran.bingham+renesas@ideasonboard.com>

> ---
>  drivers/dma-buf/st-dma-fence.c | 7 +++++--
>  1 file changed, 5 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/dma-buf/st-dma-fence.c b/drivers/dma-buf/st-dma-fence.c
> index e593064341c8..c8a12d7ad71a 100644
> --- a/drivers/dma-buf/st-dma-fence.c
> +++ b/drivers/dma-buf/st-dma-fence.c
> @@ -471,8 +471,11 @@ static int thread_signal_callback(void *arg)
>  			dma_fence_signal(f1);
>  
>  		smp_store_mb(cb.seen, false);
> -		if (!f2 || dma_fence_add_callback(f2, &cb.cb, simple_callback))
> -			miss++, cb.seen = true;
> +		if (!f2 ||
> +		    dma_fence_add_callback(f2, &cb.cb, simple_callback)) {
> +			miss++;
> +			cb.seen = true;
> +		}
>  
>  		if (!t->before)
>  			dma_fence_signal(f1);
> 

_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

^ permalink raw reply	[flat|nested] 22+ messages in thread

* Re: [PATCH 08/29] dma-buf: Avoid comma separated statements
  2020-09-04 11:42   ` Kieran Bingham
@ 2020-09-04 21:33     ` Joe Perches
  0 siblings, 0 replies; 22+ messages in thread
From: Joe Perches @ 2020-09-04 21:33 UTC (permalink / raw)
  To: kieran.bingham+renesas, Jiri Kosina, Sumit Semwal, Christian König
  Cc: linaro-mm-sig, linux-kernel, dri-devel, linux-media

On Fri, 2020-09-04 at 12:42 +0100, Kieran Bingham wrote:
> I'm pleased to see this is treewide ;-)
> Definitely prefer this.

These are only the comma uses in if/do/while blocks that
would also need braces as separate statements.

There a multiple dozens more just with single statements
terminated by commas and not semicolons.

See:  https://lore.kernel.org/patchwork/patch/1291033/


_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

^ permalink raw reply	[flat|nested] 22+ messages in thread

* Re: [PATCH 22/29] video: fbdev: Avoid comma separated statements
  2020-08-25  4:56 ` [PATCH 22/29] video: fbdev: " Joe Perches
@ 2020-09-08 11:37   ` Bartlomiej Zolnierkiewicz
  0 siblings, 0 replies; 22+ messages in thread
From: Bartlomiej Zolnierkiewicz @ 2020-09-08 11:37 UTC (permalink / raw)
  To: Joe Perches; +Cc: linux-fbdev, Jiri Kosina, linux-kernel, dri-devel


On 8/25/20 6:56 AM, Joe Perches wrote:
> Use semicolons and braces.
> 
> Signed-off-by: Joe Perches <joe@perches.com>

Applied to drm-misc-next tree, thanks.

Best regards,
--
Bartlomiej Zolnierkiewicz
Samsung R&D Institute Poland
Samsung Electronics

> ---
>  drivers/video/fbdev/tgafb.c | 12 ++++++++----
>  1 file changed, 8 insertions(+), 4 deletions(-)
> 
> diff --git a/drivers/video/fbdev/tgafb.c b/drivers/video/fbdev/tgafb.c
> index e9869135d833..666fbe2f671c 100644
> --- a/drivers/video/fbdev/tgafb.c
> +++ b/drivers/video/fbdev/tgafb.c
> @@ -989,8 +989,10 @@ tgafb_fillrect(struct fb_info *info, const struct fb_fillrect *rect)
>  	/* We can fill 2k pixels per operation.  Notice blocks that fit
>  	   the width of the screen so that we can take advantage of this
>  	   and fill more than one line per write.  */
> -	if (width == line_length)
> -		width *= height, height = 1;
> +	if (width == line_length) {
> +		width *= height;
> +		height = 1;
> +	}
>  
>  	/* The write into the frame buffer must be aligned to 4 bytes,
>  	   but we are allowed to encode the offset within the word in
> @@ -1171,8 +1173,10 @@ copyarea_8bpp(struct fb_info *info, u32 dx, u32 dy, u32 sx, u32 sy,
>  	   More than anything else, these control how we do copies.  */
>  	depos = dy * line_length + dx;
>  	sepos = sy * line_length + sx;
> -	if (backward)
> -		depos += width, sepos += width;
> +	if (backward) {
> +		depos += width;
> +		sepos += width;
> +	}
>  
>  	/* Next copy full words at a time.  */
>  	n32 = width / 32;
> 
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

^ permalink raw reply	[flat|nested] 22+ messages in thread

* Re: [PATCH 00/29] treewide: Convert comma separated statements
  2020-08-25  4:55 [PATCH 00/29] treewide: Convert comma separated statements Joe Perches
                   ` (3 preceding siblings ...)
  2020-08-25  4:56 ` [PATCH 22/29] video: fbdev: " Joe Perches
@ 2020-09-09  2:09 ` Martin K. Petersen
  4 siblings, 0 replies; 22+ messages in thread
From: Martin K. Petersen @ 2020-09-09  2:09 UTC (permalink / raw)
  To: linuxppc-dev, linux-ide, dri-devel, linux-hwmon, Joe Perches,
	oprofile-list, linux-fsdevel, linux-media, linaro-mm-sig,
	drbd-dev, intel-gfx, linux-arm-kernel, linux-input, linux-nfs,
	netdev, reiserfs-devel, linux-bcache, Jiri Kosina
  Cc: devel, linux-s390, linux-fbdev, linux-ia64, linux-scsi,
	Martin K . Petersen, linux-doc, linux-pm, linux-kernel,
	linux-block, linux-mtd, linux-kselftest, linux-alpha, sparclinux

On Mon, 24 Aug 2020 21:55:57 -0700, Joe Perches wrote:

> There are many comma separated statements in the kernel.
> See:https://lore.kernel.org/lkml/alpine.DEB.2.22.394.2008201856110.2524@hadrien/
> 
> Convert the comma separated statements that are in if/do/while blocks
> to use braces and semicolons.
> 
> Many comma separated statements still exist but those are changes for
> another day.
> 
> [...]

Applied to 5.10/scsi-queue, thanks!

[01/29] coding-style.rst: Avoid comma statements
        (no commit info)
[02/29] alpha: Avoid comma separated statements
        (no commit info)
[03/29] ia64: Avoid comma separated statements
        (no commit info)
[04/29] sparc: Avoid comma separated statements
        (no commit info)
[05/29] ata: Avoid comma separated statements
        (no commit info)
[06/29] drbd: Avoid comma separated statements
        (no commit info)
[07/29] lp: Avoid comma separated statements
        (no commit info)
[08/29] dma-buf: Avoid comma separated statements
        (no commit info)
[09/29] drm/gma500: Avoid comma separated statements
        (no commit info)
[10/29] drm/i915: Avoid comma separated statements
        (no commit info)
[11/29] hwmon: (scmi-hwmon): Avoid comma separated statements
        (no commit info)
[12/29] Input: MT - Avoid comma separated statements
        (no commit info)
[13/29] bcache: Avoid comma separated statements
        (no commit info)
[14/29] media: Avoid comma separated statements
        (no commit info)
[15/29] mtd: Avoid comma separated statements
        (no commit info)
[16/29] 8390: Avoid comma separated statements
        (no commit info)
[17/29] fs_enet: Avoid comma separated statements
        (no commit info)
[18/29] wan: sbni: Avoid comma separated statements
        (no commit info)
[19/29] s390/tty3270: Avoid comma separated statements
        (no commit info)
[20/29] scsi: arm: Avoid comma separated statements
        https://git.kernel.org/mkp/scsi/c/a08a07326510
[21/29] media: atomisp: Avoid comma separated statements
        (no commit info)
[22/29] video: fbdev: Avoid comma separated statements
        (no commit info)
[23/29] fuse: Avoid comma separated statements
        (no commit info)
[24/29] reiserfs: Avoid comma separated statements
        (no commit info)
[25/29] lib/zlib: Avoid comma separated statements
        (no commit info)
[26/29] lib: zstd: Avoid comma separated statements
        (no commit info)
[27/29] ipv6: fib6: Avoid comma separated statements
        (no commit info)
[28/29] sunrpc: Avoid comma separated statements
        (no commit info)
[29/29] tools: Avoid comma separated statements
        (no commit info)

-- 
Martin K. Petersen	Oracle Linux Engineering
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

^ permalink raw reply	[flat|nested] 22+ messages in thread

* Re: [PATCH 08/29] dma-buf: Avoid comma separated statements
  2020-08-25  4:56 ` [PATCH 08/29] dma-buf: Avoid " Joe Perches
  2020-08-26 15:08   ` Christian König
  2020-09-04 11:42   ` Kieran Bingham
@ 2021-01-30 18:47   ` Joe Perches
  2021-02-03 13:26     ` Christian König
  2 siblings, 1 reply; 22+ messages in thread
From: Joe Perches @ 2021-01-30 18:47 UTC (permalink / raw)
  To: Jiri Kosina, Sumit Semwal, Christian König
  Cc: linaro-mm-sig, linux-kernel, dri-devel, linux-media

On Mon, 2020-08-24 at 21:56 -0700, Joe Perches wrote:
> Use semicolons and braces.

Ping?
 
> Signed-off-by: Joe Perches <joe@perches.com>
> ---
>  drivers/dma-buf/st-dma-fence.c | 7 +++++--
>  1 file changed, 5 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/dma-buf/st-dma-fence.c b/drivers/dma-buf/st-dma-fence.c
> index e593064341c8..c8a12d7ad71a 100644
> --- a/drivers/dma-buf/st-dma-fence.c
> +++ b/drivers/dma-buf/st-dma-fence.c
> @@ -471,8 +471,11 @@ static int thread_signal_callback(void *arg)
>  			dma_fence_signal(f1);
>  
> 
>  		smp_store_mb(cb.seen, false);
> -		if (!f2 || dma_fence_add_callback(f2, &cb.cb, simple_callback))
> -			miss++, cb.seen = true;
> +		if (!f2 ||
> +		    dma_fence_add_callback(f2, &cb.cb, simple_callback)) {
> +			miss++;
> +			cb.seen = true;
> +		}
>  
> 
>  		if (!t->before)
>  			dma_fence_signal(f1);


_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

^ permalink raw reply	[flat|nested] 22+ messages in thread

* Re: [PATCH 09/29] drm/gma500: Avoid comma separated statements
  2020-08-25  4:56 ` [PATCH 09/29] drm/gma500: " Joe Perches
@ 2021-01-30 18:47   ` Joe Perches
  2021-01-30 21:21     ` Patrik Jakobsson
  0 siblings, 1 reply; 22+ messages in thread
From: Joe Perches @ 2021-01-30 18:47 UTC (permalink / raw)
  To: Jiri Kosina, Patrik Jakobsson; +Cc: David Airlie, dri-devel, linux-kernel

On Mon, 2020-08-24 at 21:56 -0700, Joe Perches wrote:
> Use semicolons and braces.

Ping?
 
> Signed-off-by: Joe Perches <joe@perches.com>
> ---
>  drivers/gpu/drm/gma500/mdfld_intel_display.c | 44 +++++++++++++-------
>  1 file changed, 28 insertions(+), 16 deletions(-)
> 
> diff --git a/drivers/gpu/drm/gma500/mdfld_intel_display.c b/drivers/gpu/drm/gma500/mdfld_intel_display.c
> index aae2d358364c..bfa330df9443 100644
> --- a/drivers/gpu/drm/gma500/mdfld_intel_display.c
> +++ b/drivers/gpu/drm/gma500/mdfld_intel_display.c
> @@ -824,33 +824,45 @@ static int mdfld_crtc_mode_set(struct drm_crtc *crtc,
>  		if ((ksel == KSEL_CRYSTAL_19) || (ksel == KSEL_BYPASS_19)) {
>  			refclk = 19200;
>  
> 
> -			if (is_mipi || is_mipi2)
> -				clk_n = 1, clk_p2 = 8;
> -			else if (is_hdmi)
> -				clk_n = 1, clk_p2 = 10;
> +			if (is_mipi || is_mipi2) {
> +				clk_n = 1;
> +				clk_p2 = 8;
> +			} else if (is_hdmi) {
> +				clk_n = 1;
> +				clk_p2 = 10;
> +			}
>  		} else if (ksel == KSEL_BYPASS_25) {
>  			refclk = 25000;
>  
> 
> -			if (is_mipi || is_mipi2)
> -				clk_n = 1, clk_p2 = 8;
> -			else if (is_hdmi)
> -				clk_n = 1, clk_p2 = 10;
> +			if (is_mipi || is_mipi2) {
> +				clk_n = 1;
> +				clk_p2 = 8;
> +			} else if (is_hdmi) {
> +				clk_n = 1;
> +				clk_p2 = 10;
> +			}
>  		} else if ((ksel == KSEL_BYPASS_83_100) &&
>  					dev_priv->core_freq == 166) {
>  			refclk = 83000;
>  
> 
> -			if (is_mipi || is_mipi2)
> -				clk_n = 4, clk_p2 = 8;
> -			else if (is_hdmi)
> -				clk_n = 4, clk_p2 = 10;
> +			if (is_mipi || is_mipi2) {
> +				clk_n = 4;
> +				clk_p2 = 8;
> +			} else if (is_hdmi) {
> +				clk_n = 4;
> +				clk_p2 = 10;
> +			}
>  		} else if ((ksel == KSEL_BYPASS_83_100) &&
>  					(dev_priv->core_freq == 100 ||
>  					dev_priv->core_freq == 200)) {
>  			refclk = 100000;
> -			if (is_mipi || is_mipi2)
> -				clk_n = 4, clk_p2 = 8;
> -			else if (is_hdmi)
> -				clk_n = 4, clk_p2 = 10;
> +			if (is_mipi || is_mipi2) {
> +				clk_n = 4;
> +				clk_p2 = 8;
> +			} else if (is_hdmi) {
> +				clk_n = 4;
> +				clk_p2 = 10;
> +			}
>  		}
>  
> 
>  		if (is_mipi)


_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

^ permalink raw reply	[flat|nested] 22+ messages in thread

* Re: [PATCH 10/29] drm/i915: Avoid comma separated statements
  2020-08-25  4:56 ` [PATCH 10/29] drm/i915: " Joe Perches
@ 2021-01-30 18:47   ` Joe Perches
  2021-02-01  8:41     ` Jani Nikula
  0 siblings, 1 reply; 22+ messages in thread
From: Joe Perches @ 2021-01-30 18:47 UTC (permalink / raw)
  To: Jiri Kosina, Jani Nikula, Joonas Lahtinen, Rodrigo Vivi
  Cc: David Airlie, intel-gfx, dri-devel, linux-kernel

On Mon, 2020-08-24 at 21:56 -0700, Joe Perches wrote:
> Use semicolons and braces.

Ping?

> Signed-off-by: Joe Perches <joe@perches.com>
> ---
>  drivers/gpu/drm/i915/gt/gen8_ppgtt.c           | 8 +++++---
>  drivers/gpu/drm/i915/gt/intel_gt_requests.c    | 6 ++++--
>  drivers/gpu/drm/i915/gt/selftest_workarounds.c | 6 ++++--
>  drivers/gpu/drm/i915/intel_runtime_pm.c        | 6 ++++--
>  4 files changed, 17 insertions(+), 9 deletions(-)
> 
> diff --git a/drivers/gpu/drm/i915/gt/gen8_ppgtt.c b/drivers/gpu/drm/i915/gt/gen8_ppgtt.c
> index 699125928272..114c13285ff1 100644
> --- a/drivers/gpu/drm/i915/gt/gen8_ppgtt.c
> +++ b/drivers/gpu/drm/i915/gt/gen8_ppgtt.c
> @@ -323,10 +323,12 @@ static int __gen8_ppgtt_alloc(struct i915_address_space * const vm,
>  			}
>  
> 
>  			spin_lock(&pd->lock);
> -			if (likely(!pd->entry[idx]))
> +			if (likely(!pd->entry[idx])) {
>  				set_pd_entry(pd, idx, pt);
> -			else
> -				alloc = pt, pt = pd->entry[idx];
> +			} else {
> +				alloc = pt;
> +				pt = pd->entry[idx];
> +			}
>  		}
>  
> 
>  		if (lvl) {
> diff --git a/drivers/gpu/drm/i915/gt/intel_gt_requests.c b/drivers/gpu/drm/i915/gt/intel_gt_requests.c
> index 66fcbf9d0fdd..54408d0b5e6e 100644
> --- a/drivers/gpu/drm/i915/gt/intel_gt_requests.c
> +++ b/drivers/gpu/drm/i915/gt/intel_gt_requests.c
> @@ -139,8 +139,10 @@ long intel_gt_retire_requests_timeout(struct intel_gt *gt, long timeout)
>  	LIST_HEAD(free);
>  
> 
>  	interruptible = true;
> -	if (unlikely(timeout < 0))
> -		timeout = -timeout, interruptible = false;
> +	if (unlikely(timeout < 0)) {
> +		timeout = -timeout;
> +		interruptible = false;
> +	}
>  
> 
>  	flush_submission(gt, timeout); /* kick the ksoftirqd tasklets */
>  	spin_lock(&timelines->lock);
> diff --git a/drivers/gpu/drm/i915/gt/selftest_workarounds.c b/drivers/gpu/drm/i915/gt/selftest_workarounds.c
> index febc9e6692ba..3e4cbeed20bd 100644
> --- a/drivers/gpu/drm/i915/gt/selftest_workarounds.c
> +++ b/drivers/gpu/drm/i915/gt/selftest_workarounds.c
> @@ -521,8 +521,10 @@ static int check_dirty_whitelist(struct intel_context *ce)
>  
> 
>  		srm = MI_STORE_REGISTER_MEM;
>  		lrm = MI_LOAD_REGISTER_MEM;
> -		if (INTEL_GEN(engine->i915) >= 8)
> -			lrm++, srm++;
> +		if (INTEL_GEN(engine->i915) >= 8) {
> +			lrm++;
> +			srm++;
> +		}
>  
> 
>  		pr_debug("%s: Writing garbage to %x\n",
>  			 engine->name, reg);
> diff --git a/drivers/gpu/drm/i915/intel_runtime_pm.c b/drivers/gpu/drm/i915/intel_runtime_pm.c
> index 153ca9e65382..f498f1c80755 100644
> --- a/drivers/gpu/drm/i915/intel_runtime_pm.c
> +++ b/drivers/gpu/drm/i915/intel_runtime_pm.c
> @@ -201,8 +201,10 @@ __print_intel_runtime_pm_wakeref(struct drm_printer *p,
>  		unsigned long rep;
>  
> 
>  		rep = 1;
> -		while (i + 1 < dbg->count && dbg->owners[i + 1] == stack)
> -			rep++, i++;
> +		while (i + 1 < dbg->count && dbg->owners[i + 1] == stack) {
> +			rep++;
> +			i++;
> +		}
>  		__print_depot_stack(stack, buf, PAGE_SIZE, 2);
>  		drm_printf(p, "Wakeref x%lu taken at:\n%s", rep, buf);
>  	}


_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

^ permalink raw reply	[flat|nested] 22+ messages in thread

* Re: [PATCH 09/29] drm/gma500: Avoid comma separated statements
  2021-01-30 18:47   ` Joe Perches
@ 2021-01-30 21:21     ` Patrik Jakobsson
  0 siblings, 0 replies; 22+ messages in thread
From: Patrik Jakobsson @ 2021-01-30 21:21 UTC (permalink / raw)
  To: Joe Perches; +Cc: David Airlie, Jiri Kosina, dri-devel, linux-kernel

On Sat, Jan 30, 2021 at 7:47 PM Joe Perches <joe@perches.com> wrote:
>
> On Mon, 2020-08-24 at 21:56 -0700, Joe Perches wrote:
> > Use semicolons and braces.
>
> Ping?

This entire file is going away so perhaps just drop the patch to avoid
a conflict.

-Patrik

>
> > Signed-off-by: Joe Perches <joe@perches.com>
> > ---
> >  drivers/gpu/drm/gma500/mdfld_intel_display.c | 44 +++++++++++++-------
> >  1 file changed, 28 insertions(+), 16 deletions(-)
> >
> > diff --git a/drivers/gpu/drm/gma500/mdfld_intel_display.c b/drivers/gpu/drm/gma500/mdfld_intel_display.c
> > index aae2d358364c..bfa330df9443 100644
> > --- a/drivers/gpu/drm/gma500/mdfld_intel_display.c
> > +++ b/drivers/gpu/drm/gma500/mdfld_intel_display.c
> > @@ -824,33 +824,45 @@ static int mdfld_crtc_mode_set(struct drm_crtc *crtc,
> >               if ((ksel == KSEL_CRYSTAL_19) || (ksel == KSEL_BYPASS_19)) {
> >                       refclk = 19200;
> >
> >
> > -                     if (is_mipi || is_mipi2)
> > -                             clk_n = 1, clk_p2 = 8;
> > -                     else if (is_hdmi)
> > -                             clk_n = 1, clk_p2 = 10;
> > +                     if (is_mipi || is_mipi2) {
> > +                             clk_n = 1;
> > +                             clk_p2 = 8;
> > +                     } else if (is_hdmi) {
> > +                             clk_n = 1;
> > +                             clk_p2 = 10;
> > +                     }
> >               } else if (ksel == KSEL_BYPASS_25) {
> >                       refclk = 25000;
> >
> >
> > -                     if (is_mipi || is_mipi2)
> > -                             clk_n = 1, clk_p2 = 8;
> > -                     else if (is_hdmi)
> > -                             clk_n = 1, clk_p2 = 10;
> > +                     if (is_mipi || is_mipi2) {
> > +                             clk_n = 1;
> > +                             clk_p2 = 8;
> > +                     } else if (is_hdmi) {
> > +                             clk_n = 1;
> > +                             clk_p2 = 10;
> > +                     }
> >               } else if ((ksel == KSEL_BYPASS_83_100) &&
> >                                       dev_priv->core_freq == 166) {
> >                       refclk = 83000;
> >
> >
> > -                     if (is_mipi || is_mipi2)
> > -                             clk_n = 4, clk_p2 = 8;
> > -                     else if (is_hdmi)
> > -                             clk_n = 4, clk_p2 = 10;
> > +                     if (is_mipi || is_mipi2) {
> > +                             clk_n = 4;
> > +                             clk_p2 = 8;
> > +                     } else if (is_hdmi) {
> > +                             clk_n = 4;
> > +                             clk_p2 = 10;
> > +                     }
> >               } else if ((ksel == KSEL_BYPASS_83_100) &&
> >                                       (dev_priv->core_freq == 100 ||
> >                                       dev_priv->core_freq == 200)) {
> >                       refclk = 100000;
> > -                     if (is_mipi || is_mipi2)
> > -                             clk_n = 4, clk_p2 = 8;
> > -                     else if (is_hdmi)
> > -                             clk_n = 4, clk_p2 = 10;
> > +                     if (is_mipi || is_mipi2) {
> > +                             clk_n = 4;
> > +                             clk_p2 = 8;
> > +                     } else if (is_hdmi) {
> > +                             clk_n = 4;
> > +                             clk_p2 = 10;
> > +                     }
> >               }
> >
> >
> >               if (is_mipi)
>
>
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

^ permalink raw reply	[flat|nested] 22+ messages in thread

* Re: [PATCH 08/29] dma-buf: Avoid comma separated statements
  2021-02-03 13:26     ` Christian König
@ 2021-01-31 17:39       ` Joe Perches
  2021-01-31 17:53         ` Christian König
  2021-02-01 21:54       ` Lyude Paul
  1 sibling, 1 reply; 22+ messages in thread
From: Joe Perches @ 2021-01-31 17:39 UTC (permalink / raw)
  To: Christian König, Jiri Kosina, Sumit Semwal
  Cc: linaro-mm-sig, linux-kernel, dri-devel, linux-media

On Wed, 2021-02-03 at 14:26 +0100, Christian König wrote:
> Am 30.01.21 um 19:47 schrieb Joe Perches:
> > On Mon, 2020-08-24 at 21:56 -0700, Joe Perches wrote:
> > > Use semicolons and braces.
> > Ping?
> > > Signed-off-by: Joe Perches <joe@perches.com>
> Reviewed-by: Christian König <christian.koenig@amd.com>
> 
> Do you have commit rights to drm-misc-next?

No.

> > > ---
> > >   drivers/dma-buf/st-dma-fence.c | 7 +++++--
> > >   1 file changed, 5 insertions(+), 2 deletions(-)
> > > 
> > > diff --git a/drivers/dma-buf/st-dma-fence.c b/drivers/dma-buf/st-dma-fence.c
> > > index e593064341c8..c8a12d7ad71a 100644
> > > --- a/drivers/dma-buf/st-dma-fence.c
> > > +++ b/drivers/dma-buf/st-dma-fence.c
> > > @@ -471,8 +471,11 @@ static int thread_signal_callback(void *arg)
> > >   			dma_fence_signal(f1);
> > > 
> > >   		smp_store_mb(cb.seen, false);
> > > -		if (!f2 || dma_fence_add_callback(f2, &cb.cb, simple_callback))
> > > -			miss++, cb.seen = true;
> > > +		if (!f2 ||
> > > +		    dma_fence_add_callback(f2, &cb.cb, simple_callback)) {
> > > +			miss++;
> > > +			cb.seen = true;
> > > +		}
> > > 
> > >   		if (!t->before)
> > >   			dma_fence_signal(f1);
> > 
> 


_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

^ permalink raw reply	[flat|nested] 22+ messages in thread

* Re: [PATCH 08/29] dma-buf: Avoid comma separated statements
  2021-01-31 17:39       ` Joe Perches
@ 2021-01-31 17:53         ` Christian König
  0 siblings, 0 replies; 22+ messages in thread
From: Christian König @ 2021-01-31 17:53 UTC (permalink / raw)
  To: Joe Perches, Jiri Kosina, Sumit Semwal
  Cc: linaro-mm-sig, linux-kernel, dri-devel, linux-media

Am 31.01.21 um 18:39 schrieb Joe Perches:
> On Wed, 2021-02-03 at 14:26 +0100, Christian König wrote:
>> Am 30.01.21 um 19:47 schrieb Joe Perches:
>>> On Mon, 2020-08-24 at 21:56 -0700, Joe Perches wrote:
>>>> Use semicolons and braces.
>>> Ping?
>>>> Signed-off-by: Joe Perches <joe@perches.com>
>> Reviewed-by: Christian König <christian.koenig@amd.com>
>>
>> Do you have commit rights to drm-misc-next?
> No.

Pushed.

Thanks for the help,
Christian.

>
>>>> ---
>>>>    drivers/dma-buf/st-dma-fence.c | 7 +++++--
>>>>    1 file changed, 5 insertions(+), 2 deletions(-)
>>>>
>>>> diff --git a/drivers/dma-buf/st-dma-fence.c b/drivers/dma-buf/st-dma-fence.c
>>>> index e593064341c8..c8a12d7ad71a 100644
>>>> --- a/drivers/dma-buf/st-dma-fence.c
>>>> +++ b/drivers/dma-buf/st-dma-fence.c
>>>> @@ -471,8 +471,11 @@ static int thread_signal_callback(void *arg)
>>>>    			dma_fence_signal(f1);
>>>>
>>>>    		smp_store_mb(cb.seen, false);
>>>> -		if (!f2 || dma_fence_add_callback(f2, &cb.cb, simple_callback))
>>>> -			miss++, cb.seen = true;
>>>> +		if (!f2 ||
>>>> +		    dma_fence_add_callback(f2, &cb.cb, simple_callback)) {
>>>> +			miss++;
>>>> +			cb.seen = true;
>>>> +		}
>>>>
>>>>    		if (!t->before)
>>>>    			dma_fence_signal(f1);
>

_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

^ permalink raw reply	[flat|nested] 22+ messages in thread

* Re: [PATCH 10/29] drm/i915: Avoid comma separated statements
  2021-01-30 18:47   ` Joe Perches
@ 2021-02-01  8:41     ` Jani Nikula
  0 siblings, 0 replies; 22+ messages in thread
From: Jani Nikula @ 2021-02-01  8:41 UTC (permalink / raw)
  To: Joe Perches, Jiri Kosina, Joonas Lahtinen, Rodrigo Vivi
  Cc: David Airlie, intel-gfx, dri-devel, linux-kernel

On Sat, 30 Jan 2021, Joe Perches <joe@perches.com> wrote:
> On Mon, 2020-08-24 at 21:56 -0700, Joe Perches wrote:
>> Use semicolons and braces.
>
> Ping?

Seems to have fallen between the cracks.

The first two hunks have been fixed, the last two are still there. Care
to respin and rebase against drm-tip (or linux-next) please?

BR,
Jani.

>
>> Signed-off-by: Joe Perches <joe@perches.com>
>> ---
>>  drivers/gpu/drm/i915/gt/gen8_ppgtt.c           | 8 +++++---
>>  drivers/gpu/drm/i915/gt/intel_gt_requests.c    | 6 ++++--
>>  drivers/gpu/drm/i915/gt/selftest_workarounds.c | 6 ++++--
>>  drivers/gpu/drm/i915/intel_runtime_pm.c        | 6 ++++--
>>  4 files changed, 17 insertions(+), 9 deletions(-)
>> 
>> diff --git a/drivers/gpu/drm/i915/gt/gen8_ppgtt.c b/drivers/gpu/drm/i915/gt/gen8_ppgtt.c
>> index 699125928272..114c13285ff1 100644
>> --- a/drivers/gpu/drm/i915/gt/gen8_ppgtt.c
>> +++ b/drivers/gpu/drm/i915/gt/gen8_ppgtt.c
>> @@ -323,10 +323,12 @@ static int __gen8_ppgtt_alloc(struct i915_address_space * const vm,
>>  			}
>>  
>> 
>>  			spin_lock(&pd->lock);
>> -			if (likely(!pd->entry[idx]))
>> +			if (likely(!pd->entry[idx])) {
>>  				set_pd_entry(pd, idx, pt);
>> -			else
>> -				alloc = pt, pt = pd->entry[idx];
>> +			} else {
>> +				alloc = pt;
>> +				pt = pd->entry[idx];
>> +			}
>>  		}
>>  
>> 
>>  		if (lvl) {
>> diff --git a/drivers/gpu/drm/i915/gt/intel_gt_requests.c b/drivers/gpu/drm/i915/gt/intel_gt_requests.c
>> index 66fcbf9d0fdd..54408d0b5e6e 100644
>> --- a/drivers/gpu/drm/i915/gt/intel_gt_requests.c
>> +++ b/drivers/gpu/drm/i915/gt/intel_gt_requests.c
>> @@ -139,8 +139,10 @@ long intel_gt_retire_requests_timeout(struct intel_gt *gt, long timeout)
>>  	LIST_HEAD(free);
>>  
>> 
>>  	interruptible = true;
>> -	if (unlikely(timeout < 0))
>> -		timeout = -timeout, interruptible = false;
>> +	if (unlikely(timeout < 0)) {
>> +		timeout = -timeout;
>> +		interruptible = false;
>> +	}
>>  
>> 
>>  	flush_submission(gt, timeout); /* kick the ksoftirqd tasklets */
>>  	spin_lock(&timelines->lock);
>> diff --git a/drivers/gpu/drm/i915/gt/selftest_workarounds.c b/drivers/gpu/drm/i915/gt/selftest_workarounds.c
>> index febc9e6692ba..3e4cbeed20bd 100644
>> --- a/drivers/gpu/drm/i915/gt/selftest_workarounds.c
>> +++ b/drivers/gpu/drm/i915/gt/selftest_workarounds.c
>> @@ -521,8 +521,10 @@ static int check_dirty_whitelist(struct intel_context *ce)
>>  
>> 
>>  		srm = MI_STORE_REGISTER_MEM;
>>  		lrm = MI_LOAD_REGISTER_MEM;
>> -		if (INTEL_GEN(engine->i915) >= 8)
>> -			lrm++, srm++;
>> +		if (INTEL_GEN(engine->i915) >= 8) {
>> +			lrm++;
>> +			srm++;
>> +		}
>>  
>> 
>>  		pr_debug("%s: Writing garbage to %x\n",
>>  			 engine->name, reg);
>> diff --git a/drivers/gpu/drm/i915/intel_runtime_pm.c b/drivers/gpu/drm/i915/intel_runtime_pm.c
>> index 153ca9e65382..f498f1c80755 100644
>> --- a/drivers/gpu/drm/i915/intel_runtime_pm.c
>> +++ b/drivers/gpu/drm/i915/intel_runtime_pm.c
>> @@ -201,8 +201,10 @@ __print_intel_runtime_pm_wakeref(struct drm_printer *p,
>>  		unsigned long rep;
>>  
>> 
>>  		rep = 1;
>> -		while (i + 1 < dbg->count && dbg->owners[i + 1] == stack)
>> -			rep++, i++;
>> +		while (i + 1 < dbg->count && dbg->owners[i + 1] == stack) {
>> +			rep++;
>> +			i++;
>> +		}
>>  		__print_depot_stack(stack, buf, PAGE_SIZE, 2);
>>  		drm_printf(p, "Wakeref x%lu taken at:\n%s", rep, buf);
>>  	}
>
>

-- 
Jani Nikula, Intel Open Source Graphics Center
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

^ permalink raw reply	[flat|nested] 22+ messages in thread

* Re: [PATCH 08/29] dma-buf: Avoid comma separated statements
  2021-02-03 13:26     ` Christian König
  2021-01-31 17:39       ` Joe Perches
@ 2021-02-01 21:54       ` Lyude Paul
  2021-02-02  8:33         ` [Linaro-mm-sig] " Christian König
  1 sibling, 1 reply; 22+ messages in thread
From: Lyude Paul @ 2021-02-01 21:54 UTC (permalink / raw)
  To: Christian König, Joe Perches, Jiri Kosina, Sumit Semwal
  Cc: linaro-mm-sig, linux-kernel, dri-devel, linux-media

This is entirely unrelated to this thread, but I noticed when going through dri-
devel that this email is somehow dated two days in the future from now.

On Wed, 2021-02-03 at 14:26 +0100, Christian König wrote:
> Am 30.01.21 um 19:47 schrieb Joe Perches:
> > On Mon, 2020-08-24 at 21:56 -0700, Joe Perches wrote:
> > > Use semicolons and braces.
> > Ping?
> >   
> > > Signed-off-by: Joe Perches <joe@perches.com>
> 
> Reviewed-by: Christian König <christian.koenig@amd.com>
> 
> Do you have commit rights to drm-misc-next?
> 
> > > ---
> > >   drivers/dma-buf/st-dma-fence.c | 7 +++++--
> > >   1 file changed, 5 insertions(+), 2 deletions(-)
> > > 
> > > diff --git a/drivers/dma-buf/st-dma-fence.c b/drivers/dma-buf/st-dma-
> > > fence.c
> > > index e593064341c8..c8a12d7ad71a 100644
> > > --- a/drivers/dma-buf/st-dma-fence.c
> > > +++ b/drivers/dma-buf/st-dma-fence.c
> > > @@ -471,8 +471,11 @@ static int thread_signal_callback(void *arg)
> > >                         dma_fence_signal(f1);
> > >   
> > > 
> > >                 smp_store_mb(cb.seen, false);
> > > -               if (!f2 || dma_fence_add_callback(f2, &cb.cb,
> > > simple_callback))
> > > -                       miss++, cb.seen = true;
> > > +               if (!f2 ||
> > > +                   dma_fence_add_callback(f2, &cb.cb, simple_callback)) {
> > > +                       miss++;
> > > +                       cb.seen = true;
> > > +               }
> > >   
> > > 
> > >                 if (!t->before)
> > >                         dma_fence_signal(f1);
> > 
> 
> _______________________________________________
> dri-devel mailing list
> dri-devel@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/dri-devel

-- 
Sincerely,
   Lyude Paul (she/her)
   Software Engineer at Red Hat
   
Note: I deal with a lot of emails and have a lot of bugs on my plate. If you've
asked me a question, are waiting for a review/merge on a patch, etc. and I
haven't responded in a while, please feel free to send me another email to check
on my status. I don't bite!

_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

^ permalink raw reply	[flat|nested] 22+ messages in thread

* Re: [Linaro-mm-sig] [PATCH 08/29] dma-buf: Avoid comma separated statements
  2021-02-01 21:54       ` Lyude Paul
@ 2021-02-02  8:33         ` Christian König
  2021-02-02 18:24           ` Lyude Paul
  0 siblings, 1 reply; 22+ messages in thread
From: Christian König @ 2021-02-02  8:33 UTC (permalink / raw)
  To: lyude, Christian König, Joe Perches, Jiri Kosina, Sumit Semwal
  Cc: linaro-mm-sig, linux-kernel, dri-devel, linux-media

Yeah, known issue.

An NTP server which I don't have access to has gone bananas and 
sometimes spits out invalid time stamps.

Only thing I can do is wait for an admin to take care of this.

Christian.

Am 01.02.21 um 22:54 schrieb Lyude Paul:
> This is entirely unrelated to this thread, but I noticed when going through dri-
> devel that this email is somehow dated two days in the future from now.
>
> On Wed, 2021-02-03 at 14:26 +0100, Christian König wrote:
>> Am 30.01.21 um 19:47 schrieb Joe Perches:
>>> On Mon, 2020-08-24 at 21:56 -0700, Joe Perches wrote:
>>>> Use semicolons and braces.
>>> Ping?
>>>    
>>>> Signed-off-by: Joe Perches <joe@perches.com>
>> Reviewed-by: Christian König <christian.koenig@amd.com>
>>
>> Do you have commit rights to drm-misc-next?
>>
>>>> ---
>>>>    drivers/dma-buf/st-dma-fence.c | 7 +++++--
>>>>    1 file changed, 5 insertions(+), 2 deletions(-)
>>>>
>>>> diff --git a/drivers/dma-buf/st-dma-fence.c b/drivers/dma-buf/st-dma-
>>>> fence.c
>>>> index e593064341c8..c8a12d7ad71a 100644
>>>> --- a/drivers/dma-buf/st-dma-fence.c
>>>> +++ b/drivers/dma-buf/st-dma-fence.c
>>>> @@ -471,8 +471,11 @@ static int thread_signal_callback(void *arg)
>>>>                          dma_fence_signal(f1);
>>>>    
>>>>
>>>>                  smp_store_mb(cb.seen, false);
>>>> -               if (!f2 || dma_fence_add_callback(f2, &cb.cb,
>>>> simple_callback))
>>>> -                       miss++, cb.seen = true;
>>>> +               if (!f2 ||
>>>> +                   dma_fence_add_callback(f2, &cb.cb, simple_callback)) {
>>>> +                       miss++;
>>>> +                       cb.seen = true;
>>>> +               }
>>>>    
>>>>
>>>>                  if (!t->before)
>>>>                          dma_fence_signal(f1);
>> _______________________________________________
>> dri-devel mailing list
>> dri-devel@lists.freedesktop.org
>> https://lists.freedesktop.org/mailman/listinfo/dri-devel

_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

^ permalink raw reply	[flat|nested] 22+ messages in thread

* Re: [Linaro-mm-sig] [PATCH 08/29] dma-buf: Avoid comma separated statements
  2021-02-02  8:33         ` [Linaro-mm-sig] " Christian König
@ 2021-02-02 18:24           ` Lyude Paul
  0 siblings, 0 replies; 22+ messages in thread
From: Lyude Paul @ 2021-02-02 18:24 UTC (permalink / raw)
  To: christian.koenig, Joe Perches, Jiri Kosina, Sumit Semwal
  Cc: linaro-mm-sig, linux-kernel, dri-devel, linux-media

On Tue, 2021-02-02 at 09:33 +0100, Christian König wrote:
> Yeah, known issue.
> 
> An NTP server which I don't have access to has gone bananas and 
> sometimes spits out invalid time stamps.
> 
> Only thing I can do is wait for an admin to take care of this.

haha it's ok! I just thought it was mildly entertaining to see, as my email
client formatted the message timestamp "Next Wednesday" :)

> 
> Christian.
> 
> Am 01.02.21 um 22:54 schrieb Lyude Paul:
> > This is entirely unrelated to this thread, but I noticed when going through
> > dri-
> > devel that this email is somehow dated two days in the future from now.
> > 
> > On Wed, 2021-02-03 at 14:26 +0100, Christian König wrote:
> > > Am 30.01.21 um 19:47 schrieb Joe Perches:
> > > > On Mon, 2020-08-24 at 21:56 -0700, Joe Perches wrote:
> > > > > Use semicolons and braces.
> > > > Ping?
> > > >    
> > > > > Signed-off-by: Joe Perches <joe@perches.com>
> > > Reviewed-by: Christian König <christian.koenig@amd.com>
> > > 
> > > Do you have commit rights to drm-misc-next?
> > > 
> > > > > ---
> > > > >    drivers/dma-buf/st-dma-fence.c | 7 +++++--
> > > > >    1 file changed, 5 insertions(+), 2 deletions(-)
> > > > > 
> > > > > diff --git a/drivers/dma-buf/st-dma-fence.c b/drivers/dma-buf/st-dma-
> > > > > fence.c
> > > > > index e593064341c8..c8a12d7ad71a 100644
> > > > > --- a/drivers/dma-buf/st-dma-fence.c
> > > > > +++ b/drivers/dma-buf/st-dma-fence.c
> > > > > @@ -471,8 +471,11 @@ static int thread_signal_callback(void *arg)
> > > > >                          dma_fence_signal(f1);
> > > > >    
> > > > > 
> > > > >                  smp_store_mb(cb.seen, false);
> > > > > -               if (!f2 || dma_fence_add_callback(f2, &cb.cb,
> > > > > simple_callback))
> > > > > -                       miss++, cb.seen = true;
> > > > > +               if (!f2 ||
> > > > > +                   dma_fence_add_callback(f2, &cb.cb,
> > > > > simple_callback)) {
> > > > > +                       miss++;
> > > > > +                       cb.seen = true;
> > > > > +               }
> > > > >    
> > > > > 
> > > > >                  if (!t->before)
> > > > >                          dma_fence_signal(f1);
> > > _______________________________________________
> > > dri-devel mailing list
> > > dri-devel@lists.freedesktop.org
> > > https://lists.freedesktop.org/mailman/listinfo/dri-devel
> 

-- 
Sincerely,
   Lyude Paul (she/her)
   Software Engineer at Red Hat
   
Note: I deal with a lot of emails and have a lot of bugs on my plate. If you've
asked me a question, are waiting for a review/merge on a patch, etc. and I
haven't responded in a while, please feel free to send me another email to check
on my status. I don't bite!

_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

^ permalink raw reply	[flat|nested] 22+ messages in thread

* Re: [PATCH 08/29] dma-buf: Avoid comma separated statements
  2021-01-30 18:47   ` Joe Perches
@ 2021-02-03 13:26     ` Christian König
  2021-01-31 17:39       ` Joe Perches
  2021-02-01 21:54       ` Lyude Paul
  0 siblings, 2 replies; 22+ messages in thread
From: Christian König @ 2021-02-03 13:26 UTC (permalink / raw)
  To: Joe Perches, Jiri Kosina, Sumit Semwal
  Cc: linaro-mm-sig, linux-kernel, dri-devel, linux-media

Am 30.01.21 um 19:47 schrieb Joe Perches:
> On Mon, 2020-08-24 at 21:56 -0700, Joe Perches wrote:
>> Use semicolons and braces.
> Ping?
>   
>> Signed-off-by: Joe Perches <joe@perches.com>

Reviewed-by: Christian König <christian.koenig@amd.com>

Do you have commit rights to drm-misc-next?

>> ---
>>   drivers/dma-buf/st-dma-fence.c | 7 +++++--
>>   1 file changed, 5 insertions(+), 2 deletions(-)
>>
>> diff --git a/drivers/dma-buf/st-dma-fence.c b/drivers/dma-buf/st-dma-fence.c
>> index e593064341c8..c8a12d7ad71a 100644
>> --- a/drivers/dma-buf/st-dma-fence.c
>> +++ b/drivers/dma-buf/st-dma-fence.c
>> @@ -471,8 +471,11 @@ static int thread_signal_callback(void *arg)
>>   			dma_fence_signal(f1);
>>   
>>
>>   		smp_store_mb(cb.seen, false);
>> -		if (!f2 || dma_fence_add_callback(f2, &cb.cb, simple_callback))
>> -			miss++, cb.seen = true;
>> +		if (!f2 ||
>> +		    dma_fence_add_callback(f2, &cb.cb, simple_callback)) {
>> +			miss++;
>> +			cb.seen = true;
>> +		}
>>   
>>
>>   		if (!t->before)
>>   			dma_fence_signal(f1);
>

_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

^ permalink raw reply	[flat|nested] 22+ messages in thread

end of thread, other threads:[~2021-02-02 18:25 UTC | newest]

Thread overview: 22+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-08-25  4:55 [PATCH 00/29] treewide: Convert comma separated statements Joe Perches
2020-08-25  4:56 ` [PATCH 08/29] dma-buf: Avoid " Joe Perches
2020-08-26 15:08   ` Christian König
2020-09-03 12:21     ` Sumit Semwal
2020-09-04 11:42   ` Kieran Bingham
2020-09-04 21:33     ` Joe Perches
2021-01-30 18:47   ` Joe Perches
2021-02-03 13:26     ` Christian König
2021-01-31 17:39       ` Joe Perches
2021-01-31 17:53         ` Christian König
2021-02-01 21:54       ` Lyude Paul
2021-02-02  8:33         ` [Linaro-mm-sig] " Christian König
2021-02-02 18:24           ` Lyude Paul
2020-08-25  4:56 ` [PATCH 09/29] drm/gma500: " Joe Perches
2021-01-30 18:47   ` Joe Perches
2021-01-30 21:21     ` Patrik Jakobsson
2020-08-25  4:56 ` [PATCH 10/29] drm/i915: " Joe Perches
2021-01-30 18:47   ` Joe Perches
2021-02-01  8:41     ` Jani Nikula
2020-08-25  4:56 ` [PATCH 22/29] video: fbdev: " Joe Perches
2020-09-08 11:37   ` Bartlomiej Zolnierkiewicz
2020-09-09  2:09 ` [PATCH 00/29] treewide: Convert " Martin K. Petersen

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).