Patchwork net: sxgbe: make local functions static

login
register
mail settings
Submitter Jingoo Han
Date April 17, 2014, 10:13 a.m.
Message ID <004401cf5a25$bc8ed200$35ac7600$%han@samsung.com>
Download mbox | patch
Permalink /patch/339829/
State Accepted
Delegated to: David Miller
Headers show

Comments

Jingoo Han - April 17, 2014, 10:13 a.m.
Make local functions static, because these are used only in this
file.

Signed-off-by: Jingoo Han <jg1.han@samsung.com>
---
 drivers/net/ethernet/samsung/sxgbe/sxgbe_main.c |   15 +++++++--------
 1 file changed, 7 insertions(+), 8 deletions(-)
Byungho An - April 18, 2014, 11:35 a.m.
Jingoo Han wrote:
> 
> Make local functions static, because these are used only in this
> file.
> 
> Signed-off-by: Jingoo Han <jg1.han@samsung.com>

Acked-by: Byungho An <bh74.an@samsung.com>

> ---
>  drivers/net/ethernet/samsung/sxgbe/sxgbe_main.c |   15 +++++++--------
>  1 file changed, 7 insertions(+), 8 deletions(-)
> 
> diff --git a/drivers/net/ethernet/samsung/sxgbe/sxgbe_main.c
> b/drivers/net/ethernet/samsung/sxgbe/sxgbe_main.c
> index a72688e..dbb0abb 100644
> --- a/drivers/net/ethernet/samsung/sxgbe/sxgbe_main.c
> +++ b/drivers/net/ethernet/samsung/sxgbe/sxgbe_main.c
> @@ -425,8 +425,8 @@ dmamem_err:
>   * @rx_rsize: ring size
>   * Description:  this function initializes the DMA RX descriptor
>   */
> -void free_rx_ring(struct device *dev, struct sxgbe_rx_queue *rx_ring,
> -		  int rx_rsize)
> +static void free_rx_ring(struct device *dev, struct sxgbe_rx_queue
> *rx_ring,
> +			 int rx_rsize)
>  {
>  	dma_free_coherent(dev, rx_rsize * sizeof(struct sxgbe_rx_norm_desc),
>  			  rx_ring->dma_rx, rx_ring->dma_rx_phy);
> @@ -519,8 +519,8 @@ error:
>   * @tx_rsize: ring size
>   * Description:  this function initializes the DMA TX descriptor
>   */
> -void free_tx_ring(struct device *dev, struct sxgbe_tx_queue *tx_ring,
> -		  int tx_rsize)
> +static void free_tx_ring(struct device *dev, struct sxgbe_tx_queue
> *tx_ring,
> +			 int tx_rsize)
>  {
>  	dma_free_coherent(dev, tx_rsize * sizeof(struct sxgbe_tx_norm_desc),
>  			  tx_ring->dma_tx, tx_ring->dma_tx_phy);
> @@ -1218,11 +1218,10 @@ static int sxgbe_release(struct net_device *dev)
> 
>  	return 0;
>  }
> -
>  /* Prepare first Tx descriptor for doing TSO operation */
> -void sxgbe_tso_prepare(struct sxgbe_priv_data *priv,
> -		       struct sxgbe_tx_norm_desc *first_desc,
> -		       struct sk_buff *skb)
> +static void sxgbe_tso_prepare(struct sxgbe_priv_data *priv,
> +			      struct sxgbe_tx_norm_desc *first_desc,
> +			      struct sk_buff *skb)
>  {
>  	unsigned int total_hdr_len, tcp_hdr_len;
> 
> --
> 1.7.10.4
> 
> 
> --
> To unsubscribe from this list: send the line "unsubscribe netdev" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html

--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
David Miller - April 20, 2014, 10:20 p.m.
From: Jingoo Han <jg1.han@samsung.com>
Date: Thu, 17 Apr 2014 19:13:53 +0900

> Make local functions static, because these are used only in this
> file.
> 
> Signed-off-by: Jingoo Han <jg1.han@samsung.com>

Applied.
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Patch

diff --git a/drivers/net/ethernet/samsung/sxgbe/sxgbe_main.c b/drivers/net/ethernet/samsung/sxgbe/sxgbe_main.c
index a72688e..dbb0abb 100644
--- a/drivers/net/ethernet/samsung/sxgbe/sxgbe_main.c
+++ b/drivers/net/ethernet/samsung/sxgbe/sxgbe_main.c
@@ -425,8 +425,8 @@  dmamem_err:
  * @rx_rsize: ring size
  * Description:  this function initializes the DMA RX descriptor
  */
-void free_rx_ring(struct device *dev, struct sxgbe_rx_queue *rx_ring,
-		  int rx_rsize)
+static void free_rx_ring(struct device *dev, struct sxgbe_rx_queue *rx_ring,
+			 int rx_rsize)
 {
 	dma_free_coherent(dev, rx_rsize * sizeof(struct sxgbe_rx_norm_desc),
 			  rx_ring->dma_rx, rx_ring->dma_rx_phy);
@@ -519,8 +519,8 @@  error:
  * @tx_rsize: ring size
  * Description:  this function initializes the DMA TX descriptor
  */
-void free_tx_ring(struct device *dev, struct sxgbe_tx_queue *tx_ring,
-		  int tx_rsize)
+static void free_tx_ring(struct device *dev, struct sxgbe_tx_queue *tx_ring,
+			 int tx_rsize)
 {
 	dma_free_coherent(dev, tx_rsize * sizeof(struct sxgbe_tx_norm_desc),
 			  tx_ring->dma_tx, tx_ring->dma_tx_phy);
@@ -1218,11 +1218,10 @@  static int sxgbe_release(struct net_device *dev)
 
 	return 0;
 }
-
 /* Prepare first Tx descriptor for doing TSO operation */
-void sxgbe_tso_prepare(struct sxgbe_priv_data *priv,
-		       struct sxgbe_tx_norm_desc *first_desc,
-		       struct sk_buff *skb)
+static void sxgbe_tso_prepare(struct sxgbe_priv_data *priv,
+			      struct sxgbe_tx_norm_desc *first_desc,
+			      struct sk_buff *skb)
 {
 	unsigned int total_hdr_len, tcp_hdr_len;