lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite for Android: free password hash cracker in your pocket
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <cc9b9357d30c4abac7301767ff01fe7947f811c4.camel@yahoo.com>
Date: Tue, 16 Apr 2024 13:14:52 -0700
From: A <ashokemailat@...oo.com>
To: Greg Kroah-Hartman <gregkh@...uxfoundation.org>, 
	dri-devel@...ts.freedesktop.org, linux-fbdev@...r.kernel.org, 
	linux-staging@...ts.linux.dev, linux-kernel@...r.kernel.org, 
	outreachy@...ts.linux.dev
Subject: [PATCH] staging: fbtft Removed redundant parentheses

>From 6dbcb120581fc7cb45812193227b0a197abd8ba4 Mon Sep 17 00:00:00 2001
From: Ashok Kumar <ashokemailat@...oo.com>
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 != 0x0000) && (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 <ashokemailat@...oo.com>
---
 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 != 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 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/staging/fbtft/fbtft-bus.c
b/drivers/staging/fbtft/fbtft-bus.c
index 3d422bc11641..02d7dbd38678 100644
--- a/drivers/staging/fbtft/fbtft-bus.c
+++ b/drivers/staging/fbtft/fbtft-bus.c
@@ -62,9 +62,9 @@
out:									      \
 }                                                                    
\
 EXPORT_SYMBOL(func);
 
-define_fbtft_write_reg(fbtft_write_reg8_bus8, u8, u8, )
+define_fbtft_write_reg(fbtft_write_reg8_bus8, u8, u8,)
 define_fbtft_write_reg(fbtft_write_reg16_bus8, __be16, u16,
cpu_to_be16)
-define_fbtft_write_reg(fbtft_write_reg16_bus16, u16, u16, )
+define_fbtft_write_reg(fbtft_write_reg16_bus16, u16, u16,)
 
 void fbtft_write_reg8_bus9(struct fbtft_par *par, int len, ...)
 {
@@ -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 38845f23023f..98ffca49df81 100644
--- a/drivers/staging/fbtft/fbtft-core.c
+++ b/drivers/staging/fbtft/fbtft-core.c
@@ -216,8 +216,6 @@ static void fbtft_reset(struct fbtft_par *par)
 	if (!par->gpio.reset)
 		return;
 
-	fbtft_par_dbg(DEBUG_RESET, par, "%s()\n", __func__);
-
 	gpiod_set_value_cansleep(par->gpio.reset, 1);
 	usleep_range(20, 40);
 	gpiod_set_value_cansleep(par->gpio.reset, 0);
@@ -667,7 +665,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
 
@@ -1053,8 +1051,6 @@ static int fbtft_verify_gpios(struct fbtft_par
*par)
 	struct fbtft_platform_data *pdata = par->pdata;
 	int i;
 
-	fbtft_par_dbg(DEBUG_VERIFY_GPIOS, par, "%s()\n", __func__);
-
 	if (pdata->display.buswidth != 9 &&  par->startbyte == 0 &&
 	    !par->gpio.dc) {
 		dev_err(par->info->device,
@@ -1159,7 +1155,6 @@ int fbtft_probe_common(struct fbtft_display
*display,
 		dev = &pdev->dev;
 
 	if (unlikely(display->debug & DEBUG_DRIVER_INIT_FUNCTIONS))
-		dev_info(dev, "%s()\n", __func__);
 
 	pdata = dev->platform_data;
 	if (!pdata) {
-- 
2.34.1



Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ