Skip to contentSkip to conversation

staging: sm750fb: remove unnecessary parentheses

PATCH In review Omer PALA 2 participants 2 messages Sep 16 – Oct 1

Subsystems (3)
lore
Share & tools
lore

Omer PALA

author
#0 lore raw

PATCH 1/1 staging: sm750fb: remove unnecessary parentheses

Remove unnecessary parentheses around equality checks in sm750_accel.c

and ddk750_swi2c.c to clear checkpatch.pl checks and improve code

readability.

---
 drivers/staging/sm750fb/ddk750_swi2c.c | 2 +-
 drivers/staging/sm750fb/sm750_accel.c  | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)
drivers/staging/sm750fb/ddk750_swi2c.c +1 -1
index e63f3b00e..24ad58207 100644
@@ -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)
drivers/staging/sm750fb/sm750_accel.c +1 -1
index bac9a2098..21aed73d8 100644
@@ -202,7 +202,7 @@ int sm750_hw_copyarea(struct lynx_accel *accel,
 		}
 	}
 
-	if ((direction == BOTTOM_TO_TOP) || (direction == RIGHT_TO_LEFT)) {
+	if (direction == BOTTOM_TO_TOP || direction == RIGHT_TO_LEFT) {
 		sx += width - 1;
 		sy += height - 1;
 		dx += width - 1;
Signature · 1 line
2.55.0
maintainer
#1 lore raw
Quoted 5 lines · Omer PALA

Remove unnecessary parentheses around equality checks in sm750_accel.c

and ddk750_swi2c.c to clear checkpatch.pl checks and improve code

readability.

Why the extra blank lines in the changelog text?

And no, this doesn't increase readability, now you need to go and remember the operator precidence ordering, right? checkpatch shouldn't be warning of this option in these files, are you sure you are using the latest tree?

thanks,

greg k-h