Skip to contentSkip to conversation

staging: gpib: Resolve prefixing 0x with decimal

PATCH In review Ajith P V 2 participants 2 messages Feb 6, 2025 – Feb 14, 2025 Staging

lore
Share & tools
lore

Ajith P V

author
#0 lore raw

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

- pr_err() of hp82335_attach() in hp82335 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_82335/hp82335.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/staging/gpib/hp_82335/hp82335.c +1 -1
index 451d5dc6d340..6ce79b17a419 100644
@@ -274,7 +274,7 @@ static int hp82335_attach(gpib_board_t *board, const gpib_board_config_t *config
 	case 0xfc000:
 		break;
 	default:
-		pr_err("hp82335: invalid base io address 0x%u\n", config->ibbase);
+		pr_err("hp82335: invalid base io address 0x%x\n", config->ibbase);
 		return -EINVAL;
 	}
 	if (!request_mem_region(upper_iomem_base, hp82335_upper_iomem_size, "hp82335")) {
Signature · 1 line
2.43.0
#1 lore raw
Quoted 26 lines · Ajith P V

- pr_err() of hp82335_attach() in hp82335 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_82335/hp82335.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/staging/gpib/hp_82335/hp82335.c +1 -1
index 451d5dc6d340..6ce79b17a419 100644
@@ -274,7 +274,7 @@ static int hp82335_attach(gpib_board_t *board, const gpib_board_config_t *config
 	case 0xfc000:
 		break;
 	default:
-		pr_err("hp82335: invalid base io address 0x%u\n", config->ibbase);
+		pr_err("hp82335: invalid base io address 0x%x\n", config->ibbase);
 		return -EINVAL;
 	}
 	if (!request_mem_region(upper_iomem_base, hp82335_upper_iomem_size, "hp82335")) {
Signature · 1 line
2.43.0

Hi,
Thanks for your patch.
This patch is now superseded by
https://lore.kernel.org/linux-staging/[email protected]/T/#u

which uses dev_err instead of pr_err and corrects the defective prefix problem also.
-dave