i40e: Avoid unnecessary use of comma operator
authorSimon Horman <horms@kernel.org>
Sun, 17 Dec 2023 09:44:50 +0000 (09:44 +0000)
committerTony Nguyen <anthony.l.nguyen@intel.com>
Tue, 2 Jan 2024 21:46:18 +0000 (13:46 -0800)
Although it does not seem to have any untoward side-effects,
the use of ';' to separate to assignments seems more appropriate than ','.

Flagged by clang-17 -Wcomma

No functional change intended.
Compile tested only.

Signed-off-by: Simon Horman <horms@kernel.org>
Reviewed-by: Nick Desaulniers <ndesaulniers@google.com>
Tested-by: Pucha Himasekhar Reddy <himasekharx.reddy.pucha@intel.com> (A Contingent worker at Intel)
Signed-off-by: Tony Nguyen <anthony.l.nguyen@intel.com>
drivers/net/ethernet/intel/i40e/i40e_ethtool.c

index 8cc5697e210979cd2c6914a4abfad1be3844d798..c841779713f669dba90c1ce72293b16970cb2796 100644 (file)
@@ -1911,7 +1911,7 @@ static int i40e_get_eeprom(struct net_device *netdev,
                        len = eeprom->len - (I40E_NVM_SECTOR_SIZE * i);
                        last = true;
                }
-               offset = eeprom->offset + (I40E_NVM_SECTOR_SIZE * i),
+               offset = eeprom->offset + (I40E_NVM_SECTOR_SIZE * i);
                ret_val = i40e_aq_read_nvm(hw, 0x0, offset, len,
                                (u8 *)eeprom_buff + (I40E_NVM_SECTOR_SIZE * i),
                                last, NULL);