public inbox for linux-staging@lists.linux.dev
 help / color / mirror / Atom feed
* [PATCH] staging: fbtft: Remove unnecessary parentheses in fbtft-core.c
@ 2025-01-05 17:49 Sandeep Salwan
  2025-01-07 14:26 ` Greg KH
  0 siblings, 1 reply; 4+ messages in thread
From: Sandeep Salwan @ 2025-01-05 17:49 UTC (permalink / raw)
  To: gregkh; +Cc: linux-staging, linux-kernel, Sandeep Salwan

This patch removes unnecessary parentheses around the conditional checks (!txbuflen) and (bpp > 8) in fbtft-core.c. According to the kernel coding style, reducing superfluous parentheses makes the code more readable and straightforward. There are no functional changes; it’s purely a cleanup to align the code with kernel style guidelines.

Signed-off-by: Sandeep Salwan <salwansandeep5@gmail.com>
---
 drivers/staging/fbtft/fbtft-core.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/staging/fbtft/fbtft-core.c b/drivers/staging/fbtft/fbtft-core.c
index 4cfa494243b9..b4e9d6000b9a 100644
--- a/drivers/staging/fbtft/fbtft-core.c
+++ b/drivers/staging/fbtft/fbtft-core.c
@@ -664,7 +664,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.47.1


^ permalink raw reply related	[flat|nested] 4+ messages in thread
* [PATCH] staging: fbtft: Remove unnecessary parentheses in fbtft-core.c
@ 2024-12-19  2:37 Sandeep Salwan
  2024-12-20 15:46 ` Greg KH
  0 siblings, 1 reply; 4+ messages in thread
From: Sandeep Salwan @ 2024-12-19  2:37 UTC (permalink / raw)
  To: gregkh; +Cc: linux-staging, linux-kernel, Sandeep Salwan

Signed-off-by: Sandeep Salwan <salwansandeep5@gmail.com>
---
 drivers/staging/fbtft/fbtft-core.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/staging/fbtft/fbtft-core.c b/drivers/staging/fbtft/fbtft-core.c
index 4cfa494243b9..b4e9d6000b9a 100644
--- a/drivers/staging/fbtft/fbtft-core.c
+++ b/drivers/staging/fbtft/fbtft-core.c
@@ -664,7 +664,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.39.5 (Apple Git-154)


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

end of thread, other threads:[~2025-01-07 14:26 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-01-05 17:49 [PATCH] staging: fbtft: Remove unnecessary parentheses in fbtft-core.c Sandeep Salwan
2025-01-07 14:26 ` Greg KH
  -- strict thread matches above, loose matches on Subject: below --
2024-12-19  2:37 Sandeep Salwan
2024-12-20 15:46 ` Greg KH

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox