* [PATCH] staging: fbtft: Remove unnecessary parentheses
@ 2024-06-17 14:27 Shiva Kiran K
2024-06-17 15:27 ` Greg Kroah-Hartman
2024-06-24 13:16 ` Greg Kroah-Hartman
0 siblings, 2 replies; 5+ messages in thread
From: Shiva Kiran K @ 2024-06-17 14:27 UTC (permalink / raw)
To: Greg Kroah-Hartman, Roshan Khatri, Shiva Kiran K, dri-devel,
linux-fbdev, linux-staging, linux-kernel
Remove unnecessary parentheses in `if` statements.
Reported by checkpatch.pl
Signed-off-by: Shiva Kiran K <shiva_kr@riseup.net>
---
drivers/staging/fbtft/fb_ili9320.c | 2 +-
drivers/staging/fbtft/fb_ra8875.c | 2 +-
drivers/staging/fbtft/fbtft-bus.c | 2 +-
drivers/staging/fbtft/fbtft-core.c | 2 +-
4 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/drivers/staging/fbtft/fb_ili9320.c b/drivers/staging/fbtft/fb_ili9320.c
index 0be7c2d51..409b54cc5 100644
--- a/drivers/staging/fbtft/fb_ili9320.c
+++ b/drivers/staging/fbtft/fb_ili9320.c
@@ -37,7 +37,7 @@ 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);
diff --git a/drivers/staging/fbtft/fb_ra8875.c b/drivers/staging/fbtft/fb_ra8875.c
index 398bdbf53..ce305a0be 100644
--- a/drivers/staging/fbtft/fb_ra8875.c
+++ b/drivers/staging/fbtft/fb_ra8875.c
@@ -50,7 +50,7 @@ static int init_display(struct fbtft_par *par)
par->fbtftops.reset(par);
- if ((par->info->var.xres == 320) && (par->info->var.yres == 240)) {
+ if (par->info->var.xres == 320 && par->info->var.yres == 240) {
/* PLL clock frequency */
write_reg(par, 0x88, 0x0A);
write_reg(par, 0x89, 0x02);
diff --git a/drivers/staging/fbtft/fbtft-bus.c b/drivers/staging/fbtft/fbtft-bus.c
index 3d422bc11..ab903c938 100644
--- a/drivers/staging/fbtft/fbtft-bus.c
+++ b/drivers/staging/fbtft/fbtft-bus.c
@@ -85,7 +85,7 @@ void fbtft_write_reg8_bus9(struct fbtft_par *par, int len, ...)
if (len <= 0)
return;
- if (par->spi && (par->spi->bits_per_word == 8)) {
+ if (par->spi && par->spi->bits_per_word == 8) {
/* we're emulating 9-bit, pad start of buffer with no-ops
* (assuming here that zero is a no-op)
*/
diff --git a/drivers/staging/fbtft/fbtft-core.c b/drivers/staging/fbtft/fbtft-core.c
index c8d52c63d..64babfe3a 100644
--- a/drivers/staging/fbtft/fbtft-core.c
+++ b/drivers/staging/fbtft/fbtft-core.c
@@ -666,7 +666,7 @@ struct fb_info *fbtft_framebuffer_alloc(struct fbtft_display *display,
txbuflen = 0;
#ifdef __LITTLE_ENDIAN
- if ((!txbuflen) && (bpp > 8))
+ if (!txbuflen && bpp > 8)
txbuflen = PAGE_SIZE; /* need buffer for byteswapping */
#endif
--
2.45.2
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [PATCH] staging: fbtft: Remove unnecessary parentheses
2024-06-17 14:27 [PATCH] staging: fbtft: Remove unnecessary parentheses Shiva Kiran K
@ 2024-06-17 15:27 ` Greg Kroah-Hartman
2024-06-24 13:16 ` Greg Kroah-Hartman
1 sibling, 0 replies; 5+ messages in thread
From: Greg Kroah-Hartman @ 2024-06-17 15:27 UTC (permalink / raw)
To: Shiva Kiran K
Cc: Roshan Khatri, dri-devel, linux-fbdev, linux-staging,
linux-kernel
On Mon, Jun 17, 2024 at 07:57:47PM +0530, Shiva Kiran K wrote:
> Remove unnecessary parentheses in `if` statements.
> Reported by checkpatch.pl
As per the many times this came up in the past (see the mailing list
archives), checkpatch is wrong here.
sorry,
greg k-h
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] staging: fbtft: Remove unnecessary parentheses
2024-06-17 14:27 [PATCH] staging: fbtft: Remove unnecessary parentheses Shiva Kiran K
2024-06-17 15:27 ` Greg Kroah-Hartman
@ 2024-06-24 13:16 ` Greg Kroah-Hartman
1 sibling, 0 replies; 5+ messages in thread
From: Greg Kroah-Hartman @ 2024-06-24 13:16 UTC (permalink / raw)
To: Shiva Kiran K
Cc: Roshan Khatri, dri-devel, linux-fbdev, linux-staging,
linux-kernel
On Mon, Jun 17, 2024 at 07:57:47PM +0530, Shiva Kiran K wrote:
> Remove unnecessary parentheses in `if` statements.
> Reported by checkpatch.pl
>
> Signed-off-by: Shiva Kiran K <shiva_kr@riseup.net>
> ---
> drivers/staging/fbtft/fb_ili9320.c | 2 +-
> drivers/staging/fbtft/fb_ra8875.c | 2 +-
> drivers/staging/fbtft/fbtft-bus.c | 2 +-
> drivers/staging/fbtft/fbtft-core.c | 2 +-
> 4 files changed, 4 insertions(+), 4 deletions(-)
>
> diff --git a/drivers/staging/fbtft/fb_ili9320.c b/drivers/staging/fbtft/fb_ili9320.c
> index 0be7c2d51..409b54cc5 100644
> --- a/drivers/staging/fbtft/fb_ili9320.c
> +++ b/drivers/staging/fbtft/fb_ili9320.c
> @@ -37,7 +37,7 @@ 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);
> diff --git a/drivers/staging/fbtft/fb_ra8875.c b/drivers/staging/fbtft/fb_ra8875.c
> index 398bdbf53..ce305a0be 100644
> --- a/drivers/staging/fbtft/fb_ra8875.c
> +++ b/drivers/staging/fbtft/fb_ra8875.c
> @@ -50,7 +50,7 @@ static int init_display(struct fbtft_par *par)
>
> par->fbtftops.reset(par);
>
> - if ((par->info->var.xres == 320) && (par->info->var.yres == 240)) {
> + if (par->info->var.xres == 320 && par->info->var.yres == 240) {
> /* PLL clock frequency */
> write_reg(par, 0x88, 0x0A);
> write_reg(par, 0x89, 0x02);
> diff --git a/drivers/staging/fbtft/fbtft-bus.c b/drivers/staging/fbtft/fbtft-bus.c
> index 3d422bc11..ab903c938 100644
> --- a/drivers/staging/fbtft/fbtft-bus.c
> +++ b/drivers/staging/fbtft/fbtft-bus.c
> @@ -85,7 +85,7 @@ void fbtft_write_reg8_bus9(struct fbtft_par *par, int len, ...)
> if (len <= 0)
> return;
>
> - if (par->spi && (par->spi->bits_per_word == 8)) {
> + if (par->spi && par->spi->bits_per_word == 8) {
> /* we're emulating 9-bit, pad start of buffer with no-ops
> * (assuming here that zero is a no-op)
> */
> diff --git a/drivers/staging/fbtft/fbtft-core.c b/drivers/staging/fbtft/fbtft-core.c
> index c8d52c63d..64babfe3a 100644
> --- a/drivers/staging/fbtft/fbtft-core.c
> +++ b/drivers/staging/fbtft/fbtft-core.c
> @@ -666,7 +666,7 @@ struct fb_info *fbtft_framebuffer_alloc(struct fbtft_display *display,
> txbuflen = 0;
>
> #ifdef __LITTLE_ENDIAN
> - if ((!txbuflen) && (bpp > 8))
> + if (!txbuflen && bpp > 8)
> txbuflen = PAGE_SIZE; /* need buffer for byteswapping */
> #endif
>
> --
> 2.45.2
>
Hi,
This is the friendly patch-bot of Greg Kroah-Hartman. You have sent him
a patch that has triggered this response. He used to manually respond
to these common problems, but in order to save his sanity (he kept
writing the same thing over and over, yet to different people), I was
created. Hopefully you will not take offence and will fix the problem
in your patch and resubmit it so that it can be accepted into the Linux
kernel tree.
You are receiving this message because of the following common error(s)
as indicated below:
- You sent a patch that has been sent multiple times in the past few
days, and is identical to ones that has been recently rejected.
Please always look at the mailing list traffic to determine if you are
duplicating other people's work.
If you wish to discuss this problem further, or you have questions about
how to resolve this issue, please feel free to respond to this email and
Greg will reply once he has dug out from the pending patches received
from other developers.
thanks,
greg k-h's patch email bot
^ permalink raw reply [flat|nested] 5+ messages in thread
* [PATCH] staging: fbtft: Remove unnecessary parentheses
@ 2024-12-10 14:18 Antonio Riccio
2024-12-10 14:24 ` Greg KH
0 siblings, 1 reply; 5+ messages in thread
From: Antonio Riccio @ 2024-12-10 14:18 UTC (permalink / raw)
To: gregkh, dri-devel, linux-fbdev, linux-staging, linux-kernel
Adhere to Linux kernel coding style.
Reported by checkpatch:
CHECK: Unnecessary parentheses around 'devcode != 0x0000'
CHECK: Unnecessary parentheses around 'devcode != 0x9320'
Signed-off-by: Antonio Riccio <linux@ariccio.me>
---
drivers/staging/fbtft/fb_ili9320.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/staging/fbtft/fb_ili9320.c b/drivers/staging/fbtft/fb_ili9320.c
index 050fc2367c12..9f97cfa34b81 100644
--- a/drivers/staging/fbtft/fb_ili9320.c
+++ b/drivers/staging/fbtft/fb_ili9320.c
@@ -35,7 +35,7 @@ static int init_display(struct fbtft_par *par)
par->fbtftops.reset(par);
devcode = read_devicecode(par);
- 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.43.0
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [PATCH] staging: fbtft: Remove unnecessary parentheses
2024-12-10 14:18 Antonio Riccio
@ 2024-12-10 14:24 ` Greg KH
0 siblings, 0 replies; 5+ messages in thread
From: Greg KH @ 2024-12-10 14:24 UTC (permalink / raw)
To: Antonio Riccio; +Cc: dri-devel, linux-fbdev, linux-staging, linux-kernel
On Tue, Dec 10, 2024 at 02:18:48PM +0000, Antonio Riccio wrote:
> Adhere to Linux kernel coding style.
>
> Reported by checkpatch:
>
> CHECK: Unnecessary parentheses around 'devcode != 0x0000'
> CHECK: Unnecessary parentheses around 'devcode != 0x9320'
>
> Signed-off-by: Antonio Riccio <linux@ariccio.me>
> ---
> drivers/staging/fbtft/fb_ili9320.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
Checkpatch is wrong here, sorry. Please see the archives for the
details as to why I don't take changes like this.
sorry,
greg k-h
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2024-12-10 14:25 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-06-17 14:27 [PATCH] staging: fbtft: Remove unnecessary parentheses Shiva Kiran K
2024-06-17 15:27 ` Greg Kroah-Hartman
2024-06-24 13:16 ` Greg Kroah-Hartman
-- strict thread matches above, loose matches on Subject: below --
2024-12-10 14:18 Antonio Riccio
2024-12-10 14:24 ` Greg KH
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).