input: elan: Fix wrong %p extension
Subsystems (2)
PATCH 1/1 input: elan: Fix wrong %p extension
There's no %px extension. From the context I think the intention was to dump the five bytes which were not as expected, and for that one should use %ph.
---
I think the bug is mostly harmless, since the unrecognized extension is simply ignored (and skipped over), and the address of the 'values' array is simply printed as if by %5p. But since that is an address on the kernel stack, someone might think it is worse than I do.
drivers/input/mouse/elan_i2c_smbus.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/input/mouse/elan_i2c_smbus.c +1 -1
@@ -71,7 +71,7 @@ static int elan_smbus_initialize(struct i2c_client *client)/* compare hello packet */ if (memcmp (values, check,ETP_SMBUS_HELLOPACKET_LEN )) { -dev_err (&client->dev,"hello packet fail [%*px]\n" , +dev_err (&client->dev,"hello packet fail [%*ph]\n" ,ETP_SMBUS_HELLOPACKET_LEN , values);return -ENXIO ; }
Signature · 1 line
2.1.3
Quoted 5 lines · Rasmus Villemoes
There's no %px extension. From the context I think the intention was to dump the five bytes which were not as expected, and for that one should use %ph.
Signed-off-by Rasmus Villemoes <[email protected]>
Applied, thank you.
Quoted 25 lines
---
I think the bug is mostly harmless, since the unrecognized extension is simply ignored (and skipped over), and the address of the 'values' array is simply printed as if by %5p. But since that is an address on the kernel stack, someone might think it is worse than I do.drivers/input/mouse/elan_i2c_smbus.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)drivers/input/mouse/elan_i2c_smbus.c +1
-1@@ -71,7 +71,7 @@ static int elan_smbus_initialize(struct i2c_client *client)/* compare hello packet */ if (memcmp (values, check,ETP_SMBUS_HELLOPACKET_LEN )) { -dev_err (&client->dev,"hello packet fail [%*px]\n" , +dev_err (&client->dev,"hello packet fail [%*ph]\n" ,ETP_SMBUS_HELLOPACKET_LEN , values);return -ENXIO ; }Signature · 1 line
2.1.3
Signature · 1 line
Dmitry