]> asedeno.scripts.mit.edu Git - linux.git/commitdiff
staging: rtl8192e: remove two redundant assignments
authorColin Ian King <colin.king@canonical.com>
Sat, 20 Jan 2018 22:21:40 +0000 (22:21 +0000)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 22 Jan 2018 10:48:06 +0000 (11:48 +0100)
Clang detected two redundant assignments that can be safely removed.
The first is the removal of the duplicated assignment to pointer 'hdr',
this has already been initialized with the same value.  The second is
the removal of the redundant initialization of variable 'timeout', this
assigned value is never read and the variable is reassigned a new value
a little later.

Remove both redundant assignments, cleans up clang warnings:
drivers/staging/rtl8192e/rtllib_rx.c:1305:27: warning: Value stored to
'hdr' during its initialization is never read
drivers/staging/rtl8192e/rtllib_softmac.c:1971:6: warning: Value stored
to 'timeout' during its initialization is never read

Signed-off-by: Colin Ian King <colin.king@canonical.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/rtl8192e/rtllib_rx.c
drivers/staging/rtl8192e/rtllib_softmac.c

index 7bc9cb131bcc191d18f84662ea1a8c9578b655e8..30f72d220af16db55a1ec68fd0a62dbafd511433 100644 (file)
@@ -1317,7 +1317,6 @@ static int rtllib_rx_InfraAdhoc(struct rtllib_device *ieee, struct sk_buff *skb,
        bool bToOtherSTA = false;
        int ret = 0, i = 0;
 
-       hdr = (struct rtllib_hdr_4addr *)skb->data;
        fc = le16_to_cpu(hdr->frame_ctl);
        type = WLAN_FC_GET_TYPE(fc);
        stype = WLAN_FC_GET_STYPE(fc);
index c2b9ffba354a560d965edc2c6b9e4ac8a434d858..919231fec09cba4dacab0e4c18b64c4ca385c145 100644 (file)
@@ -1968,7 +1968,7 @@ void rtllib_sta_ps_send_pspoll_frame(struct rtllib_device *ieee)
 
 static short rtllib_sta_ps_sleep(struct rtllib_device *ieee, u64 *time)
 {
-       int timeout = ieee->ps_timeout;
+       int timeout;
        u8 dtim;
        struct rt_pwr_save_ctrl *pPSC = &(ieee->PowerSaveControl);