All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] staging: fbtft:fixes unnecessary parentheses
@ 2024-04-28 12:19 pipishuo
  2024-04-28 14:03 ` Dan Carpenter
  0 siblings, 1 reply; 2+ messages in thread
From: pipishuo @ 2024-04-28 12:19 UTC (permalink / raw)
  To: dri-devel, linux-fbdev, linux-staging, linux-kernel, 1289151713

This patch fixes the checks reported by checkpatch.pl
for unnecessary parentheses

Signed-off-by: pipishuo <1289151713@qq.com>
---
 drivers/staging/fbtft/fb_ili9320.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/staging/fbtft/fb_ili9320.c b/drivers/staging/fbtft/fb_ili9320.c
index 0be7c2d51548..045275a9bc0b 100644
--- a/drivers/staging/fbtft/fb_ili9320.c
+++ b/drivers/staging/fbtft/fb_ili9320.c
@@ -37,7 +37,8 @@ static int init_display(struct fbtft_par *par)
 	devcode = read_devicecode(par);
 	fbtft_par_dbg(DEBUG_INIT_DISPLAY, par, "Device code: 0x%04X\n",
 		      devcode);
-	if ((devcode != 0x0000) && (devcode != 0x9320))
+	if (devcode != 0x0000 &&
+	    devcode != 0x9320)
 		dev_warn(par->info->device,
 			 "Unrecognized Device code: 0x%04X (expected 0x9320)\n",
 			devcode);
-- 
2.34.1


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

* Re: [PATCH] staging: fbtft:fixes unnecessary parentheses
  2024-04-28 12:19 [PATCH] staging: fbtft:fixes unnecessary parentheses pipishuo
@ 2024-04-28 14:03 ` Dan Carpenter
  0 siblings, 0 replies; 2+ messages in thread
From: Dan Carpenter @ 2024-04-28 14:03 UTC (permalink / raw)
  To: pipishuo; +Cc: dri-devel, linux-fbdev, linux-staging, linux-kernel

On Sun, Apr 28, 2024 at 08:19:08PM +0800, pipishuo wrote:
> This patch fixes the checks reported by checkpatch.pl
> for unnecessary parentheses
> 
> Signed-off-by: pipishuo <1289151713@qq.com>
> ---
>  drivers/staging/fbtft/fb_ili9320.c | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
> 
> diff --git a/drivers/staging/fbtft/fb_ili9320.c b/drivers/staging/fbtft/fb_ili9320.c
> index 0be7c2d51548..045275a9bc0b 100644
> --- a/drivers/staging/fbtft/fb_ili9320.c
> +++ b/drivers/staging/fbtft/fb_ili9320.c
> @@ -37,7 +37,8 @@ static int init_display(struct fbtft_par *par)
>  	devcode = read_devicecode(par);
>  	fbtft_par_dbg(DEBUG_INIT_DISPLAY, par, "Device code: 0x%04X\n",
>  		      devcode);
> -	if ((devcode != 0x0000) && (devcode != 0x9320))
> +	if (devcode != 0x0000 &&
> +	    devcode != 0x9320)


Nah, just leave it.  It's a personal preference for Greg.

https://lore.kernel.org/all/?q=init_display%20devcode

regards,
dan carpenter


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

end of thread, other threads:[~2024-04-28 14:03 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-04-28 12:19 [PATCH] staging: fbtft:fixes unnecessary parentheses pipishuo
2024-04-28 14:03 ` Dan Carpenter

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.