linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Lee Jones <lee.jones@linaro.org>
To: Joe Perches <joe@perches.com>
Cc: Dmitry Torokhov <dmitry.torokhov@gmail.com>,
	linux-kernel@vger.kernel.org,
	Henrik Rydberg <rydberg@bitmath.org>,
	Peter Osterlund <petero2@telia.com>,
	Stefan Gmeiner <riddlebox@freesurf.ch>,
	"C. Scott Ananian" <cananian@alumni.priceton.edu>,
	Bruce Kalk <kall@compass.com>,
	this to <linux-input@vger.kernel.org>
Subject: Re: [PATCH 10/20] input: mouse: synaptics: Place braces around empty if() body
Date: Fri, 6 Nov 2020 08:18:06 +0000	[thread overview]
Message-ID: <20201106081806.GW4488@dell> (raw)
In-Reply-To: <b2cb1fc8aca53ef9ff5d3ff913f2ad4a5e95b1f9.camel@perches.com>

On Thu, 05 Nov 2020, Joe Perches wrote:

> On Thu, 2020-11-05 at 23:26 -0800, Dmitry Torokhov wrote:
> > On Wed, Nov 04, 2020 at 04:24:17PM +0000, Lee Jones wrote:
> > > Fixes the following W=1 kernel build warning(s):
> > > 
> > >  drivers/input/mouse/synaptics.c: In function ‘synaptics_process_packet’:
> > >  drivers/input/mouse/synaptics.c:1110:6: warning: suggest braces around empty body in an ‘if’ statement [-Wempty-body]
> []
> > > diff --git a/drivers/input/mouse/synaptics.c b/drivers/input/mouse/synaptics.c
> []
> > > @@ -1106,8 +1106,9 @@ static void synaptics_process_packet(struct psmouse *psmouse)
> > >  					num_fingers = hw.w + 2;
> > >  				break;
> > >  			case 2:
> > > -				if (SYN_MODEL_PEN(info->model_id))
> > > +				if (SYN_MODEL_PEN(info->model_id)) {
> > >  					;   /* Nothing, treat a pen as a single finger */
> > > +				}
> > 
> > This gives me:
> > 
> > WARNING: braces {} are not necessary for single statement blocks
> > 
> > from checkpatch.
> 
> As the entire case 2 is effectively a noop, why not just comment it better
> and remove the if (SYN_MODEL_PEN(...)) test altogether.

Happy to do that if that's okay with Dmitry.

-- 
Lee Jones [李琼斯]
Senior Technical Lead - Developer Services
Linaro.org │ Open source software for Arm SoCs
Follow Linaro: Facebook | Twitter | Blog

  reply	other threads:[~2020-11-06  8:18 UTC|newest]

Thread overview: 48+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-11-04 16:24 [PATCH 00/20] [Set 1/2] Rid W=1 issues from Input Lee Jones
2020-11-04 16:24 ` [PATCH 01/20] input: rmi4: rmi_bus: Fix misnaming of '__rmi_register_function_handler's 'owner' param Lee Jones
2020-11-04 16:24 ` [PATCH 02/20] input: mouse: cyapa: Fix misnaming of 'cyapa_i2c_write's 'reg' param Lee Jones
2020-11-04 17:14   ` Benson Leung
2020-11-09  6:31   ` Dmitry Torokhov
2020-11-04 16:24 ` [PATCH 03/20] input: mouse: cyapa_gen5: Fix obvious abuse of kernel-doc format Lee Jones
2020-11-09  6:32   ` Dmitry Torokhov
2020-11-04 16:24 ` [PATCH 04/20] input: misc: ab8500-ponkey: Fix incorrect name in 'ab8500_ponkey' doc header Lee Jones
2020-11-09  6:32   ` Dmitry Torokhov
2020-11-04 16:24 ` [PATCH 05/20] input: rmi4: rmi_f01: Struct headers are expected to start with 'struct <name>' Lee Jones
2020-11-10  0:49   ` Dmitry Torokhov
2020-11-04 16:24 ` [PATCH 06/20] include: input: elan-i2c-ids: Mark 'elan_acpi_id' as __maybe_unused Lee Jones
2020-11-04 22:50   ` Dmitry Torokhov
2020-11-05  9:13     ` Lee Jones
2020-11-06  7:28       ` Dmitry Torokhov
2020-11-06  7:37         ` Lee Jones
2020-11-12 10:44   ` [PATCH] input: mouse: elan_i2c_core: Move header inclusion inside Lee Jones
2020-11-18  0:33     ` Dmitry Torokhov
2020-11-04 16:24 ` [PATCH 07/20] input: keyboard: cros_ec_keyb: Struct headers should start with 'struct <name>' Lee Jones
2020-11-04 17:15   ` Benson Leung
2020-11-04 16:24 ` [PATCH 08/20] input: rmi4: rmi_f11: Struct headers are expected to " Lee Jones
2020-11-04 16:24 ` [PATCH 09/20] input: touchscreen: resistive-adc-touch: Struct headers should " Lee Jones
2020-11-09  6:33   ` Dmitry Torokhov
2020-11-04 16:24 ` [PATCH 10/20] input: mouse: synaptics: Place braces around empty if() body Lee Jones
2020-11-06  7:26   ` Dmitry Torokhov
2020-11-06  7:40     ` Lee Jones
2020-11-06  7:45     ` Joe Perches
2020-11-06  8:18       ` Lee Jones [this message]
2020-11-04 16:24 ` [PATCH 11/20] input: keyboard: gpio_keys: Fix misnamed function parameter 'dev' Lee Jones
2020-11-09  6:25   ` Dmitry Torokhov
2020-11-04 16:24 ` [PATCH 12/20] input: mouse: elantech: Demote obvious abuse of kernel-doc header Lee Jones
2020-11-09  6:25   ` Dmitry Torokhov
2020-11-04 16:24 ` [PATCH 13/20] input: rmi4: rmi_f54: Provide some missing 'REPORT_TYPE' enums Lee Jones
2020-11-04 16:24 ` [PATCH 14/20] input: rmi4: rmi_i2c: Provide some missing descriptions for struct members Lee Jones
2020-11-04 16:24 ` [PATCH 15/20] input: touchscreen: cyttsp4_core: Move 'cyttsp4_tch_abs_string' to the only file that references it Lee Jones
2020-11-09  6:36   ` Dmitry Torokhov
2020-11-09  9:17     ` Lee Jones
2020-11-04 16:24 ` [PATCH 16/20] input: misc: drv260x: Fix kernel-doc formatting and remove one abuse Lee Jones
2020-11-09  6:13   ` Dmitry Torokhov
2020-11-04 16:24 ` [PATCH 17/20] input: misc: drv2665: Fix formatting expected by kernel-doc Lee Jones
2020-11-09  6:16   ` Dmitry Torokhov
2020-11-04 16:24 ` [PATCH 18/20] input: misc: drv2667: Fix formatting and add missing member docs Lee Jones
2020-11-09  6:17   ` Dmitry Torokhov
2020-11-04 16:24 ` [PATCH 19/20] input: keyboard: nomadik-ske-keypad: Provide some missing struct " Lee Jones
2020-11-09  6:18   ` Dmitry Torokhov
2020-11-04 16:24 ` [PATCH 20/20] input: keyboard: pmic8xxx-keypad: Fix kernel-doc formatting Lee Jones
2020-11-09 22:02   ` Dmitry Torokhov
2020-11-06 13:24 ` [PATCH 00/20] [Set 1/2] Rid W=1 issues from Input Lee Jones

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20201106081806.GW4488@dell \
    --to=lee.jones@linaro.org \
    --cc=cananian@alumni.priceton.edu \
    --cc=dmitry.torokhov@gmail.com \
    --cc=joe@perches.com \
    --cc=kall@compass.com \
    --cc=linux-input@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=petero2@telia.com \
    --cc=riddlebox@freesurf.ch \
    --cc=rydberg@bitmath.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).