rtl8xxxu: fix unused rtl8192cu_fops compiler warning
authorKalle Valo <kvalo@codeaurora.org>
Sun, 25 Oct 2015 16:24:38 +0000 (18:24 +0200)
committerKalle Valo <kvalo@codeaurora.org>
Mon, 26 Oct 2015 16:06:10 +0000 (18:06 +0200)
kbuild reported:

rtl8xxxu.c:5786:32: warning: ‘rtl8192cu_fops’ defined but not used [-Wunused-variable]

Fix it by adding temporary ifdefs around the static functions.

Fixes: 033695bdf6d7 ("rtl8xxxu: move devices supported by rtlwifi under UNTESTED config")
Reported-by: kbuild test robot <fengguang.wu@intel.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu.c

index 86d864af3a32324b57cea13472d081b6946c6331..6aed923a709ae3606225307cdcb2b7170442e11d 100644 (file)
@@ -1818,6 +1818,8 @@ static int rtl8723au_parse_efuse(struct rtl8xxxu_priv *priv)
        return 0;
 }
 
+#ifdef CONFIG_RTL8XXXU_UNTESTED
+
 static int rtl8192cu_parse_efuse(struct rtl8xxxu_priv *priv)
 {
        int i;
@@ -1885,6 +1887,8 @@ static int rtl8192cu_parse_efuse(struct rtl8xxxu_priv *priv)
        return 0;
 }
 
+#endif
+
 static int
 rtl8xxxu_read_efuse8(struct rtl8xxxu_priv *priv, u16 offset, u8 *data)
 {
@@ -2217,6 +2221,8 @@ static int rtl8723au_load_firmware(struct rtl8xxxu_priv *priv)
        return ret;
 }
 
+#ifdef CONFIG_RTL8XXXU_UNTESTED
+
 static int rtl8192cu_load_firmware(struct rtl8xxxu_priv *priv)
 {
        char *fw_name;
@@ -2234,6 +2240,8 @@ static int rtl8192cu_load_firmware(struct rtl8xxxu_priv *priv)
        return ret;
 }
 
+#endif
+
 static void rtl8xxxu_firmware_self_reset(struct rtl8xxxu_priv *priv)
 {
        u16 val16;
@@ -3815,6 +3823,8 @@ exit:
        return ret;
 }
 
+#ifdef CONFIG_RTL8XXXU_UNTESTED
+
 static int rtl8192cu_power_on(struct rtl8xxxu_priv *priv)
 {
        u8 val8;
@@ -3918,6 +3928,8 @@ static int rtl8192cu_power_on(struct rtl8xxxu_priv *priv)
        return 0;
 }
 
+#endif
+
 static void rtl8xxxu_power_off(struct rtl8xxxu_priv *priv)
 {
        u8 val8;
@@ -5783,6 +5795,8 @@ static struct rtl8xxxu_fileops rtl8723au_fops = {
        .writeN_block_size = 1024,
 };
 
+#ifdef CONFIG_RTL8XXXU_UNTESTED
+
 static struct rtl8xxxu_fileops rtl8192cu_fops = {
        .parse_efuse = rtl8192cu_parse_efuse,
        .load_firmware = rtl8192cu_load_firmware,
@@ -5790,6 +5804,8 @@ static struct rtl8xxxu_fileops rtl8192cu_fops = {
        .writeN_block_size = 128,
 };
 
+#endif
+
 static struct usb_device_id dev_table[] = {
 {USB_DEVICE_AND_INTERFACE_INFO(USB_VENDOR_ID_REALTEK, 0x8724, 0xff, 0xff, 0xff),
        .driver_info = (unsigned long)&rtl8723au_fops},