Skip to contentSkip to conversation

staging: vme_user: Remove unnecessary parentheses

PATCH In review Faisal Mukhtar 2 participants 2 messages Jul 23 – Jul 28

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 staging: vme_user: Remove unnecessary parentheses

Fix style problems found by checkpatch.pl,
which are the unneeded parentheses inside if
statements in vme.c.

---
 drivers/staging/vme_user/vme.c | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)
drivers/staging/vme_user/vme.c +6 -6
index b5c66b66ce32..68b5c4613724 100644
@@ -1210,9 +1210,9 @@ void vme_bus_error_handler(struct vme_bridge *bridge,
 	u32 aspace = vme_get_aspace(am);
 
 	list_for_each_entry(handler, &bridge->vme_error_handlers, list) {
-		if ((aspace == handler->aspace) &&
-		    (address >= handler->start) &&
-		    (address < handler->end)) {
+		if  (aspace == handler->aspace &&
+		     address >= handler->start &&
+		     address < handler->end) {
 			if (!handler->num_errors)
 				handler->first_error = address;
 			if (handler->num_errors != UINT_MAX)
@@ -1299,7 +1299,7 @@ int vme_irq_request(struct vme_dev *vdev, int level, int statid,
 		return -EINVAL;
 	}
 
-	if ((level < 1) || (level > 7)) {
+	if (level < 1 || level > 7) {
 		dev_err(bridge->parent, "Invalid interrupt level\n");
 		return -EINVAL;
 	}
@@ -1349,7 +1349,7 @@ void vme_irq_free(struct vme_dev *vdev, int level, int statid)
 		return;
 	}
 
-	if ((level < 1) || (level > 7)) {
+	if (level < 1 || level > 7) {
 		dev_err(bridge->parent, "Invalid interrupt level\n");
 		return;
 	}
@@ -1397,7 +1397,7 @@ int vme_irq_generate(struct vme_dev *vdev, int level, int statid)
 		return -EINVAL;
 	}
 
-	if ((level < 1) || (level > 7)) {
+	if (level < 1 || level > 7) {
 		dev_warn(bridge->parent, "Invalid interrupt level\n");
 		return -EINVAL;
 	}
Signature · 1 line
2.53.0
#1 lore raw
Quoted 14 lines · Faisal Mukhtar

Fix style problems found by checkpatch.pl,
which are the unneeded parentheses inside if
statements in vme.c.

---
 drivers/staging/vme_user/vme.c | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)
drivers/staging/vme_user/vme.c +0 -0
index b5c66b66ce32..68b5c4613724 100644

drivers/staging/vme_user/vme.c void vme_bus_error_handler(struct vme_bridge *bridge, · line 1215

Quoted 9 lines
drivers/staging/vme_user/vme.c +3 -3
@@ -1210,9 +1210,9 @@ void vme_bus_error_handler(struct vme_bridge *bridge,
 	u32 aspace = vme_get_aspace(am);
 
 	list_for_each_entry(handler, &bridge->vme_error_handlers, list) {
-		if ((aspace == handler->aspace) &&
-		    (address >= handler->start) &&
-		    (address < handler->end)) {
+		if  (aspace == handler->aspace &&
+		     address >= handler->start &&
+		     address < handler->end) {

Please see the archives for why this patch just makes things harder to understand. checkpatch should have not warned you about this, always be sure to use the latest version.

thanks,

greg k-h