linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] staging: vboxvideo: Removed unnecessary parentheses
@ 2018-10-22 22:31 Shayenne da Luz Moura
  2018-10-23  5:43 ` [Outreachy kernel] " Julia Lawall
  0 siblings, 1 reply; 2+ messages in thread
From: Shayenne da Luz Moura @ 2018-10-22 22:31 UTC (permalink / raw)
  To: Greg Kroah-Hartman, Hans de Goede, Michael Thayer
  Cc: devel, linux-kernel, outreachy-kernel

This patch fixes the checkpatch.pl check:

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

Signed-off-by: Shayenne da Luz Moura <shayenneluzmoura@gmail.com>
---
 drivers/staging/vboxvideo/vbox_main.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/drivers/staging/vboxvideo/vbox_main.c b/drivers/staging/vboxvideo/vbox_main.c
index 429f6a453619..10a862674789 100644
--- a/drivers/staging/vboxvideo/vbox_main.c
+++ b/drivers/staging/vboxvideo/vbox_main.c
@@ -116,10 +116,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 + crtc->hwmode.hdisplay) ||
-			    (rects[i].y1 > crtc->y + crtc->hwmode.vdisplay) ||
-			    (rects[i].x2 < crtc->x) ||
-			    (rects[i].y2 < crtc->y))
+			if (rects[i].x1 > crtc->x + crtc->hwmode.hdisplay ||
+			    rects[i].y1 > crtc->y + crtc->hwmode.vdisplay ||
+			    rects[i].x2 < crtc->x ||
+			    rects[i].y2 < crtc->y)
 				continue;
 
 			cmd_hdr.x = (s16)rects[i].x1;
-- 
2.19.1


^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [Outreachy kernel] [PATCH] staging: vboxvideo: Removed unnecessary parentheses
  2018-10-22 22:31 [PATCH] staging: vboxvideo: Removed unnecessary parentheses Shayenne da Luz Moura
@ 2018-10-23  5:43 ` Julia Lawall
  0 siblings, 0 replies; 2+ messages in thread
From: Julia Lawall @ 2018-10-23  5:43 UTC (permalink / raw)
  To: Shayenne da Luz Moura
  Cc: Greg Kroah-Hartman, Hans de Goede, Michael Thayer, devel,
	linux-kernel, outreachy-kernel



On Mon, 22 Oct 2018, Shayenne da Luz Moura wrote:

> This patch fixes the checkpatch.pl check:
>
> vbox_main.c:119: CHECK: Unnecessary parentheses around 'rects[i].x2 <
> crtc->x'
> vbox_main.c:119: CHECK: Unnecessary parentheses around 'rects[i].y2 <
> crtc->y'

Please use the imperative, in the subject line and in the patch.  Also,
try to say something other than "fixes" about what you do, which is not
very descriptive.  Say what you actually did and why, eg remove unneeded
parentheses around the arguments of || to reduce clutter.

It is useful to mention that the change was suggested by checkpatch.  It
is not essential to copy the whole checkpatch message, or at least not all
of them.

thanks,
julia

>
> Signed-off-by: Shayenne da Luz Moura <shayenneluzmoura@gmail.com>
> ---
>  drivers/staging/vboxvideo/vbox_main.c | 8 ++++----
>  1 file changed, 4 insertions(+), 4 deletions(-)
>
> diff --git a/drivers/staging/vboxvideo/vbox_main.c b/drivers/staging/vboxvideo/vbox_main.c
> index 429f6a453619..10a862674789 100644
> --- a/drivers/staging/vboxvideo/vbox_main.c
> +++ b/drivers/staging/vboxvideo/vbox_main.c
> @@ -116,10 +116,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 + crtc->hwmode.hdisplay) ||
> -			    (rects[i].y1 > crtc->y + crtc->hwmode.vdisplay) ||
> -			    (rects[i].x2 < crtc->x) ||
> -			    (rects[i].y2 < crtc->y))
> +			if (rects[i].x1 > crtc->x + crtc->hwmode.hdisplay ||
> +			    rects[i].y1 > crtc->y + crtc->hwmode.vdisplay ||
> +			    rects[i].x2 < crtc->x ||
> +			    rects[i].y2 < crtc->y)
>  				continue;
>
>  			cmd_hdr.x = (s16)rects[i].x1;
> --
> 2.19.1
>
> --
> 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 outreachy-kernel+unsubscribe@googlegroups.com.
> To post to this group, send email to outreachy-kernel@googlegroups.com.
> To view this discussion on the web visit https://groups.google.com/d/msgid/outreachy-kernel/20181022223126.smnsopiu4cavq6zh%40smtp.gmail.com.
> For more options, visit https://groups.google.com/d/optout.
>

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2018-10-23  5:43 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-10-22 22:31 [PATCH] staging: vboxvideo: Removed unnecessary parentheses Shayenne da Luz Moura
2018-10-23  5:43 ` [Outreachy kernel] " Julia Lawall

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).