Skip to contentSkip to conversation

staging: fbtft: remove unnecessary parantheses around assignment

PATCH In review Aastha Gupta 2 participants 2 messages Oct 7, 2017

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 staging: fbtft: remove unnecessary parantheses around assignment

Parentheses are not needed around the right hand side of an assignment. This patch is done using Coccinelle:

@@
expression a, b;
@@

b =
-(
a
-)

---
 drivers/staging/fbtft/fb_uc1611.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/staging/fbtft/fb_uc1611.c +1 -1
index 48e3b3f..8eb5e7f 100644
@@ -225,7 +225,7 @@ static int write_vmem(struct fbtft_par *par, size_t offset, size_t len)
 	u8 *buf8 = par->txbuf.buf;
 	u16 *buf16 = par->txbuf.buf;
 	int line_length = par->info->fix.line_length;
-	int y_start = (offset / line_length);
+	int y_start = offset / line_length;
 	int y_end = (offset + len - 1) / line_length;
 	int x, y, i;
 	int ret = 0;
Signature · 1 line
2.7.4
Acked-by on v1 1/1
#1 lore raw
Quoted 7 lines · Aastha Gupta

Parentheses are not needed around the right hand side of an assignment. This patch is done using Coccinelle:

@@
expression a, b;
@@

Quoted 6 lines

b =
-(
a
-)

Quoted 27 lines
---
 drivers/staging/fbtft/fb_uc1611.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/staging/fbtft/fb_uc1611.c +1 -2
index 48e3b3f..8eb5e7f 100644
@@ -225,7 +225,7 @@ static int write_vmem(struct fbtft_par *par, size_t offset, size_t len)
 	u8 *buf8 = par->txbuf.buf;
 	u16 *buf16 = par->txbuf.buf;
 	int line_length = par->info->fix.line_length;
-	int y_start = (offset / line_length);
+	int y_start = offset / line_length;
 	int y_end = (offset + len - 1) / line_length;
 	int x, y, i;
 	int ret = 0;
--

2.7.4

--
You received this message because you are subscribed to the Google Groups "outreachy-kernel" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected].
To view this discussion on the web visit https://groups.google.com/d/msgid/outreachy-kernel/1507387638-17906-1-git-send-email-aastha.gupta4104%40gmail.com.
For more options, visit https://groups.google.com/d/optout.