* [PATCH] staging: sm750fb: remove unnecessary parentheses
@ 2023-10-16 13:00 Nandha Kumar Singaram
2023-10-16 14:28 ` Greg Kroah-Hartman
0 siblings, 1 reply; 5+ messages in thread
From: Nandha Kumar Singaram @ 2023-10-16 13:00 UTC (permalink / raw)
To: Sudip Mukherjee, Teddy Wang, Greg Kroah-Hartman, linux-fbdev,
linux-staging, linux-kernel
Adhere to linux coding style. Reported by checkpatch:
CHECK: Unnecessary parentheses
Signed-off-by: Nandha Kumar Singaram <nandhakumar.singaram@gmail.com>
---
drivers/staging/sm750fb/ddk750_swi2c.c | 2 +-
drivers/staging/sm750fb/sm750_accel.c | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/staging/sm750fb/ddk750_swi2c.c b/drivers/staging/sm750fb/ddk750_swi2c.c
index 0ef8d4ff2ef9..50e51d730d86 100644
--- a/drivers/staging/sm750fb/ddk750_swi2c.c
+++ b/drivers/staging/sm750fb/ddk750_swi2c.c
@@ -393,7 +393,7 @@ long sm750_sw_i2c_init(unsigned char clk_gpio, unsigned char data_gpio)
* Return 0 if the GPIO pins to be used is out of range. The
* range is only from [0..63]
*/
- if ((clk_gpio > 31) || (data_gpio > 31))
+ if (clk_gpio > 31 || data_gpio > 31)
return -1;
if (sm750_get_chip_type() == SM750LE)
diff --git a/drivers/staging/sm750fb/sm750_accel.c b/drivers/staging/sm750fb/sm750_accel.c
index 44b9e3fe3a41..bbef19a39f81 100644
--- a/drivers/staging/sm750fb/sm750_accel.c
+++ b/drivers/staging/sm750fb/sm750_accel.c
@@ -215,7 +215,7 @@ int sm750_hw_copyarea(struct lynx_accel *accel,
}
}
- if ((nDirection == BOTTOM_TO_TOP) || (nDirection == RIGHT_TO_LEFT)) {
+ if (nDirection == BOTTOM_TO_TOP || nDirection == RIGHT_TO_LEFT) {
sx += width - 1;
sy += height - 1;
dx += width - 1;
--
2.25.1
^ permalink raw reply related [flat|nested] 5+ messages in thread* Re: [PATCH] staging: sm750fb: remove unnecessary parentheses
2023-10-16 13:00 [PATCH] staging: sm750fb: remove unnecessary parentheses Nandha Kumar Singaram
@ 2023-10-16 14:28 ` Greg Kroah-Hartman
0 siblings, 0 replies; 5+ messages in thread
From: Greg Kroah-Hartman @ 2023-10-16 14:28 UTC (permalink / raw)
To: Nandha Kumar Singaram
Cc: Sudip Mukherjee, Teddy Wang, linux-fbdev, linux-staging,
linux-kernel
On Mon, Oct 16, 2023 at 06:00:53AM -0700, Nandha Kumar Singaram wrote:
> Adhere to linux coding style. Reported by checkpatch:
> CHECK: Unnecessary parentheses
>
> Signed-off-by: Nandha Kumar Singaram <nandhakumar.singaram@gmail.com>
> ---
> drivers/staging/sm750fb/ddk750_swi2c.c | 2 +-
> drivers/staging/sm750fb/sm750_accel.c | 2 +-
> 2 files changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/staging/sm750fb/ddk750_swi2c.c b/drivers/staging/sm750fb/ddk750_swi2c.c
> index 0ef8d4ff2ef9..50e51d730d86 100644
> --- a/drivers/staging/sm750fb/ddk750_swi2c.c
> +++ b/drivers/staging/sm750fb/ddk750_swi2c.c
> @@ -393,7 +393,7 @@ long sm750_sw_i2c_init(unsigned char clk_gpio, unsigned char data_gpio)
> * Return 0 if the GPIO pins to be used is out of range. The
> * range is only from [0..63]
> */
> - if ((clk_gpio > 31) || (data_gpio > 31))
> + if (clk_gpio > 31 || data_gpio > 31)
> return -1;
>
> if (sm750_get_chip_type() == SM750LE)
> diff --git a/drivers/staging/sm750fb/sm750_accel.c b/drivers/staging/sm750fb/sm750_accel.c
> index 44b9e3fe3a41..bbef19a39f81 100644
> --- a/drivers/staging/sm750fb/sm750_accel.c
> +++ b/drivers/staging/sm750fb/sm750_accel.c
> @@ -215,7 +215,7 @@ int sm750_hw_copyarea(struct lynx_accel *accel,
> }
> }
>
> - if ((nDirection == BOTTOM_TO_TOP) || (nDirection == RIGHT_TO_LEFT)) {
> + if (nDirection == BOTTOM_TO_TOP || nDirection == RIGHT_TO_LEFT) {
> sx += width - 1;
> sy += height - 1;
> dx += width - 1;
> --
> 2.25.1
>
>
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 sent a patch that has been sent multiple times in the past and is
identical to ones that have been rrejected. 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] 5+ messages in thread
* [PATCH] staging: sm750fb: Remove unnecessary parentheses
@ 2024-11-20 16:44 Cheolu Choi
2024-11-20 18:46 ` Greg KH
0 siblings, 1 reply; 5+ messages in thread
From: Cheolu Choi @ 2024-11-20 16:44 UTC (permalink / raw)
To: sudipm.mukherjee, teddy.wang, gregkh, linux-fbdev, linux-staging,
linux-kernel
Adhere to Linux kernel coding style.
Reported by checkpatch:
CHECK: Unnecessary parentheses around 'clk_gpio > 31'
CHECK: Unnecessary parentheses around 'data_gpio > 31'
Signed-off-by: Cheolu Choi <ray@rasom.in>
---
drivers/staging/sm750fb/ddk750_swi2c.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/staging/sm750fb/ddk750_swi2c.c b/drivers/staging/sm750fb/ddk750_swi2c.c
index 0ef8d4ff2ef9..50e51d730d86 100644
--- a/drivers/staging/sm750fb/ddk750_swi2c.c
+++ b/drivers/staging/sm750fb/ddk750_swi2c.c
@@ -393,7 +393,7 @@ long sm750_sw_i2c_init(unsigned char clk_gpio, unsigned char data_gpio)
* Return 0 if the GPIO pins to be used is out of range. The
* range is only from [0..63]
*/
- if ((clk_gpio > 31) || (data_gpio > 31))
+ if (clk_gpio > 31 || data_gpio > 31)
return -1;
if (sm750_get_chip_type() == SM750LE)
--
2.34.1
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [PATCH] staging: sm750fb: Remove unnecessary parentheses
2024-11-20 16:44 [PATCH] staging: sm750fb: Remove " Cheolu Choi
@ 2024-11-20 18:46 ` Greg KH
0 siblings, 0 replies; 5+ messages in thread
From: Greg KH @ 2024-11-20 18:46 UTC (permalink / raw)
To: Cheolu Choi
Cc: sudipm.mukherjee, teddy.wang, linux-fbdev, linux-staging,
linux-kernel
On Wed, Nov 20, 2024 at 04:44:39PM +0000, Cheolu Choi wrote:
> Adhere to Linux kernel coding style.
>
> Reported by checkpatch:
> CHECK: Unnecessary parentheses around 'clk_gpio > 31'
> CHECK: Unnecessary parentheses around 'data_gpio > 31'
>
> Signed-off-by: Cheolu Choi <ray@rasom.in>
> ---
> drivers/staging/sm750fb/ddk750_swi2c.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/staging/sm750fb/ddk750_swi2c.c b/drivers/staging/sm750fb/ddk750_swi2c.c
> index 0ef8d4ff2ef9..50e51d730d86 100644
> --- a/drivers/staging/sm750fb/ddk750_swi2c.c
> +++ b/drivers/staging/sm750fb/ddk750_swi2c.c
> @@ -393,7 +393,7 @@ long sm750_sw_i2c_init(unsigned char clk_gpio, unsigned char data_gpio)
> * Return 0 if the GPIO pins to be used is out of range. The
> * range is only from [0..63]
> */
> - if ((clk_gpio > 31) || (data_gpio > 31))
> + if (clk_gpio > 31 || data_gpio > 31)
> return -1;
>
> if (sm750_get_chip_type() == SM750LE)
> --
> 2.34.1
>
>
>
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 sent a patch that has been sent multiple times in the past, days,
and is almost 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] 5+ messages in thread
* [PATCH] staging: sm750fb: Remove unnecessary parentheses
@ 2016-09-20 12:20 Rehas Sachdeva
0 siblings, 0 replies; 5+ messages in thread
From: Rehas Sachdeva @ 2016-09-20 12:20 UTC (permalink / raw)
To: outreachy-kernel; +Cc: Sudip Mukherjee, Teddy Wang, Greg Kroah-Hartman
Remove unnecessary parentheses from right side of an assignment. Issue
detected by following Coccinelle semantic patch:
@r@
identifier x;
expression e1, e2;
@@
- x = (e1 << e2);
+ x = e1 << e2;
Signed-off-by: Rehas Sachdeva <aquannie@gmail.com>
---
drivers/staging/sm750fb/sm750_hw.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/staging/sm750fb/sm750_hw.c b/drivers/staging/sm750fb/sm750_hw.c
index a376d17..e2188e1 100644
--- a/drivers/staging/sm750fb/sm750_hw.c
+++ b/drivers/staging/sm750fb/sm750_hw.c
@@ -322,8 +322,8 @@ int hw_sm750_crtc_setMode(struct lynxfb_crtc *crtc,
reg |= (var->xoffset & PANEL_WINDOW_WIDTH_X_MASK);
POKE32(PANEL_WINDOW_WIDTH, reg);
- reg = ((var->yres_virtual - 1) <<
- PANEL_WINDOW_HEIGHT_HEIGHT_SHIFT);
+ reg = (var->yres_virtual - 1) <<
+ PANEL_WINDOW_HEIGHT_HEIGHT_SHIFT;
reg &= PANEL_WINDOW_HEIGHT_HEIGHT_MASK;
reg |= (var->yoffset & PANEL_WINDOW_HEIGHT_Y_MASK);
POKE32(PANEL_WINDOW_HEIGHT, reg);
--
2.7.4
^ permalink raw reply related [flat|nested] 5+ messages in thread
end of thread, other threads:[~2024-11-20 18:47 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-10-16 13:00 [PATCH] staging: sm750fb: remove unnecessary parentheses Nandha Kumar Singaram
2023-10-16 14:28 ` Greg Kroah-Hartman
-- strict thread matches above, loose matches on Subject: below --
2024-11-20 16:44 [PATCH] staging: sm750fb: Remove " Cheolu Choi
2024-11-20 18:46 ` Greg KH
2016-09-20 12:20 Rehas Sachdeva
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.