ath10k: remove set but not used variable 'tlv_len'
authorYueHaibing <yuehaibing@huawei.com>
Fri, 19 Oct 2018 12:20:26 +0000 (12:20 +0000)
committerKalle Valo <kvalo@codeaurora.org>
Mon, 5 Nov 2018 11:13:02 +0000 (13:13 +0200)
Fixes gcc '-Wunused-but-set-variable' warning:

drivers/net/wireless/ath/ath10k/wmi-tlv.c: In function 'ath10k_wmi_tlv_op_gen_config_pno_start':
drivers/net/wireless/ath/ath10k/wmi-tlv.c:3455:6: warning:
 variable 'tlv_len' set but not used [-Wunused-but-set-variable]

It never used since inroduction in commit
ce834e280f2f ("ath10k: support NET_DETECT WoWLAN feature")

Signed-off-by: YueHaibing <yuehaibing@huawei.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
drivers/net/wireless/ath/ath10k/wmi-tlv.c

index 07c4a33d56b5f90cfe465291bf8ecabcea581671..ad4114a88170089f5405f9b165bbba8e71253ee7 100644 (file)
@@ -3455,7 +3455,6 @@ ath10k_wmi_tlv_op_gen_config_pno_start(struct ath10k *ar,
        struct wmi_tlv *tlv;
        struct sk_buff *skb;
        __le32 *channel_list;
-       u16 tlv_len;
        size_t len;
        void *ptr;
        u32 i;
@@ -3513,8 +3512,6 @@ ath10k_wmi_tlv_op_gen_config_pno_start(struct ath10k *ar,
        /* nlo_configured_parameters(nlo_list) */
        cmd->no_of_ssids = __cpu_to_le32(min_t(u8, pno->uc_networks_count,
                                               WMI_NLO_MAX_SSIDS));
-       tlv_len = __le32_to_cpu(cmd->no_of_ssids) *
-               sizeof(struct nlo_configured_parameters);
 
        tlv = ptr;
        tlv->tag = __cpu_to_le16(WMI_TLV_TAG_ARRAY_STRUCT);