Skip to contentSkip to conversation

Staging: vme: vme_user: removed unnecessary parentheses

PATCH In review Philippe Loctaux 2 participants 2 messages Dec 28, 2017 – Jan 8, 2018 Staging

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 Staging: vme: vme_user: removed unnecessary parentheses

Removed unnecessary parentheses in the if statement.

---
 drivers/staging/vme/devices/vme_user.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/staging/vme/devices/vme_user.c +1 -1
index 41a5b32e0..611ea219f 100644
@@ -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;
Signature · 1 line
2.15.1
maintainer
#1 lore raw
Quoted 12 lines · Philippe Loctaux

Removed unnecessary parentheses in the if statement.

---
 drivers/staging/vme/devices/vme_user.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/staging/vme/devices/vme_user.c +0 -0
index 41a5b32e0..611ea219f 100644

drivers/staging/vme/devices/vme_user.c static int vme_user_match(struct vme_dev *vdev) · line 514

Quoted 5 lines
drivers/staging/vme/devices/vme_user.c +1 -1
@@ -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