Re: [PATCH] staging: fbtft Removed redundant parentheses

2024-04-17 Thread A
On Wed, 2024-04-17 at 09:07 +0200, Greg Kroah-Hartman wrote:
> On Tue, Apr 16, 2024 at 01:14:52PM -0700, A wrote:
> > > From 6dbcb120581fc7cb45812193227b0a197abd8ba4 Mon Sep 17 00:00:00
> > > 2001
> > From: Ashok Kumar 
> > Date: Tue, 16 Apr 2024 09:19:32 -0700
> > Subject: [PATCH] [PATCH] staging: fbtft Removed redundant
> > parentheses on
> >  logical expr
> > 
> > Adhere to Linux Kernel coding style removed redundant parentheses,
> > multiple blank lines and indentation alignment.
> > 
> > Reported by checkpatch.pl
> > 
> > --
> > fb_ili9320.c
> > 
> > +   if ((devcode != 0x) && (devcode != 0x9320))
> > 
> > --
> > fb_ra8875.c
> > 
> > CHECK: Unnecessary parentheses around 'par->info->var.xres == 320'
> > +  if ((par->info->var.xres == 320) && (par->info->var.yres ==
> > 240)) {
> > 
> > --
> > fb_ssd1325.c
> > 
> > CHECK: Please don't use multiple blank lines
> > --
> > 
> > fb_tinylcd.c    - indentation adjustment
> > 
> > -
> > fbtft-bus.c
> > 
> > CHECK: Unnecessary parentheses around 'par->spi->bits_per_word ==
> > 8'
> > 
> > --
> > fbtft-core.c
> > 
> > CHECK: Please don't use multiple blank lines
> > 
> > CHECK: Unnecessary parentheses around '!txbuflen'
> > 
> > CHECK: Please don't use multiple blank lines
> > --
> > 
> > Signed-off-by: Ashok Kumar 
> > ---
> >  drivers/staging/fbtft/fb_ili9320.c | 2 +-
> >  drivers/staging/fbtft/fb_ra8875.c  | 8 
> >  drivers/staging/fbtft/fb_ssd1325.c | 2 --
> >  drivers/staging/fbtft/fb_tinylcd.c | 2 +-
> >  drivers/staging/fbtft/fbtft-bus.c  | 6 +++---
> >  drivers/staging/fbtft/fbtft-core.c | 7 +--
> >  6 files changed, 10 insertions(+), 17 deletions(-)
> > 
> > diff --git a/drivers/staging/fbtft/fb_ili9320.c
> > b/drivers/staging/fbtft/fb_ili9320.c
> > index 0be7c2d51548..409b54cc562e 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 != 0x) && (devcode != 0x9320))
> > +   if (devcode != 0x && 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 398bdbf53c9a..4b79fb48c5f0 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);
> > @@ -74,8 +74,8 @@ static int init_display(struct fbtft_par *par)
> > write_reg(par, 0x1D, 0x0E);
> > write_reg(par, 0x1E, 0x00);
> > write_reg(par, 0x1F, 0x02);
> > -   } else if ((par->info->var.xres == 480) &&
> > -  (par->info->var.yres == 272)) {
> > +   } else if (par->info->var.xres == 480 &&
> > +  par->info->var.yres == 272) {
> > /* PLL clock frequency  */
> > write_reg(par, 0x88, 0x0A);
> > write_reg(par, 0x89, 0x02);
> > @@ -111,7 +111,7 @@ static int init_display(struct fbtft_par *par)
> > write_reg(par, 0x04, 0x01);
> > mdelay(1);
> > /* horizontal settings */
> > -   write_reg(par, 0x14, 0x4F);
> > +write_reg(par, 0x14, 0x4F);
> > write_reg(par, 0x15, 0x05);
> > write_reg(par, 0x16, 0x0F);
> > write_reg(par, 0x17, 0x01);
> > diff --git a/drivers/staging/fbtft/fb_ssd132

[PATCH] staging: fbtft Removed redundant parentheses

2024-04-17 Thread A
>From 6dbcb120581fc7cb45812193227b0a197abd8ba4 Mon Sep 17 00:00:00 2001
From: Ashok Kumar 
Date: Tue, 16 Apr 2024 09:19:32 -0700
Subject: [PATCH] [PATCH] staging: fbtft Removed redundant parentheses on
 logical expr

Adhere to Linux Kernel coding style removed redundant parentheses,
multiple blank lines and indentation alignment.

Reported by checkpatch.pl

--
fb_ili9320.c

+   if ((devcode != 0x) && (devcode != 0x9320))

--
fb_ra8875.c

CHECK: Unnecessary parentheses around 'par->info->var.xres == 320'
+  if ((par->info->var.xres == 320) && (par->info->var.yres ==
240)) {

--
fb_ssd1325.c

CHECK: Please don't use multiple blank lines
--

fb_tinylcd.c- indentation adjustment

-
fbtft-bus.c

CHECK: Unnecessary parentheses around 'par->spi->bits_per_word == 8'

--
fbtft-core.c

CHECK: Please don't use multiple blank lines

CHECK: Unnecessary parentheses around '!txbuflen'

CHECK: Please don't use multiple blank lines
--

Signed-off-by: Ashok Kumar 
---
 drivers/staging/fbtft/fb_ili9320.c | 2 +-
 drivers/staging/fbtft/fb_ra8875.c  | 8 
 drivers/staging/fbtft/fb_ssd1325.c | 2 --
 drivers/staging/fbtft/fb_tinylcd.c | 2 +-
 drivers/staging/fbtft/fbtft-bus.c  | 6 +++---
 drivers/staging/fbtft/fbtft-core.c | 7 +--
 6 files changed, 10 insertions(+), 17 deletions(-)

diff --git a/drivers/staging/fbtft/fb_ili9320.c
b/drivers/staging/fbtft/fb_ili9320.c
index 0be7c2d51548..409b54cc562e 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 != 0x) && (devcode != 0x9320))
+   if (devcode != 0x && 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 398bdbf53c9a..4b79fb48c5f0 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);
@@ -74,8 +74,8 @@ static int init_display(struct fbtft_par *par)
write_reg(par, 0x1D, 0x0E);
write_reg(par, 0x1E, 0x00);
write_reg(par, 0x1F, 0x02);
-   } else if ((par->info->var.xres == 480) &&
-  (par->info->var.yres == 272)) {
+   } else if (par->info->var.xres == 480 &&
+  par->info->var.yres == 272) {
/* PLL clock frequency  */
write_reg(par, 0x88, 0x0A);
write_reg(par, 0x89, 0x02);
@@ -111,7 +111,7 @@ static int init_display(struct fbtft_par *par)
write_reg(par, 0x04, 0x01);
mdelay(1);
/* horizontal settings */
-   write_reg(par, 0x14, 0x4F);
+write_reg(par, 0x14, 0x4F);
write_reg(par, 0x15, 0x05);
write_reg(par, 0x16, 0x0F);
write_reg(par, 0x17, 0x01);
diff --git a/drivers/staging/fbtft/fb_ssd1325.c
b/drivers/staging/fbtft/fb_ssd1325.c
index 796a2ac3e194..69aa808c7e23 100644
--- a/drivers/staging/fbtft/fb_ssd1325.c
+++ b/drivers/staging/fbtft/fb_ssd1325.c
@@ -109,8 +109,6 @@ static int set_gamma(struct fbtft_par *par, u32
*curves)
 {
int i;
 
-   fbtft_par_dbg(DEBUG_INIT_DISPLAY, par, "%s()\n", __func__);
-
for (i = 0; i < GAMMA_LEN; i++) {
if (i > 0 && curves[i] < 1) {
dev_err(par->info->device,
diff --git a/drivers/staging/fbtft/fb_tinylcd.c
b/drivers/staging/fbtft/fb_tinylcd.c
index 9469248f2c50..60cda57bcb33 100644
--- a/drivers/staging/fbtft/fb_tinylcd.c
+++ b/drivers/staging/fbtft/fb_tinylcd.c
@@ -38,7 +38,7 @@ static int init_display(struct fbtft_par *par)
write_reg(par, 0xE5, 0x00);
write_reg(par, 0xF0, 0x36, 0xA5, 0x53);
write_reg(par, 0xE0, 0x00, 0x35, 0x33, 0x00, 0x00, 0x00,
-  0x00, 0x35, 0x33, 0x00, 0x00, 0x00);
+ 0x00, 0x35, 0x33, 0x00, 0x00, 0x00);
write_reg(par, MIPI_DCS_SET_PIXEL_FORMAT, 0x55);
write_reg(par, MIPI_DCS_EXIT_SLEEP_MODE);
udelay(250);
diff --git a/drivers/st

Re: [PATCH] staging: fbtft Removed redundant parentheses

2024-04-17 Thread Greg Kroah-Hartman
On Tue, Apr 16, 2024 at 01:14:52PM -0700, A wrote:
> >From 6dbcb120581fc7cb45812193227b0a197abd8ba4 Mon Sep 17 00:00:00 2001
> From: Ashok Kumar 
> Date: Tue, 16 Apr 2024 09:19:32 -0700
> Subject: [PATCH] [PATCH] staging: fbtft Removed redundant parentheses on
>  logical expr
> 
> Adhere to Linux Kernel coding style removed redundant parentheses,
> multiple blank lines and indentation alignment.
> 
> Reported by checkpatch.pl
> 
> --
> fb_ili9320.c
> 
> +   if ((devcode != 0x) && (devcode != 0x9320))
> 
> --
> fb_ra8875.c
> 
> CHECK: Unnecessary parentheses around 'par->info->var.xres == 320'
> +  if ((par->info->var.xres == 320) && (par->info->var.yres ==
> 240)) {
> 
> --
> fb_ssd1325.c
> 
> CHECK: Please don't use multiple blank lines
> --
> 
> fb_tinylcd.c- indentation adjustment
> 
> -
> fbtft-bus.c
> 
> CHECK: Unnecessary parentheses around 'par->spi->bits_per_word == 8'
> 
> --
> fbtft-core.c
> 
> CHECK: Please don't use multiple blank lines
> 
> CHECK: Unnecessary parentheses around '!txbuflen'
> 
> CHECK: Please don't use multiple blank lines
> --
> 
> Signed-off-by: Ashok Kumar 
> ---
>  drivers/staging/fbtft/fb_ili9320.c | 2 +-
>  drivers/staging/fbtft/fb_ra8875.c  | 8 
>  drivers/staging/fbtft/fb_ssd1325.c | 2 --
>  drivers/staging/fbtft/fb_tinylcd.c | 2 +-
>  drivers/staging/fbtft/fbtft-bus.c  | 6 +++---
>  drivers/staging/fbtft/fbtft-core.c | 7 +--
>  6 files changed, 10 insertions(+), 17 deletions(-)
> 
> diff --git a/drivers/staging/fbtft/fb_ili9320.c
> b/drivers/staging/fbtft/fb_ili9320.c
> index 0be7c2d51548..409b54cc562e 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 != 0x) && (devcode != 0x9320))
> + if (devcode != 0x && 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 398bdbf53c9a..4b79fb48c5f0 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);
> @@ -74,8 +74,8 @@ static int init_display(struct fbtft_par *par)
>   write_reg(par, 0x1D, 0x0E);
>   write_reg(par, 0x1E, 0x00);
>   write_reg(par, 0x1F, 0x02);
> - } else if ((par->info->var.xres == 480) &&
> -(par->info->var.yres == 272)) {
> + } else if (par->info->var.xres == 480 &&
> +par->info->var.yres == 272) {
>   /* PLL clock frequency  */
>   write_reg(par, 0x88, 0x0A);
>   write_reg(par, 0x89, 0x02);
> @@ -111,7 +111,7 @@ static int init_display(struct fbtft_par *par)
>   write_reg(par, 0x04, 0x01);
>   mdelay(1);
>   /* horizontal settings */
> - write_reg(par, 0x14, 0x4F);
> +write_reg(par, 0x14, 0x4F);
>   write_reg(par, 0x15, 0x05);
>   write_reg(par, 0x16, 0x0F);
>   write_reg(par, 0x17, 0x01);
> diff --git a/drivers/staging/fbtft/fb_ssd1325.c
> b/drivers/staging/fbtft/fb_ssd1325.c
> index 796a2ac3e194..69aa808c7e23 100644
> --- a/drivers/staging/fbtft/fb_ssd1325.c
> +++ b/drivers/staging/fbtft/fb_ssd1325.c
> @@ -109,8 +109,6 @@ static int set_gamma(struct fbtft_par *par, u32
> *curves)
>  {
>   int i;
>  
> - fbtft_par_dbg(DEBUG_INIT_DISPLAY, par, "%s()\n", __func__);
> -
>   for (i = 0; i < GAMMA_LEN; i++) {
>   if (i > 0 && curves[i] < 1) {
>   dev_err(par->info->device,
> diff --git a/drivers/staging/fbtft/fb_tinylcd.c
> b/drivers/staging/fbtft/fb_tinylcd.c
> index 9469248f2c50..60cda57bcb33 100644
> --- a/drivers/staging/fbtft/f