Skip to contentSkip to conversation

staging: vboxvideo: Remove unnecessary parentheses

PATCH Superseded Shayenne da Luz Moura 5 participants 7 messages Oct 23, 2018 – Oct 31, 2018 Staging

v2 of 3 Superseded Latest is v3 →

lore
Share & tools
lore
#0 lore raw

PATCH v2 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.

 drivers/staging/vboxvideo/vbox_main.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)
drivers/staging/vboxvideo/vbox_main.c +4 -4
index 429f6a453619..10a862674789 100644
@@ -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;
Signature · 1 line
2.19.1
Reviewed-by on v2 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'

Patch looks good to me:

Regards,

Hans

Quoted 27 lines

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

  drivers/staging/vboxvideo/vbox_main.c | 8 ++++----
  1 file changed, 4 insertions(+), 4 deletions(-)
drivers/staging/vboxvideo/vbox_main.c +4 -4
index 429f6a453619..10a862674789 100644
@@ -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 lore raw
In reply to Shayenne da Luz Moura
Quoted 4 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.

Quoted 8 lines

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

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

This patch does not apply to the latest kernel tree at all :(

Please fix up and resend.

thanks,

greg k-h

#3 lore raw
Quoted 14 lines · Greg Kroah-Hartman
Quoted 4 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.

Quoted 8 lines

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

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

Quoted 7 lines

This patch does not apply to the latest kernel tree at all :(

Please fix up and resend.

thanks,

greg k-h

Hi Greg!

Sorry, I do not know what branch are expected to be used. I used the drm-misc-next to create this patch and I could not find any merge problem.

Could you please tell me the details?

Thanks,

Shayenne

#4 lore raw
Quoted 23 lines · Shayenne Moura
Quoted 14 lines · Greg Kroah-Hartman
Quoted 4 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.

Quoted 8 lines

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

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

Quoted 7 lines

This patch does not apply to the latest kernel tree at all :(

Please fix up and resend.

thanks,

greg k-h

Quoted 7 lines

Hi Greg!

Sorry, I do not know what branch are expected to be used. I used the drm-misc-next to create this patch and I could not find any merge problem.

Could you please tell me the details?

Hi Shayenne,

There's an easy trick for this: the kernel tree has a script that can help you find both the relevant maintainers, and their development tree for each file in the kernel.

Simply run:

	./scripts/get_maintainer.pl --scm -f [filename]

For example, in this case, you'd run:

	$ ./scripts/get_maintainer.pl --scm -f drivers/staging/vboxvideo/vbox_main.c
	Greg Kroah-Hartman <[email protected]> (supporter:STAGING SUBSYSTEM,commit_signer:10/10=100%)
	Hans de Goede <[email protected]> (commit_signer:7/10=70%,authored:6/10=60%,added_lines:31/37=84%,removed_lines:153/159=96%)
	Fabio Rafael da Rosa <[email protected]> (commit_signer:1/10=10%,authored:1/10=10%)
	Alexander Kapshuk <[email protected]> (commit_signer:1/10=10%,authored:1/10=10%)
	Nicholas Mc Guire <[email protected]> (commit_signer:1/10=10%)
	Thomas Zimmermann <[email protected]> (authored:1/10=10%,added_lines:2/37=5%)
	Daniel Junho <[email protected]> (authored:1/10=10%,added_lines:2/37=5%)
	[email protected] (open list:STAGING SUBSYSTEM)
	[email protected] (open list)
	git git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging.git

The list of people and mailing lists are the ones that should be the recipients of your patch, and the last line is the git tree on which the patch should be based on.

--
Thanks,
Sasha

#5 lore raw
Quoted 56 lines · Sasha Levin
Quoted 23 lines · Shayenne Moura
Quoted 14 lines · Greg Kroah-Hartman
Quoted 4 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.

Quoted 8 lines

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

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

Quoted 7 lines

This patch does not apply to the latest kernel tree at all :(

Please fix up and resend.

thanks,

greg k-h

Quoted 7 lines

Hi Greg!

Sorry, I do not know what branch are expected to be used. I used the drm-misc-next to create this patch and I could not find any merge problem.

Could you please tell me the details?

Hi Shayenne,

There's an easy trick for this: the kernel tree has a script that can help you find both the relevant maintainers, and their development tree for each file in the kernel.

Simply run:

	./scripts/get_maintainer.pl --scm -f [filename]

For example, in this case, you'd run:

	$ ./scripts/get_maintainer.pl --scm -f drivers/staging/vboxvideo/vbox_main.c
	Greg Kroah-Hartman <[email protected]> (supporter:STAGING SUBSYSTEM,commit_signer:10/10=100%)
	Hans de Goede <[email protected]> (commit_signer:7/10=70%,authored:6/10=60%,added_lines:31/37=84%,removed_lines:153/159=96%)
	Fabio Rafael da Rosa <[email protected]> (commit_signer:1/10=10%,authored:1/10=10%)
	Alexander Kapshuk <[email protected]> (commit_signer:1/10=10%,authored:1/10=10%)
	Nicholas Mc Guire <[email protected]> (commit_signer:1/10=10%)
	Thomas Zimmermann <[email protected]> (authored:1/10=10%,added_lines:2/37=5%)
	Daniel Junho <[email protected]> (authored:1/10=10%,added_lines:2/37=5%)
	[email protected] (open list:STAGING SUBSYSTEM)
	[email protected] (open list)
	git git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging.git
Quoted 7 lines

The list of people and mailing lists are the ones that should be the recipients of your patch, and the last line is the git tree on which the patch should be based on.

--
Thanks,
Sasha

Thanks Sasha!

It is a very nice tip!

Best regards,
Shayenne

#6 lore raw
In reply to Shayenne Moura
Quoted 23 lines · Shayenne Moura
Quoted 14 lines · Greg Kroah-Hartman
Quoted 4 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.

Quoted 8 lines

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

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

Quoted 7 lines

This patch does not apply to the latest kernel tree at all :(

Please fix up and resend.

thanks,

greg k-h

Quoted 7 lines

Hi Greg!

Sorry, I do not know what branch are expected to be used. I used the drm-misc-next to create this patch and I could not find any merge problem.

Could you please tell me the details?

For staging drivers you should use the staging tree as indicated in the outreachy tutorial.

julia

Quoted 12 lines

Thanks,

Shayenne

--
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/20181030231757.24ooubt25oykmgkt%40smtp.gmail.com.
For more options, visit https://groups.google.com/d/optout.