Commit 50935857 authored by Baoyou Xie's avatar Baoyou Xie Committed by David S. Miller

cxgb4: mark symbols static where possible

We get 10 warnings when building kernel with W=1:
drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c:304:5: warning: no previous prototype for 'cxgb4_dcb_enabled' [-Wmissing-prototypes]
drivers/net/ethernet/chelsio/cxgb4/cxgb4_uld.c:194:5: warning: no previous prototype for 'setup_sge_queues_uld' [-Wmissing-prototypes]
drivers/net/ethernet/chelsio/cxgb4/cxgb4_uld.c:241:6: warning: no previous prototype for 'free_sge_queues_uld' [-Wmissing-prototypes]
drivers/net/ethernet/chelsio/cxgb4/cxgb4_uld.c:268:5: warning: no previous prototype for 'cfg_queues_uld' [-Wmissing-prototypes]
drivers/net/ethernet/chelsio/cxgb4/cxgb4_uld.c:344:6: warning: no previous prototype for 'free_queues_uld' [-Wmissing-prototypes]
drivers/net/ethernet/chelsio/cxgb4/cxgb4_uld.c:353:5: warning: no previous prototype for 'request_msix_queue_irqs_uld' [-Wmissing-prototypes]
drivers/net/ethernet/chelsio/cxgb4/cxgb4_uld.c:379:6: warning: no previous prototype for 'free_msix_queue_irqs_uld' [-Wmissing-prototypes]
drivers/net/ethernet/chelsio/cxgb4/cxgb4_uld.c:393:6: warning: no previous prototype for 'name_msix_vecs_uld' [-Wmissing-prototypes]
drivers/net/ethernet/chelsio/cxgb4/cxgb4_uld.c:433:6: warning: no previous prototype for 'enable_rx_uld' [-Wmissing-prototypes]
drivers/net/ethernet/chelsio/cxgb4/cxgb4_uld.c:442:6: warning: no previous prototype for 'quiesce_rx_uld' [-Wmissing-prototypes]

In fact, these functions are only used in the file in which they are
declared and don't need a declaration, but can be made static.
so this patch marks these functions with 'static'.
Signed-off-by: default avatarBaoyou Xie <baoyou.xie@linaro.org>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 2dc0d2b4
...@@ -279,7 +279,7 @@ static void dcb_tx_queue_prio_enable(struct net_device *dev, int enable) ...@@ -279,7 +279,7 @@ static void dcb_tx_queue_prio_enable(struct net_device *dev, int enable)
} }
#endif /* CONFIG_CHELSIO_T4_DCB */ #endif /* CONFIG_CHELSIO_T4_DCB */
int cxgb4_dcb_enabled(const struct net_device *dev) static int cxgb4_dcb_enabled(const struct net_device *dev)
{ {
#ifdef CONFIG_CHELSIO_T4_DCB #ifdef CONFIG_CHELSIO_T4_DCB
struct port_info *pi = netdev_priv(dev); struct port_info *pi = netdev_priv(dev);
......
...@@ -191,7 +191,8 @@ static int alloc_uld_rxqs(struct adapter *adap, ...@@ -191,7 +191,8 @@ static int alloc_uld_rxqs(struct adapter *adap,
return err; return err;
} }
int setup_sge_queues_uld(struct adapter *adap, unsigned int uld_type, bool lro) static int
setup_sge_queues_uld(struct adapter *adap, unsigned int uld_type, bool lro)
{ {
struct sge_uld_rxq_info *rxq_info = adap->sge.uld_rxq_info[uld_type]; struct sge_uld_rxq_info *rxq_info = adap->sge.uld_rxq_info[uld_type];
int i, ret = 0; int i, ret = 0;
...@@ -238,7 +239,7 @@ static void t4_free_uld_rxqs(struct adapter *adap, int n, ...@@ -238,7 +239,7 @@ static void t4_free_uld_rxqs(struct adapter *adap, int n,
} }
} }
void free_sge_queues_uld(struct adapter *adap, unsigned int uld_type) static void free_sge_queues_uld(struct adapter *adap, unsigned int uld_type)
{ {
struct sge_uld_rxq_info *rxq_info = adap->sge.uld_rxq_info[uld_type]; struct sge_uld_rxq_info *rxq_info = adap->sge.uld_rxq_info[uld_type];
...@@ -265,8 +266,8 @@ void free_sge_queues_uld(struct adapter *adap, unsigned int uld_type) ...@@ -265,8 +266,8 @@ void free_sge_queues_uld(struct adapter *adap, unsigned int uld_type)
kfree(rxq_info->msix_tbl); kfree(rxq_info->msix_tbl);
} }
int cfg_queues_uld(struct adapter *adap, unsigned int uld_type, static int cfg_queues_uld(struct adapter *adap, unsigned int uld_type,
const struct cxgb4_uld_info *uld_info) const struct cxgb4_uld_info *uld_info)
{ {
struct sge *s = &adap->sge; struct sge *s = &adap->sge;
struct sge_uld_rxq_info *rxq_info; struct sge_uld_rxq_info *rxq_info;
...@@ -341,7 +342,7 @@ int cfg_queues_uld(struct adapter *adap, unsigned int uld_type, ...@@ -341,7 +342,7 @@ int cfg_queues_uld(struct adapter *adap, unsigned int uld_type,
return 0; return 0;
} }
void free_queues_uld(struct adapter *adap, unsigned int uld_type) static void free_queues_uld(struct adapter *adap, unsigned int uld_type)
{ {
struct sge_uld_rxq_info *rxq_info = adap->sge.uld_rxq_info[uld_type]; struct sge_uld_rxq_info *rxq_info = adap->sge.uld_rxq_info[uld_type];
...@@ -350,7 +351,8 @@ void free_queues_uld(struct adapter *adap, unsigned int uld_type) ...@@ -350,7 +351,8 @@ void free_queues_uld(struct adapter *adap, unsigned int uld_type)
kfree(rxq_info); kfree(rxq_info);
} }
int request_msix_queue_irqs_uld(struct adapter *adap, unsigned int uld_type) static int
request_msix_queue_irqs_uld(struct adapter *adap, unsigned int uld_type)
{ {
struct sge_uld_rxq_info *rxq_info = adap->sge.uld_rxq_info[uld_type]; struct sge_uld_rxq_info *rxq_info = adap->sge.uld_rxq_info[uld_type];
int err = 0; int err = 0;
...@@ -376,7 +378,8 @@ int request_msix_queue_irqs_uld(struct adapter *adap, unsigned int uld_type) ...@@ -376,7 +378,8 @@ int request_msix_queue_irqs_uld(struct adapter *adap, unsigned int uld_type)
return err; return err;
} }
void free_msix_queue_irqs_uld(struct adapter *adap, unsigned int uld_type) static void
free_msix_queue_irqs_uld(struct adapter *adap, unsigned int uld_type)
{ {
struct sge_uld_rxq_info *rxq_info = adap->sge.uld_rxq_info[uld_type]; struct sge_uld_rxq_info *rxq_info = adap->sge.uld_rxq_info[uld_type];
unsigned int idx, bmap_idx; unsigned int idx, bmap_idx;
...@@ -390,7 +393,7 @@ void free_msix_queue_irqs_uld(struct adapter *adap, unsigned int uld_type) ...@@ -390,7 +393,7 @@ void free_msix_queue_irqs_uld(struct adapter *adap, unsigned int uld_type)
} }
} }
void name_msix_vecs_uld(struct adapter *adap, unsigned int uld_type) static void name_msix_vecs_uld(struct adapter *adap, unsigned int uld_type)
{ {
struct sge_uld_rxq_info *rxq_info = adap->sge.uld_rxq_info[uld_type]; struct sge_uld_rxq_info *rxq_info = adap->sge.uld_rxq_info[uld_type];
int n = sizeof(adap->msix_info_ulds[0].desc); int n = sizeof(adap->msix_info_ulds[0].desc);
...@@ -430,7 +433,7 @@ static void quiesce_rx(struct adapter *adap, struct sge_rspq *q) ...@@ -430,7 +433,7 @@ static void quiesce_rx(struct adapter *adap, struct sge_rspq *q)
} }
} }
void enable_rx_uld(struct adapter *adap, unsigned int uld_type) static void enable_rx_uld(struct adapter *adap, unsigned int uld_type)
{ {
struct sge_uld_rxq_info *rxq_info = adap->sge.uld_rxq_info[uld_type]; struct sge_uld_rxq_info *rxq_info = adap->sge.uld_rxq_info[uld_type];
int idx; int idx;
...@@ -439,7 +442,7 @@ void enable_rx_uld(struct adapter *adap, unsigned int uld_type) ...@@ -439,7 +442,7 @@ void enable_rx_uld(struct adapter *adap, unsigned int uld_type)
enable_rx(adap, &rxq_info->uldrxq[idx].rspq); enable_rx(adap, &rxq_info->uldrxq[idx].rspq);
} }
void quiesce_rx_uld(struct adapter *adap, unsigned int uld_type) static void quiesce_rx_uld(struct adapter *adap, unsigned int uld_type)
{ {
struct sge_uld_rxq_info *rxq_info = adap->sge.uld_rxq_info[uld_type]; struct sge_uld_rxq_info *rxq_info = adap->sge.uld_rxq_info[uld_type];
int idx; int idx;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment