Skip to contentSkip to conversation

syscon: Use %pa to format the variable of resource_size_t type

PATCH Applied Andy Shevchenko 3 participants 3 messages May 31, 2022 – Jun 15, 2022

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

PATCH 1/1 syscon: Use %pa to format the variable of resource_size_t type

Instead of explicit casting, use %pa specifier to format the variable of resource_size_t type.

---
 drivers/mfd/syscon.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)
drivers/mfd/syscon.c +1 -2
index 191fdb87c424..bdb2ce7ff03b 100644
@@ -101,8 +101,7 @@ static struct syscon *of_syscon_register(struct device_node *np, bool check_clk)
 		}
 	}
 
-	syscon_config.name = kasprintf(GFP_KERNEL, "%pOFn@%llx", np,
-				       (u64)res.start);
+	syscon_config.name = kasprintf(GFP_KERNEL, "%pOFn@%pa", np, &res.start);
 	syscon_config.reg_stride = reg_io_width;
 	syscon_config.val_bits = reg_io_width * 8;
 	syscon_config.max_register = resource_size(&res) - reg_io_width;
Signature · 1 line
2.35.1
Applied
#2 lore raw
In reply to Andy Shevchenko
Quoted 7 lines · Andy Shevchenko

Instead of explicit casting, use %pa specifier to format the variable of resource_size_t type.

---
 drivers/mfd/syscon.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

Applied, thanks.

Signature · 4 lines
Lee Jones [李琼斯]
Principal Technical Lead - Developer Services
Linaro.org │ Open source software for Arm SoCs
Follow Linaro: Facebook | Twitter | Blog