staging: ks7010: ks_hostif: Remove a bunch of unused variables
authorLee Jones <lee.jones@linaro.org>
Wed, 14 Apr 2021 18:10:55 +0000 (19:10 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 10 May 2021 09:19:25 +0000 (11:19 +0200)
Add comments to preserve documentation.

Fixes the following W=1 kernel build warning(s):

 drivers/staging/ks7010/ks_hostif.c: In function ‘hostif_mib_get_confirm’:
 drivers/staging/ks7010/ks_hostif.c:528:6: warning: variable ‘mib_val_type’ set but not used [-Wunused-but-set-variable]
 drivers/staging/ks7010/ks_hostif.c:527:6: warning: variable ‘mib_val_size’ set but not used [-Wunused-but-set-variable]
 drivers/staging/ks7010/ks_hostif.c: In function ‘hostif_infrastructure_set_confirm’:
 drivers/staging/ks7010/ks_hostif.c:849:6: warning: variable ‘result_code’ set but not used [-Wunused-but-set-variable]
 drivers/staging/ks7010/ks_hostif.c: In function ‘hostif_phy_information_confirm’:
 drivers/staging/ks7010/ks_hostif.c:929:19: warning: variable ‘noise’ set but not used [-Wunused-but-set-variable]

Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: linux-staging@lists.linux.dev
Signed-off-by: Lee Jones <lee.jones@linaro.org>
Link: https://lore.kernel.org/r/20210414181129.1628598-24-lee.jones@linaro.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/ks7010/ks_hostif.c

index 8bc3b7d8d3d5e2f5898e6125e5d2ac4bd2c96f40..eaa70893224a1e2c06220f5e946a9e308136ee1b 100644 (file)
@@ -524,13 +524,11 @@ void hostif_mib_get_confirm(struct ks_wlan_private *priv)
        struct net_device *dev = priv->net_dev;
        u32 mib_status;
        u32 mib_attribute;
-       u16 mib_val_size;
-       u16 mib_val_type;
 
        mib_status = get_dword(priv);
        mib_attribute = get_dword(priv);
-       mib_val_size = get_word(priv);
-       mib_val_type = get_word(priv);
+       get_word(priv); /* mib_val_size */
+       get_word(priv); /* mib_val_type */
 
        if (mib_status) {
                netdev_err(priv->net_dev, "attribute=%08X, status=%08X\n",
@@ -846,9 +844,7 @@ void hostif_ps_adhoc_set_confirm(struct ks_wlan_private *priv)
 static
 void hostif_infrastructure_set_confirm(struct ks_wlan_private *priv)
 {
-       u16 result_code;
-
-       result_code = get_word(priv);
+       get_word(priv); /* result_code */
        priv->infra_status = 1; /* infrastructure mode set */
        hostif_sme_enqueue(priv, SME_MODE_SET_CONFIRM);
 }
@@ -926,14 +922,14 @@ static
 void hostif_phy_information_confirm(struct ks_wlan_private *priv)
 {
        struct iw_statistics *wstats = &priv->wstats;
-       u8 rssi, signal, noise;
+       u8 rssi, signal;
        u8 link_speed;
        u32 transmitted_frame_count, received_fragment_count;
        u32 failed_count, fcs_error_count;
 
        rssi = get_byte(priv);
        signal = get_byte(priv);
-       noise = get_byte(priv);
+       get_byte(priv); /* noise */
        link_speed = get_byte(priv);
        transmitted_frame_count = get_dword(priv);
        received_fragment_count = get_dword(priv);