On Tue, Jun 24, 2014 at 02:46:55PM +0200, Antoine Schweitzer-Chaput wrote:
function dump_eprom is only used when DEBUG_EPROM is set.
function txqueue2outpipe is only used when USE_ONE_PIPE is unset.
function GetRxPacketShiftBytes819xUsb is only used when
USB_RX_AGGREGATION_SUPPORT is set.
Compile these functions only when they will actually be used.
Signed-off-by: Antoine Schweitzer-Chaput anto...@schweitzer-chaput.fr
---
drivers/staging/rtl8192u/r8192U_core.c | 8 ++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/drivers/staging/rtl8192u/r8192U_core.c
b/drivers/staging/rtl8192u/r8192U_core.c
index 4536a87..b6718c0 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 */
+#ifdef DEBUG_EPROM
how can this ever be set? If no one sets it, just remove the code
entirely please.
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,6 +1555,7 @@ u16 N_DBPSOfRate(u16 DataRate)
return N_DBPS;
}
+#ifndef USE_ONE_PIPE
Same here, if the option can never be selected, just delete the code.
static unsigned int txqueue2outpipe(struct r8192_priv *priv,
unsigned int tx_queue)
{
@@ -1562,6 +1565,7 @@ static unsigned int txqueue2outpipe(struct r8192_priv
*priv,
}
return priv-txqueue_to_outpipemap[tx_queue];
}
+#endif
short rtl819xU_tx_cmd(struct net_device *dev, struct sk_buff *skb)
{
@@ -4874,18 +4878,18 @@ static void query_rxdesc_status(struct sk_buff *skb,
}
+#ifdef USB_RX_AGGREGATION_SUPPORT
Same here.
Care to do this series all over, just delete the functions entirely.
thanks,
greg k-h
___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel