staging: fbtft: remove unnecessary parentheses and fix alignment
Subsystems (2)
PATCH 1/1 staging: fbtft: remove unnecessary parentheses and fix alignment
Fixed several checkpatch.pl CHECKs regarding unnecessary parentheses and alignment to improve code readability. These are coding style changes only.
Signed-off-by Andrei Khomenkov <[email protected]>
--- drivers/staging/fbtft/fb_ili9320.c | 2 +- drivers/staging/fbtft/fb_ra8875.c | 2 +- drivers/staging/fbtft/fb_tinylcd.c | 2 +- drivers/staging/fbtft/fbtft-bus.c | 2 +- drivers/staging/fbtft/fbtft-core.c | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-)
drivers/staging/fbtft/fb_ili9320.c +1 -1
@@ -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);
drivers/staging/fbtft/fb_ra8875.c +1 -1
@@ -43,7 +43,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 );
drivers/staging/fbtft/fb_tinylcd.c +1 -1
@@ -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 );fsleep (250 );
drivers/staging/fbtft/fbtft-bus.c +1 -1
@@ -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) */
drivers/staging/fbtft/fbtft-core.c +1 -1
@@ -659,7 +659,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
Signature · 1 line
2.53.0
Andy Shevchenko
NAKQuoted 3 lines · Andrei Khomenkov
Fixed several checkpatch.pl CHECKs regarding unnecessary parentheses and alignment to improve code readability. These are coding style changes only.
NAK.
...
drivers/staging/fbtft/fb_tinylcd.c static int init_display(struct fbtft_par *par) · line 41
Quoted 3 lines
write_reg(par, 0xE0, 0x00, 0x35, 0x33, 0x00, 0x00, 0x00,drivers/staging/fbtft/fb_tinylcd.c +1
-1- 0x00, 0x35, 0x33, 0x00, 0x00, 0x00); + 0x00, 0x35, 0x33, 0x00, 0x00, 0x00);
You should always use common sense.
...
Besides that, please read:
https://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging.git/tree/drivers/staging/fbtft/README?h=staging-next
and act accordingly.
Signature · 2 lines
With Best Regards, Andy Shevchenko