Re: [PATCH 2/2] coding style: fix line over 80 characters

2014-03-20 Thread Sergei Shtylyov

On 03/21/2014 12:34 AM, Sergei Shtylyov wrote:


Signed-off-by: Cédric Cabessa 
---
  drivers/staging/usbip/vhci_hcd.c | 33 ++---
  1 file changed, 22 insertions(+), 11 deletions(-)



diff --git a/drivers/staging/usbip/vhci_hcd.c
b/drivers/staging/usbip/vhci_hcd.c
index f690668..1e84577 100644
--- a/drivers/staging/usbip/vhci_hcd.c
+++ b/drivers/staging/usbip/vhci_hcd.c

[...]

@@ -539,7 +546,9 @@ static int vhci_urb_enqueue(struct usb_hcd *hcd, struct
urb *urb,

  default:
  /* NOT REACHED */
-dev_err(dev, "invalid request to devnum 0 bRequest %u, wValue
%u\n", ctrlreq->bRequest,
+dev_err(dev,
+"invalid request to devnum 0 bRequest %u, wValue %u\n",
+ctrlreq->bRequest,
  ctrlreq->wValue);
  ret =  -EINVAL;
  goto no_need_xmit;
@@ -1060,7 +1069,9 @@ static int vhci_hcd_suspend(struct platform_device
*pdev, pm_message_t state)
  spin_unlock(&the_controller->lock);

  if (connected > 0) {
-dev_info(&pdev->dev, "We have %d active connection%s. Do not
suspend.\n", connected, (connected == 1 ? "" : "s"));
+dev_info(&pdev->dev,
+ "We have %d active connection%s. Do not suspend.\n",
+ connected, (connected == 1 ? "" : "s"));
  ret =  -EBUSY;
  } else {
  dev_info(&pdev->dev, "suspend vhci_hcd");



Hm, I don't see checkpatch.pl complaints about these either in the
'usb-next' branch of Greg's tree.


   Sorry, I forgot about Greg's separate staging.git repo. The patch looks 
correct in this context.


WBR, Sergei

___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


Re: [PATCH 2/2] coding style: fix line over 80 characters

2014-03-20 Thread Sergei Shtylyov

On 03/20/2014 11:45 PM, Joe Perches wrote:


diff --git a/drivers/staging/usbip/vhci_hcd.c b/drivers/staging/usbip/vhci_hcd.c

[]

@@ -271,12 +271,14 @@ static int vhci_hub_control(struct usb_hcd *hcd, u16 
typeReq, u16 wValue,
}
break;
case USB_PORT_FEAT_POWER:
-   usbip_dbg_vhci_rh(" ClearPortFeature: 
USB_PORT_FEAT_POWER\n");
+   usbip_dbg_vhci_rh(
+   " ClearPortFeature: USB_PORT_FEAT_POWER\n");



 Your version of scripts/checkpatch.pl seems outdated. It shouldn't
complain about strings violating 80-column limit (and I've just verified it
doesn't).



checkpatch complains about > 80 char lines for lines with
a function where the function name isn't understood to be
a logging use.



uspip_dbg_ doesn't take the general form so if the
string at the EOL exceeds 80 chars, a message is emitted.



Long standalone strings on a single line do not get warnings.


   OK, but there's still issue that the patch context doesn't correspond to 
what can be seen in Greg's tree. What I am seeing there is broken up string.


WBR, Sergei

___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


Re: [PATCH 2/2] coding style: fix line over 80 characters

2014-03-20 Thread Joe Perches
On Fri, 2014-03-21 at 00:34 +0300, Sergei Shtylyov wrote:
> On 03/20/2014 01:04 AM, Cédric Cabessa wrote:
> > diff --git a/drivers/staging/usbip/vhci_hcd.c 
> > b/drivers/staging/usbip/vhci_hcd.c
[]
> > @@ -271,12 +271,14 @@ static int vhci_hub_control(struct usb_hcd *hcd, u16 
> > typeReq, u16 wValue,
> > }
> > break;
> > case USB_PORT_FEAT_POWER:
> > -   usbip_dbg_vhci_rh(" ClearPortFeature: 
> > USB_PORT_FEAT_POWER\n");
> > +   usbip_dbg_vhci_rh(
> > +   " ClearPortFeature: USB_PORT_FEAT_POWER\n");
> 
> Your version of scripts/checkpatch.pl seems outdated. It shouldn't 
> complain about strings violating 80-column limit (and I've just verified it 
> doesn't).

checkpatch complains about > 80 char lines for lines with
a function where the function name isn't understood to be
a logging use.

uspip_dbg_ doesn't take the general form so if the
string at the EOL exceeds 80 chars, a message is emitted.

Long standalone strings on a single line do not get warnings.


___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


Re: [PATCH 2/2] coding style: fix line over 80 characters

2014-03-20 Thread Sergei Shtylyov

Hello.

On 03/20/2014 01:04 AM, Cédric Cabessa wrote:


Signed-off-by: Cédric Cabessa 
---
  drivers/staging/usbip/vhci_hcd.c | 33 ++---
  1 file changed, 22 insertions(+), 11 deletions(-)



diff --git a/drivers/staging/usbip/vhci_hcd.c b/drivers/staging/usbip/vhci_hcd.c
index f690668..1e84577 100644
--- a/drivers/staging/usbip/vhci_hcd.c
+++ b/drivers/staging/usbip/vhci_hcd.c
@@ -271,12 +271,14 @@ static int vhci_hub_control(struct usb_hcd *hcd, u16 
typeReq, u16 wValue,
}
break;
case USB_PORT_FEAT_POWER:
-   usbip_dbg_vhci_rh(" ClearPortFeature: 
USB_PORT_FEAT_POWER\n");
+   usbip_dbg_vhci_rh(
+   " ClearPortFeature: USB_PORT_FEAT_POWER\n");


   Your version of scripts/checkpatch.pl seems outdated. It shouldn't 
complain about strings violating 80-column limit (and I've just verified it 
doesn't).



@@ -539,7 +546,9 @@ static int vhci_urb_enqueue(struct usb_hcd *hcd, struct urb 
*urb,

default:
/* NOT REACHED */
-   dev_err(dev, "invalid request to devnum 0 bRequest %u, wValue 
%u\n", ctrlreq->bRequest,
+   dev_err(dev,
+   "invalid request to devnum 0 bRequest %u, wValue 
%u\n",
+   ctrlreq->bRequest,
ctrlreq->wValue);
ret =  -EINVAL;
goto no_need_xmit;
@@ -1060,7 +1069,9 @@ static int vhci_hcd_suspend(struct platform_device *pdev, 
pm_message_t state)
spin_unlock(&the_controller->lock);

if (connected > 0) {
-   dev_info(&pdev->dev, "We have %d active connection%s. Do not suspend.\n", 
connected, (connected == 1 ? "" : "s"));
+   dev_info(&pdev->dev,
+"We have %d active connection%s. Do not suspend.\n",
+connected, (connected == 1 ? "" : "s"));
ret =  -EBUSY;
} else {
dev_info(&pdev->dev, "suspend vhci_hcd");


   Hm, I don't see checkpatch.pl complaints about these either in the 
'usb-next' branch of Greg's tree.


WBR, Sergei

___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


Re: [PATCH 2/2] coding style: fix line over 80 characters

2014-03-20 Thread Sergei Shtylyov

On 03/21/2014 12:34 AM, Sergei Shtylyov wrote:


Signed-off-by: Cédric Cabessa 
---
  drivers/staging/usbip/vhci_hcd.c | 33 ++---
  1 file changed, 22 insertions(+), 11 deletions(-)



diff --git a/drivers/staging/usbip/vhci_hcd.c
b/drivers/staging/usbip/vhci_hcd.c
index f690668..1e84577 100644
--- a/drivers/staging/usbip/vhci_hcd.c
+++ b/drivers/staging/usbip/vhci_hcd.c

[...]

@@ -1060,7 +1069,9 @@ static int vhci_hcd_suspend(struct platform_device
*pdev, pm_message_t state)
  spin_unlock(&the_controller->lock);

  if (connected > 0) {
-dev_info(&pdev->dev, "We have %d active connection%s. Do not
suspend.\n", connected, (connected == 1 ? "" : "s"));
+dev_info(&pdev->dev,
+ "We have %d active connection%s. Do not suspend.\n",
+ connected, (connected == 1 ? "" : "s"));
  ret =  -EBUSY;
  } else {
  dev_info(&pdev->dev, "suspend vhci_hcd");



Hm, I don't see checkpatch.pl complaints about these either in the
'usb-next' branch of Greg's tree.


   In fact, it does complain but says:

WARNING: quoted string split across lines

So, it looks like your patch is against the wrong tree.

WBR, Sergei

___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


[PATCH 2/2] coding style: fix line over 80 characters

2014-03-19 Thread Cédric Cabessa
Signed-off-by: Cédric Cabessa 
---
 drivers/staging/usbip/vhci_hcd.c | 33 ++---
 1 file changed, 22 insertions(+), 11 deletions(-)

diff --git a/drivers/staging/usbip/vhci_hcd.c b/drivers/staging/usbip/vhci_hcd.c
index f690668..1e84577 100644
--- a/drivers/staging/usbip/vhci_hcd.c
+++ b/drivers/staging/usbip/vhci_hcd.c
@@ -271,12 +271,14 @@ static int vhci_hub_control(struct usb_hcd *hcd, u16 
typeReq, u16 wValue,
}
break;
case USB_PORT_FEAT_POWER:
-   usbip_dbg_vhci_rh(" ClearPortFeature: 
USB_PORT_FEAT_POWER\n");
+   usbip_dbg_vhci_rh(
+   " ClearPortFeature: USB_PORT_FEAT_POWER\n");
dum->port_status[rhport] = 0;
dum->resuming = 0;
break;
case USB_PORT_FEAT_C_RESET:
-   usbip_dbg_vhci_rh(" ClearPortFeature: 
USB_PORT_FEAT_C_RESET\n");
+   usbip_dbg_vhci_rh(
+   " ClearPortFeature: USB_PORT_FEAT_C_RESET\n");
switch (dum->vdev[rhport].speed) {
case USB_SPEED_HIGH:
dum->port_status[rhport] |=
@@ -335,15 +337,17 @@ static int vhci_hub_control(struct usb_hcd *hcd, u16 
typeReq, u16 wValue,
 
if (dum->vdev[rhport].ud.status ==
VDEV_ST_NOTASSIGNED) {
-   usbip_dbg_vhci_rh(" enable rhport %d (status 
%u)\n",
- rhport,
- dum->vdev[rhport].ud.status);
+   usbip_dbg_vhci_rh(
+   " enable rhport %d (status %u)\n",
+   rhport,
+   dum->vdev[rhport].ud.status);
dum->port_status[rhport] |=
USB_PORT_STAT_ENABLE;
}
}
((__le16 *) buf)[0] = cpu_to_le16(dum->port_status[rhport]);
-   ((__le16 *) buf)[1] = cpu_to_le16(dum->port_status[rhport] >> 
16);
+   ((__le16 *) buf)[1] =
+   cpu_to_le16(dum->port_status[rhport] >> 16);
 
usbip_dbg_vhci_rh(" GetPortStatus bye %x %x\n", ((u16 *)buf)[0],
  ((u16 *)buf)[1]);
@@ -355,10 +359,12 @@ static int vhci_hub_control(struct usb_hcd *hcd, u16 
typeReq, u16 wValue,
case SetPortFeature:
switch (wValue) {
case USB_PORT_FEAT_SUSPEND:
-   usbip_dbg_vhci_rh(" SetPortFeature: 
USB_PORT_FEAT_SUSPEND\n");
+   usbip_dbg_vhci_rh(
+   " SetPortFeature: USB_PORT_FEAT_SUSPEND\n");
break;
case USB_PORT_FEAT_RESET:
-   usbip_dbg_vhci_rh(" SetPortFeature: 
USB_PORT_FEAT_RESET\n");
+   usbip_dbg_vhci_rh(
+   " SetPortFeature: USB_PORT_FEAT_RESET\n");
/* if it's already running, disconnect first */
if (dum->port_status[rhport] & USB_PORT_STAT_ENABLE) {
dum->port_status[rhport] &=
@@ -530,7 +536,8 @@ static int vhci_urb_enqueue(struct usb_hcd *hcd, struct urb 
*urb,
 
case USB_REQ_GET_DESCRIPTOR:
if (ctrlreq->wValue == cpu_to_le16(USB_DT_DEVICE << 8))
-   usbip_dbg_vhci_hc("Not yet?:Get_Descriptor to 
device 0 (get max pipe size)\n");
+   usbip_dbg_vhci_hc(
+   "Not yet?:Get_Descriptor to device 0 
(get max pipe size)\n");
 
if (vdev->udev)
usb_put_dev(vdev->udev);
@@ -539,7 +546,9 @@ static int vhci_urb_enqueue(struct usb_hcd *hcd, struct urb 
*urb,
 
default:
/* NOT REACHED */
-   dev_err(dev, "invalid request to devnum 0 bRequest %u, 
wValue %u\n", ctrlreq->bRequest,
+   dev_err(dev,
+   "invalid request to devnum 0 bRequest %u, 
wValue %u\n",
+   ctrlreq->bRequest,
ctrlreq->wValue);
ret =  -EINVAL;
goto no_need_xmit;
@@ -1060,7 +1069,9 @@ static int vhci_hcd_suspend(struct platform_device *pdev, 
pm_message_t state)
spin_unlock(&the_controller->lock);
 
if (connected > 0) {
-   dev_info(&pdev->dev, "We have %d active connection%s. Do not 
suspend.\n", connected, (connected == 1 ? "" : "s"));
+   dev_info(&pdev->dev,
+"We have %d active conn