diff mbox series

i2c: rk3x: Don't print visible virtual mapping MMIO address

Message ID 1526529746-161304-1-git-send-email-shawn.lin@rock-chips.com
State Superseded
Headers show
Series i2c: rk3x: Don't print visible virtual mapping MMIO address | expand

Commit Message

Shawn Lin May 17, 2018, 4:02 a.m. UTC
Now %p doesn't print visible pointer address unless the user
really want it. According to Documentation/core-api/printk-formats.rst,
%px should be used instead, otherwise we could see:

rk3x-i2c ff110000.i2c: Initialized RK3xxx I2C bus at (____ptrval____)
rk3x-i2c ff130000.i2c: Initialized RK3xxx I2C bus at (____ptrval____)
rk3x-i2c ff3c0000.i2c: Initialized RK3xxx I2C bus at (____ptrval____)
rk3x-i2c ff3d0000.i2c: Initialized RK3xxx I2C bus at (____ptrval____)

But I don't really understand why we need dump it in the first place!
Let's don't print the visible virtual mapping MMIO address.

Signed-off-by: Shawn Lin <shawn.lin@rock-chips.com>
---

 drivers/i2c/busses/i2c-rk3x.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Heiko Stuebner May 17, 2018, 9:04 a.m. UTC | #1
Hi Shawn,

Am Donnerstag, 17. Mai 2018, 06:02:26 CEST schrieb Shawn Lin:
> Now %p doesn't print visible pointer address unless the user
> really want it. According to Documentation/core-api/printk-formats.rst,
> %px should be used instead, otherwise we could see:
> 
> rk3x-i2c ff110000.i2c: Initialized RK3xxx I2C bus at (____ptrval____)
> rk3x-i2c ff130000.i2c: Initialized RK3xxx I2C bus at (____ptrval____)
> rk3x-i2c ff3c0000.i2c: Initialized RK3xxx I2C bus at (____ptrval____)
> rk3x-i2c ff3d0000.i2c: Initialized RK3xxx I2C bus at (____ptrval____)
> 
> But I don't really understand why we need dump it in the first place!
> Let's don't print the visible virtual mapping MMIO address.
> 
> Signed-off-by: Shawn Lin <shawn.lin@rock-chips.com>

Reviewed-by: Heiko Stuebner <heiko@sntech.de>

But technically, we could also just remove that output line altogether
or make it a dev_dbg at least. As it isn't really that useful to spam
the kernel log with these messages.


Heiko
Shawn Lin May 18, 2018, 12:39 a.m. UTC | #2
Hi Heiko,

On 2018/5/17 17:04, Heiko Stübner wrote:
> Hi Shawn,
> 
> Am Donnerstag, 17. Mai 2018, 06:02:26 CEST schrieb Shawn Lin:
>> Now %p doesn't print visible pointer address unless the user
>> really want it. According to Documentation/core-api/printk-formats.rst,
>> %px should be used instead, otherwise we could see:
>>
>> rk3x-i2c ff110000.i2c: Initialized RK3xxx I2C bus at (____ptrval____)
>> rk3x-i2c ff130000.i2c: Initialized RK3xxx I2C bus at (____ptrval____)
>> rk3x-i2c ff3c0000.i2c: Initialized RK3xxx I2C bus at (____ptrval____)
>> rk3x-i2c ff3d0000.i2c: Initialized RK3xxx I2C bus at (____ptrval____)
>>
>> But I don't really understand why we need dump it in the first place!
>> Let's don't print the visible virtual mapping MMIO address.
>>
>> Signed-off-by: Shawn Lin <shawn.lin@rock-chips.com>
> 
> Reviewed-by: Heiko Stuebner <heiko@sntech.de>
> 
> But technically, we could also just remove that output line altogether
> or make it a dev_dbg at least. As it isn't really that useful to spam
> the kernel log with these messages.

Agree. Will respin v2, thanks.

> 
> 
> Heiko
> 
> 
>
diff mbox series

Patch

diff --git a/drivers/i2c/busses/i2c-rk3x.c b/drivers/i2c/busses/i2c-rk3x.c
index e1a18d9..33e6926 100644
--- a/drivers/i2c/busses/i2c-rk3x.c
+++ b/drivers/i2c/busses/i2c-rk3x.c
@@ -1326,7 +1326,7 @@  static int rk3x_i2c_probe(struct platform_device *pdev)
 	if (ret < 0)
 		goto err_clk_notifier;
 
-	dev_info(&pdev->dev, "Initialized RK3xxx I2C bus at %p\n", i2c->regs);
+	dev_info(&pdev->dev, "Initialized RK3xxx I2C bus\n");
 
 	return 0;