Skip to contentSkip to conversation

staging: vchiq_arm: delete unnecessary check

PATCH In review Dan Carpenter 2 participants 2 messages Oct 29, 2025

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

PATCH 1/1 staging: vchiq_arm: delete unnecessary check

Both sides of this if else statement print exactly the same thing. Delete the unnecessary if statement.

---
 .../staging/vc04_services/interface/vchiq_arm/vchiq_core.c   | 5 +----
 1 file changed, 1 insertion(+), 4 deletions(-)
drivers/staging/vc04_services/interface/vchiq_arm/vchiq_core.c +1 -4
index e2cac0898b8f..130be2f58342 100644
@@ -4001,10 +4001,7 @@ void vchiq_log_dump_mem(struct device *dev, const char *label, u32 addr,
 		}
 		*s++ = '\0';
 
-		if (label && (*label != '\0'))
-			dev_dbg(dev, "core: %s: %08x: %s\n", label, addr, line_buf);
-		else
-			dev_dbg(dev, "core: %s: %08x: %s\n", label, addr, line_buf);
+		dev_dbg(dev, "core: %s: %08x: %s\n", label, addr, line_buf);
 
 		addr += 16;
 		mem += 16;
Signature · 1 line
2.51.0
Reviewed-by on v1 1/1
#1 lore raw
Quoted 4 lines · Dan Carpenter

Both sides of this if else statement print exactly the same thing. Delete the unnecessary if statement.

LGTM,

Quoted 20 lines
---
 .../staging/vc04_services/interface/vchiq_arm/vchiq_core.c   | 5 +----
 1 file changed, 1 insertion(+), 4 deletions(-)
drivers/staging/vc04_services/interface/vchiq_arm/vchiq_core.c +1 -4
index e2cac0898b8f..130be2f58342 100644
@@ -4001,10 +4001,7 @@ void vchiq_log_dump_mem(struct device *dev, const char *label, u32 addr,
 		}
 		*s++ = '\0';
 
-		if (label && (*label != '\0'))
-			dev_dbg(dev, "core: %s: %08x: %s\n", label, addr, line_buf);
-		else
-			dev_dbg(dev, "core: %s: %08x: %s\n", label, addr, line_buf);
+		dev_dbg(dev, "core: %s: %08x: %s\n", label, addr, line_buf);
 
 		addr += 16;
 		mem += 16;