atmel_mxt: simplify mxt_dump_message
Subsystems (3)
PATCH 1/1 atmel_mxt: simplify mxt_dump_message
This patch applies %*ph to print small buffer and marks function as inline.
Signed-off-by Andy Shevchenko <[email protected]>
--- drivers/input/touchscreen/atmel_mxt_ts.c | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-)
drivers/input/touchscreen/atmel_mxt_ts.c +4 -6
@@ -317,13 +317,11 @@ static bool mxt_object_writable(unsigned int type) } } -static void mxt_dump_message (struct device *dev, -struct mxt_message *message) +static inline void mxt_dump_message (struct device *dev, +struct mxt_message *message) { -dev_dbg (dev,"reportid: %u\tmessage: %02x %02x %02x %02x %02x %02x %02x\n" , - message->reportid, message->message[0 ], message->message[1 ], - message->message[2 ], message->message[3 ], message->message[4 ], - message->message[5 ], message->message[6 ]); +dev_dbg (dev,"reportid: %u\tmessage: %*ph\n" , + message->reportid,7 , message->message); } static int mxt_check_bootloader(struct i2c_client *client,
Signature · 1 line
1.7.10.4
Quoted 4 lines · Andy Shevchenko
This patch applies %*ph to print small buffer and marks function as inline.
Signed-off-by Andy Shevchenko <[email protected]>
Reviewed-by Daniel Kurtz <[email protected]>
Quoted 34 lines
--- drivers/input/touchscreen/atmel_mxt_ts.c | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-)drivers/input/touchscreen/atmel_mxt_ts.c +4
-7@@ -317,13 +317,11 @@ static bool mxt_object_writable(unsigned int type) } } -static void mxt_dump_message (struct device *dev, -struct mxt_message *message) +static inline void mxt_dump_message (struct device *dev, +struct mxt_message *message) { -dev_dbg (dev,"reportid: %u\tmessage: %02x %02x %02x %02x %02x %02x %02x\n" , - message->reportid, message->message[0 ], message->message[1 ], - message->message[2 ], message->message[3 ], message->message[4 ], - message->message[5 ], message->message[6 ]); +dev_dbg (dev,"reportid: %u\tmessage: %*ph\n" , + message->reportid,7 , message->message); } static int mxt_check_bootloader(struct i2c_client *client, --1.7.10.4
--
To unsubscribe from this list: send the line "unsubscribe linux-input" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html