linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] staging: octeon: Fix checkpatch warning
@ 2014-11-25 13:26 Luis de Bethencourt
  2014-11-26 21:45 ` Greg KH
  0 siblings, 1 reply; 5+ messages in thread
From: Luis de Bethencourt @ 2014-11-25 13:26 UTC (permalink / raw)
  To: linux-kernel; +Cc: gregkh, eunb.song, gulsah.1004, paul.gortmaker, devel

This patch fixes the checkpatch.pl warnings:

WARNING: line over 80 characters
+                       int cores_in_use = core_state.baseline_cores - atomic_read(&core_state.available_cores);

WARNING: line over 80 characters
+                       skb->data = skb->head + work->packet_ptr.s.addr - cvmx_ptr_to_phys(skb->head);

Signed-off-by: Luis de Bethencourt <luis@debethencourt.com>
---
 drivers/staging/octeon/ethernet-rx.c | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/drivers/staging/octeon/ethernet-rx.c b/drivers/staging/octeon/ethernet-rx.c
index 44e372f..bd83f55 100644
--- a/drivers/staging/octeon/ethernet-rx.c
+++ b/drivers/staging/octeon/ethernet-rx.c
@@ -295,7 +295,8 @@ static int cvm_oct_napi_poll(struct napi_struct *napi, int budget)
 			 */
 			union cvmx_pow_wq_int_cntx counts;
 			int backlog;
-			int cores_in_use = core_state.baseline_cores - atomic_read(&core_state.available_cores);
+			int cores_in_use = core_state.baseline_cores -
+				atomic_read(&core_state.available_cores);
 			counts.u64 = cvmx_read_csr(CVMX_POW_WQ_INT_CNTX(pow_receive_group));
 			backlog = counts.s.iq_cnt + counts.s.ds_cnt;
 			if (backlog > budget * cores_in_use && napi != NULL)
@@ -324,7 +325,8 @@ static int cvm_oct_napi_poll(struct napi_struct *napi, int budget)
 		 * buffer.
 		 */
 		if (likely(skb_in_hw)) {
-			skb->data = skb->head + work->packet_ptr.s.addr - cvmx_ptr_to_phys(skb->head);
+			skb->data = skb->head + work->packet_ptr.s.addr -
+				cvmx_ptr_to_phys(skb->head);
 			prefetch(skb->data);
 			skb->len = work->len;
 			skb_set_tail_pointer(skb, skb->len);
-- 
2.1.3


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

* Re: [PATCH] staging: octeon: Fix checkpatch warning
  2014-11-25 13:26 [PATCH] staging: octeon: Fix checkpatch warning Luis de Bethencourt
@ 2014-11-26 21:45 ` Greg KH
  2014-11-27  0:35   ` Luis de Bethencourt
  0 siblings, 1 reply; 5+ messages in thread
From: Greg KH @ 2014-11-26 21:45 UTC (permalink / raw)
  To: Luis de Bethencourt
  Cc: linux-kernel, eunb.song, gulsah.1004, paul.gortmaker, devel

On Tue, Nov 25, 2014 at 01:26:14PM +0000, Luis de Bethencourt wrote:
> This patch fixes the checkpatch.pl warnings:
> 
> WARNING: line over 80 characters
> +                       int cores_in_use = core_state.baseline_cores - atomic_read(&core_state.available_cores);
> 
> WARNING: line over 80 characters
> +                       skb->data = skb->head + work->packet_ptr.s.addr - cvmx_ptr_to_phys(skb->head);
> 
> Signed-off-by: Luis de Bethencourt <luis@debethencourt.com>
> ---
>  drivers/staging/octeon/ethernet-rx.c | 6 ++++--
>  1 file changed, 4 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/staging/octeon/ethernet-rx.c b/drivers/staging/octeon/ethernet-rx.c
> index 44e372f..bd83f55 100644
> --- a/drivers/staging/octeon/ethernet-rx.c
> +++ b/drivers/staging/octeon/ethernet-rx.c
> @@ -295,7 +295,8 @@ static int cvm_oct_napi_poll(struct napi_struct *napi, int budget)
>  			 */
>  			union cvmx_pow_wq_int_cntx counts;
>  			int backlog;
> -			int cores_in_use = core_state.baseline_cores - atomic_read(&core_state.available_cores);
> +			int cores_in_use = core_state.baseline_cores -
> +				atomic_read(&core_state.available_cores);
>  			counts.u64 = cvmx_read_csr(CVMX_POW_WQ_INT_CNTX(pow_receive_group));
>  			backlog = counts.s.iq_cnt + counts.s.ds_cnt;
>  			if (backlog > budget * cores_in_use && napi != NULL)
> @@ -324,7 +325,8 @@ static int cvm_oct_napi_poll(struct napi_struct *napi, int budget)
>  		 * buffer.
>  		 */
>  		if (likely(skb_in_hw)) {
> -			skb->data = skb->head + work->packet_ptr.s.addr - cvmx_ptr_to_phys(skb->head);
> +			skb->data = skb->head + work->packet_ptr.s.addr -
> +				cvmx_ptr_to_phys(skb->head);
>  			prefetch(skb->data);
>  			skb->len = work->len;
>  			skb_set_tail_pointer(skb, skb->len);
> -- 
> 2.1.3

No longer applies to my tree :(

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

* Re: [PATCH] staging: octeon: Fix checkpatch warning
  2014-11-26 21:45 ` Greg KH
@ 2014-11-27  0:35   ` Luis de Bethencourt
  2014-11-27  2:34     ` Greg KH
  0 siblings, 1 reply; 5+ messages in thread
From: Luis de Bethencourt @ 2014-11-27  0:35 UTC (permalink / raw)
  To: Greg KH; +Cc: linux-kernel, eunb.song, gulsah.1004, paul.gortmaker, devel

On Wed, Nov 26, 2014 at 01:45:23PM -0800, Greg KH wrote:
> On Tue, Nov 25, 2014 at 01:26:14PM +0000, Luis de Bethencourt wrote:
> > This patch fixes the checkpatch.pl warnings:
> > 
> > WARNING: line over 80 characters
> > +                       int cores_in_use = core_state.baseline_cores - atomic_read(&core_state.available_cores);
> > 
> > WARNING: line over 80 characters
> > +                       skb->data = skb->head + work->packet_ptr.s.addr - cvmx_ptr_to_phys(skb->head);
> > 
> > Signed-off-by: Luis de Bethencourt <luis@debethencourt.com>
> > ---
> >  drivers/staging/octeon/ethernet-rx.c | 6 ++++--
> >  1 file changed, 4 insertions(+), 2 deletions(-)
> > 
> > diff --git a/drivers/staging/octeon/ethernet-rx.c b/drivers/staging/octeon/ethernet-rx.c
> > index 44e372f..bd83f55 100644
> > --- a/drivers/staging/octeon/ethernet-rx.c
> > +++ b/drivers/staging/octeon/ethernet-rx.c
> > @@ -295,7 +295,8 @@ static int cvm_oct_napi_poll(struct napi_struct *napi, int budget)
> >  			 */
> >  			union cvmx_pow_wq_int_cntx counts;
> >  			int backlog;
> > -			int cores_in_use = core_state.baseline_cores - atomic_read(&core_state.available_cores);
> > +			int cores_in_use = core_state.baseline_cores -
> > +				atomic_read(&core_state.available_cores);
> >  			counts.u64 = cvmx_read_csr(CVMX_POW_WQ_INT_CNTX(pow_receive_group));
> >  			backlog = counts.s.iq_cnt + counts.s.ds_cnt;
> >  			if (backlog > budget * cores_in_use && napi != NULL)
> > @@ -324,7 +325,8 @@ static int cvm_oct_napi_poll(struct napi_struct *napi, int budget)
> >  		 * buffer.
> >  		 */
> >  		if (likely(skb_in_hw)) {
> > -			skb->data = skb->head + work->packet_ptr.s.addr - cvmx_ptr_to_phys(skb->head);
> > +			skb->data = skb->head + work->packet_ptr.s.addr -
> > +				cvmx_ptr_to_phys(skb->head);
> >  			prefetch(skb->data);
> >  			skb->len = work->len;
> >  			skb_set_tail_pointer(skb, skb->len);
> > -- 
> > 2.1.3
> 
> No longer applies to my tree :(

I'm confused.

I just tried applying it to what I think is your tree is and it worked.
https://git.kernel.org/cgit/linux/kernel/git/gregkh/staging.git/log/?h=staging-next

Do I have this wrong?

Sorry :(

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

* Re: [PATCH] staging: octeon: Fix checkpatch warning
  2014-11-27  0:35   ` Luis de Bethencourt
@ 2014-11-27  2:34     ` Greg KH
  2014-11-27 15:18       ` Luis de Bethencourt
  0 siblings, 1 reply; 5+ messages in thread
From: Greg KH @ 2014-11-27  2:34 UTC (permalink / raw)
  To: Luis de Bethencourt
  Cc: linux-kernel, eunb.song, gulsah.1004, paul.gortmaker, devel

On Thu, Nov 27, 2014 at 12:35:23AM +0000, Luis de Bethencourt wrote:
> On Wed, Nov 26, 2014 at 01:45:23PM -0800, Greg KH wrote:
> > On Tue, Nov 25, 2014 at 01:26:14PM +0000, Luis de Bethencourt wrote:
> > > This patch fixes the checkpatch.pl warnings:
> > > 
> > > WARNING: line over 80 characters
> > > +                       int cores_in_use = core_state.baseline_cores - atomic_read(&core_state.available_cores);
> > > 
> > > WARNING: line over 80 characters
> > > +                       skb->data = skb->head + work->packet_ptr.s.addr - cvmx_ptr_to_phys(skb->head);
> > > 
> > > Signed-off-by: Luis de Bethencourt <luis@debethencourt.com>
> > > ---
> > >  drivers/staging/octeon/ethernet-rx.c | 6 ++++--
> > >  1 file changed, 4 insertions(+), 2 deletions(-)
> > > 
> > > diff --git a/drivers/staging/octeon/ethernet-rx.c b/drivers/staging/octeon/ethernet-rx.c
> > > index 44e372f..bd83f55 100644
> > > --- a/drivers/staging/octeon/ethernet-rx.c
> > > +++ b/drivers/staging/octeon/ethernet-rx.c
> > > @@ -295,7 +295,8 @@ static int cvm_oct_napi_poll(struct napi_struct *napi, int budget)
> > >  			 */
> > >  			union cvmx_pow_wq_int_cntx counts;
> > >  			int backlog;
> > > -			int cores_in_use = core_state.baseline_cores - atomic_read(&core_state.available_cores);
> > > +			int cores_in_use = core_state.baseline_cores -
> > > +				atomic_read(&core_state.available_cores);
> > >  			counts.u64 = cvmx_read_csr(CVMX_POW_WQ_INT_CNTX(pow_receive_group));
> > >  			backlog = counts.s.iq_cnt + counts.s.ds_cnt;
> > >  			if (backlog > budget * cores_in_use && napi != NULL)
> > > @@ -324,7 +325,8 @@ static int cvm_oct_napi_poll(struct napi_struct *napi, int budget)
> > >  		 * buffer.
> > >  		 */
> > >  		if (likely(skb_in_hw)) {
> > > -			skb->data = skb->head + work->packet_ptr.s.addr - cvmx_ptr_to_phys(skb->head);
> > > +			skb->data = skb->head + work->packet_ptr.s.addr -
> > > +				cvmx_ptr_to_phys(skb->head);
> > >  			prefetch(skb->data);
> > >  			skb->len = work->len;
> > >  			skb_set_tail_pointer(skb, skb->len);
> > > -- 
> > > 2.1.3
> > 
> > No longer applies to my tree :(
> 
> I'm confused.
> 
> I just tried applying it to what I think is your tree is and it worked.
> https://git.kernel.org/cgit/linux/kernel/git/gregkh/staging.git/log/?h=staging-next
> 
> Do I have this wrong?

I'm applying patches first to staging-testing to get some 0-day buildbot
testing before merging them to staging-next these days, as I've been
burned with common problems too many times.  I took some other octeon
patches that were sent before yours were that caused the conflict.  If
you look at staging-testing right now you can see that.

Hope this helps,

greg k-h

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

* Re: [PATCH] staging: octeon: Fix checkpatch warning
  2014-11-27  2:34     ` Greg KH
@ 2014-11-27 15:18       ` Luis de Bethencourt
  0 siblings, 0 replies; 5+ messages in thread
From: Luis de Bethencourt @ 2014-11-27 15:18 UTC (permalink / raw)
  To: Greg KH; +Cc: linux-kernel, eunb.song, gulsah.1004, paul.gortmaker, devel

On Wed, Nov 26, 2014 at 06:34:10PM -0800, Greg KH wrote:
> On Thu, Nov 27, 2014 at 12:35:23AM +0000, Luis de Bethencourt wrote:
> > On Wed, Nov 26, 2014 at 01:45:23PM -0800, Greg KH wrote:
> > > On Tue, Nov 25, 2014 at 01:26:14PM +0000, Luis de Bethencourt wrote:
> > > > This patch fixes the checkpatch.pl warnings:
> > > > 
> > > > WARNING: line over 80 characters
> > > > +                       int cores_in_use = core_state.baseline_cores - atomic_read(&core_state.available_cores);
> > > > 
> > > > WARNING: line over 80 characters
> > > > +                       skb->data = skb->head + work->packet_ptr.s.addr - cvmx_ptr_to_phys(skb->head);
> > > > 
> > > > Signed-off-by: Luis de Bethencourt <luis@debethencourt.com>
> > > > ---
> > > >  drivers/staging/octeon/ethernet-rx.c | 6 ++++--
> > > >  1 file changed, 4 insertions(+), 2 deletions(-)
> > > > 
> > > > diff --git a/drivers/staging/octeon/ethernet-rx.c b/drivers/staging/octeon/ethernet-rx.c
> > > > index 44e372f..bd83f55 100644
> > > > --- a/drivers/staging/octeon/ethernet-rx.c
> > > > +++ b/drivers/staging/octeon/ethernet-rx.c
> > > > @@ -295,7 +295,8 @@ static int cvm_oct_napi_poll(struct napi_struct *napi, int budget)
> > > >  			 */
> > > >  			union cvmx_pow_wq_int_cntx counts;
> > > >  			int backlog;
> > > > -			int cores_in_use = core_state.baseline_cores - atomic_read(&core_state.available_cores);
> > > > +			int cores_in_use = core_state.baseline_cores -
> > > > +				atomic_read(&core_state.available_cores);
> > > >  			counts.u64 = cvmx_read_csr(CVMX_POW_WQ_INT_CNTX(pow_receive_group));
> > > >  			backlog = counts.s.iq_cnt + counts.s.ds_cnt;
> > > >  			if (backlog > budget * cores_in_use && napi != NULL)
> > > > @@ -324,7 +325,8 @@ static int cvm_oct_napi_poll(struct napi_struct *napi, int budget)
> > > >  		 * buffer.
> > > >  		 */
> > > >  		if (likely(skb_in_hw)) {
> > > > -			skb->data = skb->head + work->packet_ptr.s.addr - cvmx_ptr_to_phys(skb->head);
> > > > +			skb->data = skb->head + work->packet_ptr.s.addr -
> > > > +				cvmx_ptr_to_phys(skb->head);
> > > >  			prefetch(skb->data);
> > > >  			skb->len = work->len;
> > > >  			skb_set_tail_pointer(skb, skb->len);
> > > > -- 
> > > > 2.1.3
> > > 
> > > No longer applies to my tree :(
> > 
> > I'm confused.
> > 
> > I just tried applying it to what I think is your tree is and it worked.
> > https://git.kernel.org/cgit/linux/kernel/git/gregkh/staging.git/log/?h=staging-next
> > 
> > Do I have this wrong?
> 
> I'm applying patches first to staging-testing to get some 0-day buildbot
> testing before merging them to staging-next these days, as I've been
> burned with common problems too many times.  I took some other octeon
> patches that were sent before yours were that caused the conflict.  If
> you look at staging-testing right now you can see that.
> 
> Hope this helps,
> 
> greg k-h

This is very helpful!

I am about to send a new version of the patch, this time against staging-test.
Thanks for the time to explain this, and sorry about the previos patch not
applying.

Luis

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

end of thread, other threads:[~2014-11-27 15:18 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-11-25 13:26 [PATCH] staging: octeon: Fix checkpatch warning Luis de Bethencourt
2014-11-26 21:45 ` Greg KH
2014-11-27  0:35   ` Luis de Bethencourt
2014-11-27  2:34     ` Greg KH
2014-11-27 15:18       ` Luis de Bethencourt

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).