]> git.proxmox.com Git - mirror_ubuntu-focal-kernel.git/commitdiff
i40e: remove redundant initialization of read_size
authorColin Ian King <colin.king@canonical.com>
Sun, 5 Nov 2017 13:04:29 +0000 (13:04 +0000)
committerJeff Kirsher <jeffrey.t.kirsher@intel.com>
Wed, 10 Jan 2018 20:41:21 +0000 (12:41 -0800)
Variable read_size is initialized and this value is never read, it is
instead set inside the do-loop, hence the initialization is redundant
and can be removed. Cleans up clang warning:

drivers/net/ethernet/intel/i40e/i40e_nvm.c:390:6: warning: Value stored
to 'read_size' during its initialization is never read

Signed-off-by: Colin Ian King <colin.king@canonical.com>
Tested-by: Aaron Brown <aaron.f.brown@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
drivers/net/ethernet/intel/i40e/i40e_nvm.c

index 7689c2ee0d463650a4c4757c1210751767cad1aa..425713fb72e5f911feb2183db75ff96c3131bca9 100644 (file)
@@ -389,7 +389,7 @@ static i40e_status i40e_read_nvm_buffer_aq(struct i40e_hw *hw, u16 offset,
                                           u16 *words, u16 *data)
 {
        i40e_status ret_code;
-       u16 read_size = *words;
+       u16 read_size;
        bool last_cmd = false;
        u16 words_read = 0;
        u16 i = 0;