public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] Staging: vme: vme_user: removed unnecessary parentheses
@ 2017-12-28 22:15 Philippe Loctaux
  2018-01-08 15:39 ` Greg KH
  0 siblings, 1 reply; 2+ messages in thread
From: Philippe Loctaux @ 2017-12-28 22:15 UTC (permalink / raw)
  To: martyn, manohar.vanga, gregkh; +Cc: devel, linux-kernel, Philippe Loctaux

Removed unnecessary parentheses in the if statement.

Signed-off-by: Philippe Loctaux <loctauxphilippe@gmail.com>
---
 drivers/staging/vme/devices/vme_user.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/staging/vme/devices/vme_user.c b/drivers/staging/vme/devices/vme_user.c
index 41a5b32e0..611ea219f 100644
--- a/drivers/staging/vme/devices/vme_user.c
+++ b/drivers/staging/vme/devices/vme_user.c
@@ -511,7 +511,7 @@ static int vme_user_match(struct vme_dev *vdev)
 	int cur_slot = vme_slot_num(vdev);
 
 	for (i = 0; i < bus_num; i++)
-		if ((cur_bus == bus[i]) && (cur_slot == vdev->num))
+		if (cur_bus == bus[i] && cur_slot == vdev->num)
 			return 1;
 
 	return 0;
-- 
2.15.1

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

* Re: [PATCH] Staging: vme: vme_user: removed unnecessary parentheses
  2017-12-28 22:15 [PATCH] Staging: vme: vme_user: removed unnecessary parentheses Philippe Loctaux
@ 2018-01-08 15:39 ` Greg KH
  0 siblings, 0 replies; 2+ messages in thread
From: Greg KH @ 2018-01-08 15:39 UTC (permalink / raw)
  To: Philippe Loctaux; +Cc: martyn, manohar.vanga, devel, linux-kernel

On Thu, Dec 28, 2017 at 11:15:30PM +0100, Philippe Loctaux wrote:
> Removed unnecessary parentheses in the if statement.
> 
> Signed-off-by: Philippe Loctaux <loctauxphilippe@gmail.com>
> ---
>  drivers/staging/vme/devices/vme_user.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/staging/vme/devices/vme_user.c b/drivers/staging/vme/devices/vme_user.c
> index 41a5b32e0..611ea219f 100644
> --- a/drivers/staging/vme/devices/vme_user.c
> +++ b/drivers/staging/vme/devices/vme_user.c
> @@ -511,7 +511,7 @@ static int vme_user_match(struct vme_dev *vdev)
>  	int cur_slot = vme_slot_num(vdev);
>  
>  	for (i = 0; i < bus_num; i++)
> -		if ((cur_bus == bus[i]) && (cur_slot == vdev->num))
> +		if (cur_bus == bus[i] && cur_slot == vdev->num)

Ick, horrid, no, now you have to look up what the order of == vs. && is,
do you know it?

thanks,

greg k-h

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

end of thread, other threads:[~2018-01-08 15:39 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-12-28 22:15 [PATCH] Staging: vme: vme_user: removed unnecessary parentheses Philippe Loctaux
2018-01-08 15:39 ` Greg KH

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox