All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] staging: rtl8192u: fix sparse warnings in r8192U_core.c
@ 2014-08-06  8:44 A Raghavendra Rao
  2014-08-07  3:08 ` Greg KH
  0 siblings, 1 reply; 5+ messages in thread
From: A Raghavendra Rao @ 2014-08-06  8:44 UTC (permalink / raw)
  To: gregkh, peter.p.waskiewicz.jr, c; +Cc: devel, linux-kernel, A Raghavendra Rao

Fix the following sparse warnings:
drivers/staging/rtl8192u/r8192U_core.c:670:6: warning: symbol 'dump_eprom'
was not declared. Should it be static?
drivers/staging/rtl8192u/r8192U_core.c:1556:14: warning: symbol
'txqueue2outpipe' was not declared. Should it be static?
drivers/staging/rtl8192u/r8192U_core.c:4876:5: warning: symbol
'GetRxPacketShiftBytes819xUsb' was not declared. Should it be static?

Signed-off-by: A Raghavendra Rao <arrao@cdac.in>
---
 drivers/staging/rtl8192u/r8192U_core.c |    8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)

diff --git a/drivers/staging/rtl8192u/r8192U_core.c b/drivers/staging/rtl8192u/r8192U_core.c
index 7640386..b41b21a 100644
--- a/drivers/staging/rtl8192u/r8192U_core.c
+++ b/drivers/staging/rtl8192u/r8192U_core.c
@@ -667,7 +667,7 @@ static void tx_timeout(struct net_device *dev)
 
 
 /* this is only for debug */
-void dump_eprom(struct net_device *dev)
+static void dump_eprom(struct net_device *dev)
 {
 	int i;
 	for (i = 0; i < 63; i++)
@@ -1553,7 +1553,8 @@ u16 N_DBPSOfRate(u16 DataRate)
 	return N_DBPS;
 }
 
-unsigned int txqueue2outpipe(struct r8192_priv *priv, unsigned int tx_queue)
+static unsigned int txqueue2outpipe(struct r8192_priv *priv,
+					unsigned int tx_queue)
 {
 	if (tx_queue >= 9) {
 		RT_TRACE(COMP_ERR, "%s():Unknown queue ID!!!\n", __func__);
@@ -4873,7 +4874,8 @@ static void query_rxdesc_status(struct sk_buff *skb,
 
 }
 
-u32 GetRxPacketShiftBytes819xUsb(struct ieee80211_rx_stats  *Status, bool bIsRxAggrSubframe)
+static u32 GetRxPacketShiftBytes819xUsb(struct ieee80211_rx_stats  *Status,
+					bool bIsRxAggrSubframe)
 {
 #ifdef USB_RX_AGGREGATION_SUPPORT
 	if (bIsRxAggrSubframe)
-- 
1.7.9.5


^ permalink raw reply related	[flat|nested] 5+ messages in thread
* [PATCH] Staging: rtl8192u: fix sparse warnings in r8192U_core.c
@ 2014-08-07  4:40 A Raghavendra Rao
  2014-08-07  5:35 ` Greg KH
  2014-08-07  6:02 ` Antoine Schweitzer-Chaput
  0 siblings, 2 replies; 5+ messages in thread
From: A Raghavendra Rao @ 2014-08-07  4:40 UTC (permalink / raw)
  To: gregkh, peter.p.waskiewicz.jr, c; +Cc: devel, linux-kernel, A Raghavendra Rao

Fix the following sparse warnings:
drivers/staging/rtl8192u/r8192U_core.c:670:6: warning: symbol 'dump_eprom'
was not declared. Should it be static?
drivers/staging/rtl8192u/r8192U_core.c:1556:14: warning: symbol
'txqueue2outpipe' was not declared. Should it be static?
drivers/staging/rtl8192u/r8192U_core.c:4876:5: warning: symbol
'GetRxPacketShiftBytes819xUsb' was not declared. Should it be static?

Signed-off-by: A Raghavendra Rao <arrao@cdac.in>
---
 drivers/staging/rtl8192u/r8192U_core.c |   16 +++++++++++-----
 1 file changed, 11 insertions(+), 5 deletions(-)

diff --git a/drivers/staging/rtl8192u/r8192U_core.c b/drivers/staging/rtl8192u/r8192U_core.c
index 7640386..6ad767a 100644
--- a/drivers/staging/rtl8192u/r8192U_core.c
+++ b/drivers/staging/rtl8192u/r8192U_core.c
@@ -667,12 +667,14 @@ static void tx_timeout(struct net_device *dev)
 
 
 /* this is only for debug */
-void dump_eprom(struct net_device *dev)
+#ifdef DEBUG_EPROM
+static void dump_eprom(struct net_device *dev)
 {
 	int i;
 	for (i = 0; i < 63; i++)
 		RT_TRACE(COMP_EPROM, "EEPROM addr %x : %x", i, eprom_read(dev, i));
 }
+#endif
 
 void rtl8192_update_msr(struct net_device *dev)
 {
@@ -1553,7 +1555,9 @@ u16 N_DBPSOfRate(u16 DataRate)
 	return N_DBPS;
 }
 
-unsigned int txqueue2outpipe(struct r8192_priv *priv, unsigned int tx_queue)
+#ifndef USE_ONE_PIPE
+static unsigned int txqueue2outpipe(struct r8192_priv *priv,
+					unsigned int tx_queue)
 {
 	if (tx_queue >= 9) {
 		RT_TRACE(COMP_ERR, "%s():Unknown queue ID!!!\n", __func__);
@@ -1561,6 +1565,7 @@ unsigned int txqueue2outpipe(struct r8192_priv *priv, unsigned int tx_queue)
 	}
 	return priv->txqueue_to_outpipemap[tx_queue];
 }
+#endif
 
 short rtl819xU_tx_cmd(struct net_device *dev, struct sk_buff *skb)
 {
@@ -4873,17 +4878,18 @@ static void query_rxdesc_status(struct sk_buff *skb,
 
 }
 
-u32 GetRxPacketShiftBytes819xUsb(struct ieee80211_rx_stats  *Status, bool bIsRxAggrSubframe)
-{
 #ifdef USB_RX_AGGREGATION_SUPPORT
+static u32 GetRxPacketShiftBytes819xUsb(struct ieee80211_rx_stats  *Status,
+					bool bIsRxAggrSubframe)
+{
 	if (bIsRxAggrSubframe)
 		return (sizeof(rx_desc_819x_usb) + Status->RxDrvInfoSize
 			+ Status->RxBufShift + 8);
 	else
-#endif
 		return (sizeof(rx_desc_819x_usb) + Status->RxDrvInfoSize
 			+ Status->RxBufShift);
 }
+#endif
 
 static void rtl8192_rx_nomal(struct sk_buff *skb)
 {
-- 
1.7.9.5


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

end of thread, other threads:[~2014-08-07  6:02 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-08-06  8:44 [PATCH] staging: rtl8192u: fix sparse warnings in r8192U_core.c A Raghavendra Rao
2014-08-07  3:08 ` Greg KH
2014-08-07  4:40 [PATCH] Staging: " A Raghavendra Rao
2014-08-07  5:35 ` Greg KH
2014-08-07  6:02 ` Antoine Schweitzer-Chaput

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.