public inbox for linux-staging@lists.linux.dev
 help / color / mirror / Atom feed
* [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

* Re: [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, 0 replies; 4+ messages in thread
From: Greg KH @ 2024-12-20 15:46 UTC (permalink / raw)
  To: Sandeep Salwan; +Cc: linux-staging, linux-kernel

On Wed, Dec 18, 2024 at 06:37:41PM -0800, Sandeep Salwan wrote:
> 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)
> 
> 

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 did not specify a description of why the patch is needed, or
  possibly, any description at all, in the email body.  Please read the
  section entitled "The canonical patch format" in the kernel file,
  Documentation/process/submitting-patches.rst for what is needed in
  order to properly describe the change.

- You sent a patch that has been sent multiple times in the past, and is
  identical to ones that have been 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] 4+ messages in thread

* [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

* Re: [PATCH] staging: fbtft: Remove unnecessary parentheses in fbtft-core.c
  2025-01-05 17:49 [PATCH] staging: fbtft: Remove unnecessary parentheses in fbtft-core.c Sandeep Salwan
@ 2025-01-07 14:26 ` Greg KH
  0 siblings, 0 replies; 4+ messages in thread
From: Greg KH @ 2025-01-07 14:26 UTC (permalink / raw)
  To: Sandeep Salwan; +Cc: linux-staging, linux-kernel

On Sun, Jan 05, 2025 at 12:49:37PM -0500, Sandeep Salwan wrote:
> 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.

Please wrap your changelog at 72 columns like your editor asked you to.

> 
> 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)

No, please see the zillions of times I have rejected changes like this
in the past on the mailing list.  checkpatch.pl is wrong here.

We write code for people first, compilers second.  With your change, now
you need to look up the order of operations (quick, which is comes first
in order, '&&' or '!' or '>')?

With the () there, you know what the intent is, and what the order is,
without having to always know what comes before what.

thanks,

greg k-h

^ permalink raw reply	[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