All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v2] Lines should not end with a '('
@ 2019-03-12  2:19 Branden Bonaby
  2019-03-12  2:48 ` [PATCH v3] staging: octeon: " Branden Bonaby
  0 siblings, 1 reply; 3+ messages in thread
From: Branden Bonaby @ 2019-03-12  2:19 UTC (permalink / raw)
  To: gregkh; +Cc: Branden Bonaby, outreachy-kernel

Start function arguments immediately after opening bracket.
CHECK: Lines should not end with a '('.

Signed-off-by: Branden Bonaby <brandonbonaby94@gmail.com>
---
Changes in v2:
	combined both patches into 1 patch	

 drivers/staging/octeon/ethernet-tx.c | 20 +++++++++++---------
 1 file changed, 11 insertions(+), 9 deletions(-)

diff --git a/drivers/staging/octeon/ethernet-tx.c b/drivers/staging/octeon/ethernet-tx.c
index 317c9720467c..20f513fbaa85 100644
--- a/drivers/staging/octeon/ethernet-tx.c
+++ b/drivers/staging/octeon/ethernet-tx.c
@@ -214,8 +214,10 @@ int cvm_oct_xmit(struct sk_buff *skb, struct net_device *dev)
 				 * Get the number of skbuffs in use
 				 * by the hardware
 				 */
-				skb_to_free = cvmx_fau_fetch_and_add32(
-					priv->fau + qos * 4, MAX_SKB_TO_FREE);
+				skb_to_free =
+				     cvmx_fau_fetch_and_add32(priv->fau +
+							      qos * 4,
+							      MAX_SKB_TO_FREE);
 			}
 			skb_to_free = cvm_oct_adjust_skb_to_free(skb_to_free,
 								 priv->fau +
@@ -280,9 +282,9 @@ int cvm_oct_xmit(struct sk_buff *skb, struct net_device *dev)
 		for (i = 0; i < skb_shinfo(skb)->nr_frags; i++) {
 			struct skb_frag_struct *fs = skb_shinfo(skb)->frags + i;
 
-			hw_buffer.s.addr = XKPHYS_TO_PHYS(
-				(u64)(page_address(fs->page.p) +
-				fs->page_offset));
+			hw_buffer.s.addr =
+				XKPHYS_TO_PHYS((u64)(page_address(fs->page.p) +
+					       fs->page_offset));
 			hw_buffer.s.size = fs->size;
 			CVM_OCT_SKB_CB(skb)[i + 1] = hw_buffer.u64;
 		}
@@ -413,8 +415,8 @@ int cvm_oct_xmit(struct sk_buff *skb, struct net_device *dev)
 		queue_type = QUEUE_HW;
 	}
 	if (USE_ASYNC_IOBDMA)
-		cvmx_fau_async_fetch_and_add32(
-				CVMX_SCR_SCRATCH, FAU_TOTAL_TX_TO_CLEAN, 1);
+		cvmx_fau_async_fetch_and_add32(CVMX_SCR_SCRATCH,
+					       FAU_TOTAL_TX_TO_CLEAN, 1);
 
 	spin_lock_irqsave(&priv->tx_free_list[qos].lock, flags);
 
@@ -491,8 +493,8 @@ int cvm_oct_xmit(struct sk_buff *skb, struct net_device *dev)
 		cvmx_scratch_write64(CVMX_SCR_SCRATCH, old_scratch);
 		cvmx_scratch_write64(CVMX_SCR_SCRATCH + 8, old_scratch2);
 	} else {
-		total_to_clean = cvmx_fau_fetch_and_add32(
-						FAU_TOTAL_TX_TO_CLEAN, 1);
+		total_to_clean =
+			cvmx_fau_fetch_and_add32(FAU_TOTAL_TX_TO_CLEAN, 1);
 	}
 
 	if (total_to_clean & 0x3ff) {
-- 
2.17.1



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

* [PATCH v3] staging: octeon: Lines should not end with a '('
  2019-03-12  2:19 [PATCH v2] Lines should not end with a '(' Branden Bonaby
@ 2019-03-12  2:48 ` Branden Bonaby
  2019-03-12  6:30   ` [Outreachy kernel] " Julia Lawall
  0 siblings, 1 reply; 3+ messages in thread
From: Branden Bonaby @ 2019-03-12  2:48 UTC (permalink / raw)
  To: gregkh; +Cc: Branden Bonaby, outreachy-kernel

Start function arguments immediately after opening bracket.
CHECK: Lines should not end with a '('.

Signed-off-by: Branden Bonaby <brandonbonaby94@gmail.com>
---
Changes in v2:
	combined both patches that change the same thing into 1 patch
Changes in v3:
	changed subject line to match correct subsystem and driver

 drivers/staging/octeon/ethernet-tx.c | 20 +++++++++++---------
 1 file changed, 11 insertions(+), 9 deletions(-)

diff --git a/drivers/staging/octeon/ethernet-tx.c b/drivers/staging/octeon/ethernet-tx.c
index 317c9720467c..20f513fbaa85 100644
--- a/drivers/staging/octeon/ethernet-tx.c
+++ b/drivers/staging/octeon/ethernet-tx.c
@@ -214,8 +214,10 @@ int cvm_oct_xmit(struct sk_buff *skb, struct net_device *dev)
 				 * Get the number of skbuffs in use
 				 * by the hardware
 				 */
-				skb_to_free = cvmx_fau_fetch_and_add32(
-					priv->fau + qos * 4, MAX_SKB_TO_FREE);
+				skb_to_free =
+				     cvmx_fau_fetch_and_add32(priv->fau +
+							      qos * 4,
+							      MAX_SKB_TO_FREE);
 			}
 			skb_to_free = cvm_oct_adjust_skb_to_free(skb_to_free,
 								 priv->fau +
@@ -280,9 +282,9 @@ int cvm_oct_xmit(struct sk_buff *skb, struct net_device *dev)
 		for (i = 0; i < skb_shinfo(skb)->nr_frags; i++) {
 			struct skb_frag_struct *fs = skb_shinfo(skb)->frags + i;
 
-			hw_buffer.s.addr = XKPHYS_TO_PHYS(
-				(u64)(page_address(fs->page.p) +
-				fs->page_offset));
+			hw_buffer.s.addr =
+				XKPHYS_TO_PHYS((u64)(page_address(fs->page.p) +
+					       fs->page_offset));
 			hw_buffer.s.size = fs->size;
 			CVM_OCT_SKB_CB(skb)[i + 1] = hw_buffer.u64;
 		}
@@ -413,8 +415,8 @@ int cvm_oct_xmit(struct sk_buff *skb, struct net_device *dev)
 		queue_type = QUEUE_HW;
 	}
 	if (USE_ASYNC_IOBDMA)
-		cvmx_fau_async_fetch_and_add32(
-				CVMX_SCR_SCRATCH, FAU_TOTAL_TX_TO_CLEAN, 1);
+		cvmx_fau_async_fetch_and_add32(CVMX_SCR_SCRATCH,
+					       FAU_TOTAL_TX_TO_CLEAN, 1);
 
 	spin_lock_irqsave(&priv->tx_free_list[qos].lock, flags);
 
@@ -491,8 +493,8 @@ int cvm_oct_xmit(struct sk_buff *skb, struct net_device *dev)
 		cvmx_scratch_write64(CVMX_SCR_SCRATCH, old_scratch);
 		cvmx_scratch_write64(CVMX_SCR_SCRATCH + 8, old_scratch2);
 	} else {
-		total_to_clean = cvmx_fau_fetch_and_add32(
-						FAU_TOTAL_TX_TO_CLEAN, 1);
+		total_to_clean =
+			cvmx_fau_fetch_and_add32(FAU_TOTAL_TX_TO_CLEAN, 1);
 	}
 
 	if (total_to_clean & 0x3ff) {
-- 
2.17.1



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

* Re: [Outreachy kernel] [PATCH v3] staging: octeon: Lines should not end with a '('
  2019-03-12  2:48 ` [PATCH v3] staging: octeon: " Branden Bonaby
@ 2019-03-12  6:30   ` Julia Lawall
  0 siblings, 0 replies; 3+ messages in thread
From: Julia Lawall @ 2019-03-12  6:30 UTC (permalink / raw)
  To: Branden Bonaby; +Cc: gregkh, outreachy-kernel



On Mon, 11 Mar 2019, Branden Bonaby wrote:

> Start function arguments immediately after opening bracket.
> CHECK: Lines should not end with a '('.
>
> Signed-off-by: Branden Bonaby <brandonbonaby94@gmail.com>
> ---
> Changes in v2:
> 	combined both patches that change the same thing into 1 patch
> Changes in v3:
> 	changed subject line to match correct subsystem and driver

It's probably not worth changing in this case, but normally the v3 should
be on top.  For someone who is reading through your series of patches,
they are most interested in what changed since the previous one they read.

julia

>
>  drivers/staging/octeon/ethernet-tx.c | 20 +++++++++++---------
>  1 file changed, 11 insertions(+), 9 deletions(-)
>
> diff --git a/drivers/staging/octeon/ethernet-tx.c b/drivers/staging/octeon/ethernet-tx.c
> index 317c9720467c..20f513fbaa85 100644
> --- a/drivers/staging/octeon/ethernet-tx.c
> +++ b/drivers/staging/octeon/ethernet-tx.c
> @@ -214,8 +214,10 @@ int cvm_oct_xmit(struct sk_buff *skb, struct net_device *dev)
>  				 * Get the number of skbuffs in use
>  				 * by the hardware
>  				 */
> -				skb_to_free = cvmx_fau_fetch_and_add32(
> -					priv->fau + qos * 4, MAX_SKB_TO_FREE);
> +				skb_to_free =
> +				     cvmx_fau_fetch_and_add32(priv->fau +
> +							      qos * 4,
> +							      MAX_SKB_TO_FREE);
>  			}
>  			skb_to_free = cvm_oct_adjust_skb_to_free(skb_to_free,
>  								 priv->fau +
> @@ -280,9 +282,9 @@ int cvm_oct_xmit(struct sk_buff *skb, struct net_device *dev)
>  		for (i = 0; i < skb_shinfo(skb)->nr_frags; i++) {
>  			struct skb_frag_struct *fs = skb_shinfo(skb)->frags + i;
>
> -			hw_buffer.s.addr = XKPHYS_TO_PHYS(
> -				(u64)(page_address(fs->page.p) +
> -				fs->page_offset));
> +			hw_buffer.s.addr =
> +				XKPHYS_TO_PHYS((u64)(page_address(fs->page.p) +
> +					       fs->page_offset));
>  			hw_buffer.s.size = fs->size;
>  			CVM_OCT_SKB_CB(skb)[i + 1] = hw_buffer.u64;
>  		}
> @@ -413,8 +415,8 @@ int cvm_oct_xmit(struct sk_buff *skb, struct net_device *dev)
>  		queue_type = QUEUE_HW;
>  	}
>  	if (USE_ASYNC_IOBDMA)
> -		cvmx_fau_async_fetch_and_add32(
> -				CVMX_SCR_SCRATCH, FAU_TOTAL_TX_TO_CLEAN, 1);
> +		cvmx_fau_async_fetch_and_add32(CVMX_SCR_SCRATCH,
> +					       FAU_TOTAL_TX_TO_CLEAN, 1);
>
>  	spin_lock_irqsave(&priv->tx_free_list[qos].lock, flags);
>
> @@ -491,8 +493,8 @@ int cvm_oct_xmit(struct sk_buff *skb, struct net_device *dev)
>  		cvmx_scratch_write64(CVMX_SCR_SCRATCH, old_scratch);
>  		cvmx_scratch_write64(CVMX_SCR_SCRATCH + 8, old_scratch2);
>  	} else {
> -		total_to_clean = cvmx_fau_fetch_and_add32(
> -						FAU_TOTAL_TX_TO_CLEAN, 1);
> +		total_to_clean =
> +			cvmx_fau_fetch_and_add32(FAU_TOTAL_TX_TO_CLEAN, 1);
>  	}
>
>  	if (total_to_clean & 0x3ff) {
> --
> 2.17.1
>
> --
> You received this message because you are subscribed to the Google Groups "outreachy-kernel" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to outreachy-kernel+unsubscribe@googlegroups.com.
> To post to this group, send email to outreachy-kernel@googlegroups.com.
> To view this discussion on the web visit https://groups.google.com/d/msgid/outreachy-kernel/20190312024806.13728-1-brandonbonaby94%40gmail.com.
> For more options, visit https://groups.google.com/d/optout.
>


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

end of thread, other threads:[~2019-03-12  6:30 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-03-12  2:19 [PATCH v2] Lines should not end with a '(' Branden Bonaby
2019-03-12  2:48 ` [PATCH v3] staging: octeon: " Branden Bonaby
2019-03-12  6:30   ` [Outreachy kernel] " Julia Lawall

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.