Re: [PATCH] xhci: make warnings greppable

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

 



Hello.

On 01/08/2014 07:13 PM, oliver@xxxxxxxxxx wrote:

From: Oliver Neukum <oneukum@xxxxxxx>

This changes debug messages and warnings in xhci-ring.c
to be on a single line so grep can find them. grep must
have precedence over the 80 column limit.

In the eyes of checkpatch.pl, it has been having precedence for quite a while already, even so that it found some of your line breaks premature. :-)

Signed-off-by: Oliver Neukum <oneukum@xxxxxxx>

---
  drivers/usb/host/xhci-ring.c | 21 ++++++++-------------
  1 file changed, 8 insertions(+), 13 deletions(-)

diff --git a/drivers/usb/host/xhci-ring.c b/drivers/usb/host/xhci-ring.c
index 09b2b55..34dce53 100644
--- a/drivers/usb/host/xhci-ring.c
+++ b/drivers/usb/host/xhci-ring.c
[...]
@@ -1113,13 +1110,12 @@ static void xhci_handle_cmd_set_deq(struct xhci_hcd *xhci, int slot_id,
  					slot_state, ep_state);
  			break;
  		case COMP_EBADSLT:
-			xhci_warn(xhci, "WARN Set TR Deq Ptr cmd failed because "
-					"slot %u was not enabled.\n", slot_id);
+			xhci_warn(xhci, "WARN Set TR Deq Ptr cmd failed because slot "
+					"%u was not enabled.\n", slot_id);
  			break;
  		default:
-			xhci_warn(xhci, "WARN Set TR Deq Ptr cmd with unknown "
-					"completion code of %u.\n",
-				  cmd_comp_code);
+			xhci_warn(xhci, "WARN Set TR Deq Ptr cmd with unknown completion code of "
+					"%u.\n", cmd_comp_code);
  			break;
  		}
  		/* OK what do we do now?  The endpoint state is hosed, and we

$ scripts/checkpatch.pl ~/patches/xhci-make-warnings-greppable.patch
WARNING: quoted string split across lines
#48: FILE: drivers/usb/host/xhci-ring.c:1114:
+			xhci_warn(xhci, "WARN Set TR Deq Ptr cmd failed because slot "
+					"%u was not enabled.\n", slot_id);

WARNING: quoted string split across lines
#55: FILE: drivers/usb/host/xhci-ring.c:1118:
+			xhci_warn(xhci, "WARN Set TR Deq Ptr cmd with unknown completion code of "
+					"%u.\n", cmd_comp_code);

total: 0 errors, 2 warnings, 49 lines checked

/home/headless/patches/xhci-make-warnings-greppable.patch has style problems, please review.

If any of these errors are false positives, please report
them to the maintainer, see CHECKPATCH in MAINTAINERS.

PS: Sarah, sorry for speaking up on xHCI patches again but I was sure the patch won't pass checkpatch.pl, so decided to report this...

WBR, Sergei

--
To unsubscribe from this list: send the line "unsubscribe linux-usb" 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]     [Linux Input]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Old Linux USB Devel Archive]

  Powered by Linux