Skip to contentSkip to conversation

staging: gpib: Resolve prefixing 0x with decimal

PATCH In review Ajith P V 2 participants 2 messages Feb 4, 2025 Staging

lore
Share & tools
lore

Ajith P V

author
#0 lore raw

PATCH 1/1 staging: gpib: Resolve prefixing 0x with decimal

- pr_info() of hp_82341_attach() in hp_82341 uses 0x%u which is defective.
- The iobase is of u32 and correct prefix is 0x%x.
- This error reported by checkpatch with below message:
ERROR: Prefixing 0x with decimal output is defective.

---
 drivers/staging/gpib/hp_82341/hp_82341.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/staging/gpib/hp_82341/hp_82341.c +1 -1
index 800f99c05566..740c450914dc 100644
@@ -723,7 +723,7 @@ static int hp_82341_attach(gpib_board_t *board, const gpib_board_config_t *confi
 		hp_priv->hw_version = HW_VERSION_82341C;
 		hp_priv->io_region_offset = 0x400;
 	}
-	pr_info("hp_82341: base io 0x%u\n", iobase);
+	pr_info("hp_82341: base io 0x%x\n", iobase);
 	for (i = 0; i < hp_82341_num_io_regions; ++i) {
 		start_addr = iobase + i * hp_priv->io_region_offset;
 		if (!request_region(start_addr, hp_82341_region_iosize, "hp_82341")) {
Signature · 1 line
2.43.0
maintainer
#1 lore raw
Quoted 15 lines · Ajith P V

- pr_info() of hp_82341_attach() in hp_82341 uses 0x%u which is defective.
- The iobase is of u32 and correct prefix is 0x%x.
- This error reported by checkpatch with below message:
ERROR: Prefixing 0x with decimal output is defective.

---
 drivers/staging/gpib/hp_82341/hp_82341.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/staging/gpib/hp_82341/hp_82341.c +0 -0
index 800f99c05566..740c450914dc 100644

drivers/staging/gpib/hp_82341/hp_82341.c static int hp_82341_attach(gpib_board_t *board, const gpib_board_config_t *confi · line 726

Quoted 5 lines
drivers/staging/gpib/hp_82341/hp_82341.c +1 -1
@@ -723,7 +723,7 @@ static int hp_82341_attach(gpib_board_t *board, const gpib_board_config_t *confi
 		hp_priv->hw_version = HW_VERSION_82341C;
 		hp_priv->io_region_offset = 0x400;
 	}
-	pr_info("hp_82341: base io 0x%u\n", iobase);
+	pr_info("hp_82341: base io 0x%x\n", iobase);

When drivers work properly, they are quiet. Lines like this should just be removed.

thanks,

greg k-h