[PATCH] input/iforce: Reformat the packet dump output

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Currently, packets that are dumped are printed as
following in the kernel log:

drivers/input/joystick/iforce/iforce-packets.c: info cmd = ff04, data =
56
02
04
00

Make it more appealing and readable by concatenating the data output
into one line and shortening the previous file path down to "iforce".
The reformatted message would then look like this:

iforce: dump_packet info cmd = ff04, data = 56 02 04 00
---
 drivers/input/joystick/iforce/iforce-packets.c | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/drivers/input/joystick/iforce/iforce-packets.c b/drivers/input/joystick/iforce/iforce-packets.c
index 08f98f2eaf88..e7fa84874b6e 100644
--- a/drivers/input/joystick/iforce/iforce-packets.c
+++ b/drivers/input/joystick/iforce/iforce-packets.c
@@ -37,10 +37,9 @@ void iforce_dump_packet(char *msg, u16 cmd, unsigned char *data)
 {
 	int i;
 
-	printk(KERN_DEBUG __FILE__ ": %s cmd = %04x, data = ", msg, cmd);
+	printk(KERN_DEBUG "iforce: dump_packet %s cmd = %04x, data = ", msg, cmd);
 	for (i = 0; i < LO(cmd); i++)
-		printk("%02x ", data[i]);
-	printk("\n");
+		printk(KERN_CONT "%02x ", data[i]);
 }
 
 /*
-- 
2.18.0

--
To unsubscribe from this list: send the line "unsubscribe linux-input" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Linux Media Devel]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Linux Wireless Networking]     [Linux Omap]

  Powered by Linux