Skip to contentSkip to conversation

staging: octeon-usb: line over 80 characters

PATCH In review Gokce Kuler 3 participants 3 messages Mar 25, 2020 – Mar 26, 2020 Staging

lore
Share & tools
lore
#0 lore raw

PATCH v2 1/1 staging: octeon-usb: line over 80 characters

Code readability increased for 80 character limit.

---
 drivers/staging/octeon-usb/octeon-hcd.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
drivers/staging/octeon-usb/octeon-hcd.c +3 -3
index dbafd46..de3b082 100644
@@ -2641,9 +2641,9 @@ static int cvmx_usb_poll_channel(struct octeon_hcd *usb, int channel)
 						     hcintmsk.u32);
 				usbc_hcchar.s.chdis = 1;
 				cvmx_usb_write_csr32(usb,
-						     CVMX_USBCX_HCCHARX(
-						     channel, usb->index),
-						     usbc_hcchar.u32);
+						CVMX_USBCX_HCCHARX(channel,
+						       	usb->index),
+						usbc_hcchar.u32);
 				return 0;
 			} else if (usbc_hcint.s.xfercompl) {
 				/*
Signature · 1 line
2.7.4
#1 lore raw

drivers/staging/octeon-usb/octeon-hcd.c static int cvmx_usb_poll_channel(struct octeon_hcd *usb, int channel) · line 2646

Quoted 10 lines · Gokce Kuler
drivers/staging/octeon-usb/octeon-hcd.c +3 -3
@@ -2641,9 +2641,9 @@ static int cvmx_usb_poll_channel(struct octeon_hcd *usb, int channel)
  						     hcintmsk.u32);
  				usbc_hcchar.s.chdis = 1;
  				cvmx_usb_write_csr32(usb,
-						     CVMX_USBCX_HCCHARX(
-						     channel, usb->index),
-						     usbc_hcchar.u32);
+						CVMX_USBCX_HCCHARX(channel,
+						       	usb->index),
+						usbc_hcchar.u32);

This v2 patch is a diff from the v1. Right?
You should fix the v1 commit and generate the patch so that the diff is from the original code (I mean, the one prior to v1 change).

Could you please check?

Also, am not able to tell from the diff - please make sure the parameters are aligned with the previous line.

    cvmx_usb_write_csr32(usb,
                         CVMX_USBCX_HCCHARX(channel,
                                            usb->index),
                         usbc_hcchar.u32);

If I am not mistaken, that's the coding style followed now.

thanks,
-lakshmi

maintainer
#2 lore raw
In reply to Gokce Kuler
Quoted 6 lines · Gokce Kuler

Code readability increased for 80 character limit.

---
 drivers/staging/octeon-usb/octeon-hcd.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

What changed from v1? Always put that below the --- line

Quoted 6 lines
drivers/staging/octeon-usb/octeon-hcd.c +0 -0
index dbafd46..de3b082 100644

drivers/staging/octeon-usb/octeon-hcd.c static int cvmx_usb_poll_channel(struct octeon_hcd *usb, int channel) · line 2646

Quoted 9 lines
drivers/staging/octeon-usb/octeon-hcd.c +3 -3
@@ -2641,9 +2641,9 @@ static int cvmx_usb_poll_channel(struct octeon_hcd *usb, int channel)
 						     hcintmsk.u32);
 				usbc_hcchar.s.chdis = 1;
 				cvmx_usb_write_csr32(usb,
-						     CVMX_USBCX_HCCHARX(
-						     channel, usb->index),
-						     usbc_hcchar.u32);
+						CVMX_USBCX_HCCHARX(channel,
+						       	usb->index),
+						usbc_hcchar.u32);

No, that is harder to read now, you can try to get closer, but I would just leave this alone for now as many people keep messing with it :)

thanks,

greg k-h