Skip to contentSkip to conversation

Coding style fixes on vme_user.c trivial

PATCH In review Oryan Perlmutter 2 participants 2 messages Mar 1, 2019 Staging

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 Coding style fixes on vme_user.c trivial

drivers/staging/devices: Coding style fixes found at file vme_user.c.

---
 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 6a33aaa1a49f..4c7db4f5f15e 100644
@@ -506,7 +506,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.17.1
maintainer
#1 lore raw
Quoted 1 line · Oryan Perlmutter

drivers/staging/devices: Coding style fixes found at file vme_user.c.

Your subject line, and this changelog text, need a lot of work. Please look at the other patches that have been accepted for this driver as examples of how to do this properly.

Quoted 11 lines
---
 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 6a33aaa1a49f..4c7db4f5f15e 100644

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

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

Personally, I like the original code here, it's more explicit as to what is going on.

thanks,

greg k-h