Skip to contentSkip to conversation

staging: vboxvideo: Remove unnecessary parentheses

PATCH In review Shayenne da Luz Moura 2 participants 2 messages Oct 31, 2018 Staging

lore
Share & tools
lore
#0 lore raw

PATCH v3 1/1 staging: vboxvideo: Remove unnecessary parentheses

Remove unneeded parentheses around the arguments of ||. This reduces clutter and code behave in the same way.
Change suggested by checkpatch.pl.

vbox_main.c:119: CHECK: Unnecessary parentheses around 'rects[i].x2 < crtc->x'

---
Changes in v2:
- Make the commit message more clearer.

Changes in v3:
- Update to apply patch to the latest kernel tree

 drivers/staging/vboxvideo/vbox_main.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)
drivers/staging/vboxvideo/vbox_main.c +4 -4
index 7466c1103ff6..ad0e0b62bd1e 100644
@@ -122,10 +122,10 @@ void vbox_framebuffer_dirty_rectangles(struct drm_framebuffer *fb,
 			struct vbva_cmd_hdr cmd_hdr;
 			unsigned int crtc_id = to_vbox_crtc(crtc)->crtc_id;
 
-			if ((rects[i].x1 > crtc_x + mode->hdisplay) ||
-			    (rects[i].y1 > crtc_y + mode->vdisplay) ||
-			    (rects[i].x2 < crtc_x) ||
-			    (rects[i].y2 < crtc_y))
+			if (rects[i].x1 > crtc_x + mode->hdisplay ||
+			    rects[i].y1 > crtc_y + mode->vdisplay ||
+			    rects[i].x2 < crtc_x ||
+			    rects[i].y2 < crtc_y)
 				continue;
 
 			cmd_hdr.x = (s16)rects[i].x1;
Signature · 1 line
2.19.1
Acked-by on v3 1/1
#1 lore raw

Hi,

Quoted 8 lines · Shayenne da Luz Moura

Remove unneeded parentheses around the arguments of ||. This reduces clutter and code behave in the same way.
Change suggested by checkpatch.pl.

vbox_main.c:119: CHECK: Unnecessary parentheses around 'rects[i].x2 < crtc->x'

Thank you.

Still looks good to me:

Regards,

Hans

Quoted 30 lines

---
Changes in v2:
- Make the commit message more clearer.

Changes in v3:
- Update to apply patch to the latest kernel tree

  drivers/staging/vboxvideo/vbox_main.c | 8 ++++----
  1 file changed, 4 insertions(+), 4 deletions(-)
drivers/staging/vboxvideo/vbox_main.c +4 -4
index 7466c1103ff6..ad0e0b62bd1e 100644
@@ -122,10 +122,10 @@ void vbox_framebuffer_dirty_rectangles(struct drm_framebuffer *fb,
  			struct vbva_cmd_hdr cmd_hdr;
  			unsigned int crtc_id = to_vbox_crtc(crtc)->crtc_id;
 
-			if ((rects[i].x1 > crtc_x + mode->hdisplay) ||
-			    (rects[i].y1 > crtc_y + mode->vdisplay) ||
-			    (rects[i].x2 < crtc_x) ||
-			    (rects[i].y2 < crtc_y))
+			if (rects[i].x1 > crtc_x + mode->hdisplay ||
+			    rects[i].y1 > crtc_y + mode->vdisplay ||
+			    rects[i].x2 < crtc_x ||
+			    rects[i].y2 < crtc_y)
  				continue;
 
  			cmd_hdr.x = (s16)rects[i].x1;