summary refs log tree commit diff
path: root/drivers/w1
diff options
context:
space:
mode:
authorChristian Vogel <vogelchr@vogel.cx>2022-03-11 20:28:32 +0100
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2022-03-18 14:07:01 +0100
commit6caf745d6172dc187d87438d753e187b0b68fed3 (patch)
tree22b7f5ba918a045ef4e31633cd144340d8a11084 /drivers/w1
parent04c633873c01ce0591b05404af6481100871a921 (diff)
downloadlinux-6caf745d6172dc187d87438d753e187b0b68fed3.tar.gz
w1/ds2490: remove spurious newlines within hexdump
Multiple pr_infos generate newlines, so the hexdump looks like...

> 0x81: count=16, status:
> 01
> 00
> 20
(...16 lines...)

We switch to a single %*ph hexdump, using the built-in %ph format,
which leads to this:

	[52769.348789] usb 2-1.3.1: Clearing ep0x83.
	[52769.349729] usb 2-1.3.1: ep_status=0x81, count=16,...
		...status=01:00:20:40:05:04:04:00:20:53:00:00:00:00:00:00

Signed-off-by: Christian Vogel <vogelchr@vogel.cx>
Link: https://lore.kernel.org/r/20220311192833.1792-2-vogelchr@vogel.cx
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/w1')
-rw-r--r--drivers/w1/masters/ds2490.c8
1 files changed, 3 insertions, 5 deletions
diff --git a/drivers/w1/masters/ds2490.c b/drivers/w1/masters/ds2490.c
index cd8821580f71..f6664fc9596a 100644
--- a/drivers/w1/masters/ds2490.c
+++ b/drivers/w1/masters/ds2490.c
@@ -219,10 +219,8 @@ static void ds_dump_status(struct ds_device *dev, unsigned char *buf, int count)
 {
 	int i;
 
-	pr_info("0x%x: count=%d, status: ", dev->ep[EP_STATUS], count);
-	for (i = 0; i < count; ++i)
-		pr_info("%02x ", buf[i]);
-	pr_info("\n");
+	dev_info(&dev->udev->dev, "ep_status=0x%x, count=%d, status=%*phC",
+		dev->ep[EP_STATUS], count, count, buf);
 
 	if (count >= 16) {
 		ds_print_msg(buf, "enable flag", 0);
@@ -331,7 +329,7 @@ static int ds_recv_data(struct ds_device *dev, unsigned char *buf, int size)
 	err = usb_bulk_msg(dev->udev, usb_rcvbulkpipe(dev->udev, dev->ep[EP_DATA_IN]),
 				buf, size, &count, 1000);
 	if (err < 0) {
-		pr_info("Clearing ep0x%x.\n", dev->ep[EP_DATA_IN]);
+		dev_info(&dev->udev->dev, "Clearing ep0x%x.\n", dev->ep[EP_DATA_IN]);
 		usb_clear_halt(dev->udev, usb_rcvbulkpipe(dev->udev, dev->ep[EP_DATA_IN]));
 		ds_recv_status(dev, NULL, true);
 		return err;