[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20201106072630.GD1003057@dtor-ws>
Date: Thu, 5 Nov 2020 23:26:30 -0800
From: Dmitry Torokhov <dmitry.torokhov@...il.com>
To: Lee Jones <lee.jones@...aro.org>, joe@...ches.com
Cc: linux-kernel@...r.kernel.org, Henrik Rydberg <rydberg@...math.org>,
Peter Osterlund <petero2@...ia.com>,
Stefan Gmeiner <riddlebox@...esurf.ch>,
"C. Scott Ananian" <cananian@...mni.priceton.edu>,
Bruce Kalk <kall@...pass.com>,
this to <linux-input@...r.kernel.org>
Subject: Re: [PATCH 10/20] input: mouse: synaptics: Place braces around empty
if() body
Hi Lee,
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]
>
> Cc: Dmitry Torokhov <dmitry.torokhov@...il.com>
> Cc: Henrik Rydberg <rydberg@...math.org>
> Cc: Peter Osterlund <petero2@...ia.com>
> Cc: Stefan Gmeiner <riddlebox@...esurf.ch>
> Cc: "C. Scott Ananian" <cananian@...mni.priceton.edu>
> Cc: Bruce Kalk <kall@...pass.com>
> Cc: this to <linux-input@...r.kernel.org>
> Cc: linux-input@...r.kernel.org
> Signed-off-by: Lee Jones <lee.jones@...aro.org>
> ---
> drivers/input/mouse/synaptics.c | 3 ++-
> 1 file changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/input/mouse/synaptics.c b/drivers/input/mouse/synaptics.c
> index 82577095e175e..07835939d83b9 100644
> --- 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.
Thanks.
--
Dmitry
Powered by blists - more mailing lists