Skip to contentSkip to conversation

staging: octeon: Fix checkpatch warning

PATCH Superseded Luis de Bethencourt 2 participants 5 messages Nov 25, 2014 – Nov 27, 2014 Staging

v1 of 3 Superseded Latest is v3 →

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 staging: octeon: Fix checkpatch warning

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);

---
 drivers/staging/octeon/ethernet-rx.c | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)
drivers/staging/octeon/ethernet-rx.c +4 -2
index 44e372f..bd83f55 100644
@@ -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);
Signature · 1 line
2.1.3
maintainer
#1 lore raw
Quoted 39 lines · Luis de Bethencourt

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);

---
 drivers/staging/octeon/ethernet-rx.c | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)
drivers/staging/octeon/ethernet-rx.c +4 -2
index 44e372f..bd83f55 100644
@@ -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);
Signature · 1 line
2.1.3

No longer applies to my tree :(

#2 lore raw
Quoted 34 lines · Greg KH
Quoted 33 lines · Luis de Bethencourt

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);

---
 drivers/staging/octeon/ethernet-rx.c | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)
drivers/staging/octeon/ethernet-rx.c +3 -2
index 44e372f..bd83f55 100644
@@ -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 -
Quoted 8 lines
Quoted 6 lines
drivers/staging/octeon/ethernet-rx.c +1 -0
+				cvmx_ptr_to_phys(skb->head);
 			prefetch(skb->data);
 			skb->len = work->len;
 			skb_set_tail_pointer(skb, skb->len);
Signature · 1 line
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 :(

maintainer
#3 lore raw
Quoted 44 lines · Luis de Bethencourt
Quoted 34 lines · Greg KH
Quoted 33 lines · Luis de Bethencourt

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);

---
 drivers/staging/octeon/ethernet-rx.c | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)
drivers/staging/octeon/ethernet-rx.c +3 -2
index 44e372f..bd83f55 100644
@@ -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 -
Quoted 8 lines
Quoted 6 lines
drivers/staging/octeon/ethernet-rx.c +1 -0
+				cvmx_ptr_to_phys(skb->head);
 			prefetch(skb->data);
 			skb->len = work->len;
 			skb_set_tail_pointer(skb, skb->len);
Signature · 1 line
2.1.3

No longer applies to my tree :(

Quoted 6 lines

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

#4 lore raw
Quoted 58 lines · Greg KH
Quoted 44 lines · Luis de Bethencourt
Quoted 34 lines · Greg KH
Quoted 33 lines · Luis de Bethencourt

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);

---
 drivers/staging/octeon/ethernet-rx.c | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)
drivers/staging/octeon/ethernet-rx.c +3 -2
index 44e372f..bd83f55 100644
@@ -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 -
Quoted 8 lines
Quoted 6 lines
drivers/staging/octeon/ethernet-rx.c +1 -0
+				cvmx_ptr_to_phys(skb->head);
 			prefetch(skb->data);
 			skb->len = work->len;
 			skb_set_tail_pointer(skb, skb->len);
Signature · 1 line
2.1.3

No longer applies to my tree :(

Quoted 6 lines

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.

Quoted 3 lines

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