All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1/4] Staging: octeon-usb: Adds SPDX License Identifier
       [not found] <20180724222212.8742-1-tsotsos@gmail.com>
@ 2018-07-24 22:22 ` Georgios Tsotsos
  2018-07-25  7:40   ` Greg Kroah-Hartman
  2018-07-24 22:22 ` [PATCH 2/4] Staging: octeon-usb: Applying coding style for column width Georgios Tsotsos
                   ` (4 subsequent siblings)
  5 siblings, 1 reply; 11+ messages in thread
From: Georgios Tsotsos @ 2018-07-24 22:22 UTC (permalink / raw)
  To: Greg Kroah-Hartman
  Cc: Georgios Tsotsos, Aaro Koskinen, James Hogan, devel, linux-kernel

Signed-off-by: Georgios Tsotsos <tsotsos@gmail.com>
---
 drivers/staging/octeon-usb/octeon-hcd.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/staging/octeon-usb/octeon-hcd.c b/drivers/staging/octeon-usb/octeon-hcd.c
index cded30f145aa..cff5e790b196 100644
--- a/drivers/staging/octeon-usb/octeon-hcd.c
+++ b/drivers/staging/octeon-usb/octeon-hcd.c
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * This file is subject to the terms and conditions of the GNU General Public
  * License.  See the file "COPYING" in the main directory of this archive
-- 
2.16.4


^ permalink raw reply related	[flat|nested] 11+ messages in thread

* [PATCH 2/4] Staging: octeon-usb: Applying coding style for column width.
       [not found] <20180724222212.8742-1-tsotsos@gmail.com>
  2018-07-24 22:22 ` [PATCH 1/4] Staging: octeon-usb: Adds SPDX License Identifier Georgios Tsotsos
@ 2018-07-24 22:22 ` Georgios Tsotsos
  2018-07-25  1:22   ` Joe Perches
  2018-07-24 22:22 ` [PATCH 3/4] Staging: octeon-usb: Change coding style for CVMX_WAIT_FOR_FIELD32 marco Georgios Tsotsos
                   ` (3 subsequent siblings)
  5 siblings, 1 reply; 11+ messages in thread
From: Georgios Tsotsos @ 2018-07-24 22:22 UTC (permalink / raw)
  To: Greg Kroah-Hartman
  Cc: Georgios Tsotsos, Aaro Koskinen, James Hogan, devel, linux-kernel

This patch resolves the warnings as its refereed to TODO list.
There are also a code style issues that could be resolved via breaking
down cvmx_usb_poll_channel().

Signed-off-by: Georgios Tsotsos <tsotsos@gmail.com>
---
 drivers/staging/octeon-usb/octeon-hcd.c | 10 ++++++----
 1 file changed, 6 insertions(+), 4 deletions(-)

diff --git a/drivers/staging/octeon-usb/octeon-hcd.c b/drivers/staging/octeon-usb/octeon-hcd.c
index cff5e790b196..0d3ec12788fc 100644
--- a/drivers/staging/octeon-usb/octeon-hcd.c
+++ b/drivers/staging/octeon-usb/octeon-hcd.c
@@ -2637,12 +2637,14 @@ static int cvmx_usb_poll_channel(struct octeon_hcd *usb, int channel)
 				hcintmsk.u32 = 0;
 				hcintmsk.s.chhltdmsk = 1;
 				cvmx_usb_write_csr32(usb,
-						     CVMX_USBCX_HCINTMSKX(channel, usb->index),
-						     hcintmsk.u32);
+						CVMX_USBCX_HCINTMSKX(channel,
+							usb->index),
+							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) {
 				/*
-- 
2.16.4


^ permalink raw reply related	[flat|nested] 11+ messages in thread

* [PATCH 3/4] Staging: octeon-usb: Change coding style for CVMX_WAIT_FOR_FIELD32 marco.
       [not found] <20180724222212.8742-1-tsotsos@gmail.com>
  2018-07-24 22:22 ` [PATCH 1/4] Staging: octeon-usb: Adds SPDX License Identifier Georgios Tsotsos
  2018-07-24 22:22 ` [PATCH 2/4] Staging: octeon-usb: Applying coding style for column width Georgios Tsotsos
@ 2018-07-24 22:22 ` Georgios Tsotsos
  2018-07-24 22:22 ` [PATCH 4/4] Staging: octeon-usb: Adds SPDX License Identifier for header file Georgios Tsotsos
                   ` (2 subsequent siblings)
  5 siblings, 0 replies; 11+ messages in thread
From: Georgios Tsotsos @ 2018-07-24 22:22 UTC (permalink / raw)
  To: Greg Kroah-Hartman
  Cc: Georgios Tsotsos, Aaro Koskinen, James Hogan, devel, linux-kernel

Changes coding style and encapsulate into parentheses timeout_usec.

Signed-off-by: Georgios Tsotsos <tsotsos@gmail.com>
---
 drivers/staging/octeon-usb/octeon-hcd.c | 44 +++++++++++++++++----------------
 1 file changed, 23 insertions(+), 21 deletions(-)

diff --git a/drivers/staging/octeon-usb/octeon-hcd.c b/drivers/staging/octeon-usb/octeon-hcd.c
index 0d3ec12788fc..84986252720d 100644
--- a/drivers/staging/octeon-usb/octeon-hcd.c
+++ b/drivers/staging/octeon-usb/octeon-hcd.c
@@ -378,27 +378,29 @@ struct octeon_hcd {
 };
 
 /* This macro spins on a register waiting for it to reach a condition. */
-#define CVMX_WAIT_FOR_FIELD32(address, _union, cond, timeout_usec)	    \
-	({int result;							    \
-	do {								    \
-		u64 done = cvmx_get_cycle() + (u64)timeout_usec *	    \
-			   octeon_get_clock_rate() / 1000000;		    \
-		union _union c;						    \
-									    \
-		while (1) {						    \
-			c.u32 = cvmx_usb_read_csr32(usb, address);	    \
-									    \
-			if (cond) {					    \
-				result = 0;				    \
-				break;					    \
-			} else if (cvmx_get_cycle() > done) {		    \
-				result = -1;				    \
-				break;					    \
-			} else						    \
-				__delay(100);				    \
-		}							    \
-	} while (0);							    \
-	result; })
+#define CVMX_WAIT_FOR_FIELD32(address, _union, cond, timeout_usec)	\
+({									\
+	int result;							\
+	do {								\
+		u64 done = cvmx_get_cycle() + (u64)(timeout_usec) *	\
+			   octeon_get_clock_rate() / 1000000;		\
+		union _union c;						\
+									\
+		while (1) {						\
+			c.u32 = cvmx_usb_read_csr32(usb, address);	\
+									\
+			if (cond) {					\
+				result = 0;				\
+				break;					\
+			} else if (cvmx_get_cycle() > done) {		\
+				result = -1;				\
+				break;					\
+			} else						\
+				__delay(100);				\
+		}							\
+	} while (0);							\
+	result;								\
+})
 
 /*
  * This macro logically sets a single field in a CSR. It does the sequence
-- 
2.16.4


^ permalink raw reply related	[flat|nested] 11+ messages in thread

* [PATCH 4/4] Staging: octeon-usb: Adds SPDX License Identifier for header file
       [not found] <20180724222212.8742-1-tsotsos@gmail.com>
                   ` (2 preceding siblings ...)
  2018-07-24 22:22 ` [PATCH 3/4] Staging: octeon-usb: Change coding style for CVMX_WAIT_FOR_FIELD32 marco Georgios Tsotsos
@ 2018-07-24 22:22 ` Georgios Tsotsos
  2018-07-25  7:40   ` Greg Kroah-Hartman
  2018-07-24 22:22 ` [PATCH 4/4] Staging: octeon-usb: Adds SPDX License Identifier Georgios Tsotsos
  2018-07-25  7:39 ` your mail Greg Kroah-Hartman
  5 siblings, 1 reply; 11+ messages in thread
From: Georgios Tsotsos @ 2018-07-24 22:22 UTC (permalink / raw)
  To: Greg Kroah-Hartman
  Cc: Georgios Tsotsos, Aaro Koskinen, James Hogan, devel, linux-kernel

Signed-off-by: Georgios Tsotsos <tsotsos@gmail.com>
---
 drivers/staging/octeon-usb/octeon-hcd.h | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/staging/octeon-usb/octeon-hcd.h b/drivers/staging/octeon-usb/octeon-hcd.h
index 3353aefe662e..769c36cf6614 100644
--- a/drivers/staging/octeon-usb/octeon-hcd.h
+++ b/drivers/staging/octeon-usb/octeon-hcd.h
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * Octeon HCD hardware register definitions.
  *
-- 
2.16.4


^ permalink raw reply related	[flat|nested] 11+ messages in thread

* [PATCH 4/4] Staging: octeon-usb: Adds SPDX License Identifier
       [not found] <20180724222212.8742-1-tsotsos@gmail.com>
                   ` (3 preceding siblings ...)
  2018-07-24 22:22 ` [PATCH 4/4] Staging: octeon-usb: Adds SPDX License Identifier for header file Georgios Tsotsos
@ 2018-07-24 22:22 ` Georgios Tsotsos
  2018-07-25  7:40   ` Greg Kroah-Hartman
  2018-07-25  7:39 ` your mail Greg Kroah-Hartman
  5 siblings, 1 reply; 11+ messages in thread
From: Georgios Tsotsos @ 2018-07-24 22:22 UTC (permalink / raw)
  To: Greg Kroah-Hartman
  Cc: Georgios Tsotsos, Aaro Koskinen, James Hogan, devel, linux-kernel

Signed-off-by: Georgios Tsotsos <tsotsos@gmail.com>
---
 drivers/staging/octeon-usb/octeon-hcd.h | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/staging/octeon-usb/octeon-hcd.h b/drivers/staging/octeon-usb/octeon-hcd.h
index 3353aefe662e..769c36cf6614 100644
--- a/drivers/staging/octeon-usb/octeon-hcd.h
+++ b/drivers/staging/octeon-usb/octeon-hcd.h
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * Octeon HCD hardware register definitions.
  *
-- 
2.16.4


^ permalink raw reply related	[flat|nested] 11+ messages in thread

* Re: [PATCH 2/4] Staging: octeon-usb: Applying coding style for column width.
  2018-07-24 22:22 ` [PATCH 2/4] Staging: octeon-usb: Applying coding style for column width Georgios Tsotsos
@ 2018-07-25  1:22   ` Joe Perches
  0 siblings, 0 replies; 11+ messages in thread
From: Joe Perches @ 2018-07-25  1:22 UTC (permalink / raw)
  To: Georgios Tsotsos, Greg Kroah-Hartman
  Cc: Aaro Koskinen, James Hogan, devel, linux-kernel

On Wed, 2018-07-25 at 01:22 +0300, Georgios Tsotsos wrote:
> This patch resolves the warnings as its refereed to TODO list.
> There are also a code style issues that could be resolved via breaking
> down cvmx_usb_poll_channel().

It was better before this change.

If checkpatch caused you to produce this, please
know that checkpatch messages are not dicta and
do not need to be followed if the resultant code
is worse to read.

More likely, it could be nicer to use a separate
function for this block instead.

> Signed-off-by: Georgios Tsotsos <tsotsos@gmail.com>
> ---
>  drivers/staging/octeon-usb/octeon-hcd.c | 10 ++++++----
>  1 file changed, 6 insertions(+), 4 deletions(-)
> 
> diff --git a/drivers/staging/octeon-usb/octeon-hcd.c b/drivers/staging/octeon-usb/octeon-hcd.c
> index cff5e790b196..0d3ec12788fc 100644
> --- a/drivers/staging/octeon-usb/octeon-hcd.c
> +++ b/drivers/staging/octeon-usb/octeon-hcd.c
> @@ -2637,12 +2637,14 @@ static int cvmx_usb_poll_channel(struct octeon_hcd *usb, int channel)
>  				hcintmsk.u32 = 0;
>  				hcintmsk.s.chhltdmsk = 1;
>  				cvmx_usb_write_csr32(usb,
> -						     CVMX_USBCX_HCINTMSKX(channel, usb->index),
> -						     hcintmsk.u32);
> +						CVMX_USBCX_HCINTMSKX(channel,
> +							usb->index),
> +							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) {
>  				/*

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: your mail
       [not found] <20180724222212.8742-1-tsotsos@gmail.com>
                   ` (4 preceding siblings ...)
  2018-07-24 22:22 ` [PATCH 4/4] Staging: octeon-usb: Adds SPDX License Identifier Georgios Tsotsos
@ 2018-07-25  7:39 ` Greg Kroah-Hartman
  5 siblings, 0 replies; 11+ messages in thread
From: Greg Kroah-Hartman @ 2018-07-25  7:39 UTC (permalink / raw)
  To: Georgios Tsotsos; +Cc: devel, James Hogan, linux-kernel, Aaro Koskinen

On Wed, Jul 25, 2018 at 01:22:07AM +0300, Georgios Tsotsos wrote:
> Date: Wed, 25 Jul 2018 01:18:58 +0300
> Subject: [PATCH 0/4] Staging: octeon-usb: Fixes and Coding style applied. 
> 
> Hello, 

Somehow your subject here got messed up and put in the bod of the email.
Not a big deal this time, but be more careful next time please.

thanks,

greg k-h

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [PATCH 4/4] Staging: octeon-usb: Adds SPDX License Identifier for header file
  2018-07-24 22:22 ` [PATCH 4/4] Staging: octeon-usb: Adds SPDX License Identifier for header file Georgios Tsotsos
@ 2018-07-25  7:40   ` Greg Kroah-Hartman
  0 siblings, 0 replies; 11+ messages in thread
From: Greg Kroah-Hartman @ 2018-07-25  7:40 UTC (permalink / raw)
  To: Georgios Tsotsos; +Cc: devel, James Hogan, linux-kernel, Aaro Koskinen

On Wed, Jul 25, 2018 at 01:22:11AM +0300, Georgios Tsotsos wrote:
> Signed-off-by: Georgios Tsotsos <tsotsos@gmail.com>
> ---

I can not take patches without any changelog text, sorry :(


^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [PATCH 4/4] Staging: octeon-usb: Adds SPDX License Identifier
  2018-07-24 22:22 ` [PATCH 4/4] Staging: octeon-usb: Adds SPDX License Identifier Georgios Tsotsos
@ 2018-07-25  7:40   ` Greg Kroah-Hartman
  0 siblings, 0 replies; 11+ messages in thread
From: Greg Kroah-Hartman @ 2018-07-25  7:40 UTC (permalink / raw)
  To: Georgios Tsotsos; +Cc: devel, James Hogan, linux-kernel, Aaro Koskinen

On Wed, Jul 25, 2018 at 01:22:12AM +0300, Georgios Tsotsos wrote:
> Signed-off-by: Georgios Tsotsos <tsotsos@gmail.com>
> ---
>  drivers/staging/octeon-usb/octeon-hcd.h | 1 +
>  1 file changed, 1 insertion(+)

Two different 4/4 patches in the same series?  How did you create these?

greg k-h

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [PATCH 1/4] Staging: octeon-usb: Adds SPDX License Identifier
  2018-07-24 22:22 ` [PATCH 1/4] Staging: octeon-usb: Adds SPDX License Identifier Georgios Tsotsos
@ 2018-07-25  7:40   ` Greg Kroah-Hartman
  0 siblings, 0 replies; 11+ messages in thread
From: Greg Kroah-Hartman @ 2018-07-25  7:40 UTC (permalink / raw)
  To: Georgios Tsotsos; +Cc: devel, James Hogan, linux-kernel, Aaro Koskinen

On Wed, Jul 25, 2018 at 01:22:08AM +0300, Georgios Tsotsos wrote:
> Signed-off-by: Georgios Tsotsos <tsotsos@gmail.com>
> ---
>  drivers/staging/octeon-usb/octeon-hcd.c | 1 +
>  1 file changed, 1 insertion(+)

Again, no changelog :(

Please fix this series up and resend.

thanks,

greg k-h

^ permalink raw reply	[flat|nested] 11+ messages in thread

* [PATCH 1/4] Staging: octeon-usb: Adds SPDX License Identifier
  2018-07-24 22:38 [PATCH 0/4] Staging: octeon-usb: Fixes and Coding style applied Georgios Tsotsos
@ 2018-07-24 22:38 ` Georgios Tsotsos
  0 siblings, 0 replies; 11+ messages in thread
From: Georgios Tsotsos @ 2018-07-24 22:38 UTC (permalink / raw)
  To: Greg Kroah-Hartman
  Cc: Georgios Tsotsos, Aaro Koskinen, James Hogan, devel, linux-kernel

Signed-off-by: Georgios Tsotsos <tsotsos@gmail.com>
---
 drivers/staging/octeon-usb/octeon-hcd.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/staging/octeon-usb/octeon-hcd.c b/drivers/staging/octeon-usb/octeon-hcd.c
index cded30f145aa..cff5e790b196 100644
--- a/drivers/staging/octeon-usb/octeon-hcd.c
+++ b/drivers/staging/octeon-usb/octeon-hcd.c
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * This file is subject to the terms and conditions of the GNU General Public
  * License.  See the file "COPYING" in the main directory of this archive
-- 
2.16.4


^ permalink raw reply related	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2018-07-25  7:40 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <20180724222212.8742-1-tsotsos@gmail.com>
2018-07-24 22:22 ` [PATCH 1/4] Staging: octeon-usb: Adds SPDX License Identifier Georgios Tsotsos
2018-07-25  7:40   ` Greg Kroah-Hartman
2018-07-24 22:22 ` [PATCH 2/4] Staging: octeon-usb: Applying coding style for column width Georgios Tsotsos
2018-07-25  1:22   ` Joe Perches
2018-07-24 22:22 ` [PATCH 3/4] Staging: octeon-usb: Change coding style for CVMX_WAIT_FOR_FIELD32 marco Georgios Tsotsos
2018-07-24 22:22 ` [PATCH 4/4] Staging: octeon-usb: Adds SPDX License Identifier for header file Georgios Tsotsos
2018-07-25  7:40   ` Greg Kroah-Hartman
2018-07-24 22:22 ` [PATCH 4/4] Staging: octeon-usb: Adds SPDX License Identifier Georgios Tsotsos
2018-07-25  7:40   ` Greg Kroah-Hartman
2018-07-25  7:39 ` your mail Greg Kroah-Hartman
2018-07-24 22:38 [PATCH 0/4] Staging: octeon-usb: Fixes and Coding style applied Georgios Tsotsos
2018-07-24 22:38 ` [PATCH 1/4] Staging: octeon-usb: Adds SPDX License Identifier Georgios Tsotsos

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.