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 <antoine@xxxxxxxxxxxxxxxxxxxx> --- 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 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 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 static u32 GetRxPacketShiftBytes819xUsb(struct ieee80211_rx_stats *Status, bool bIsRxAggrSubframe) { -#ifdef USB_RX_AGGREGATION_SUPPORT 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.9.1 _______________________________________________ devel mailing list devel@xxxxxxxxxxxxxxxxxxxxxx http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel