]> git.baikalelectronics.ru Git - kernel.git/commit
intel: remove checker warning
authorJesse Brandeburg <jesse.brandeburg@intel.com>
Fri, 26 Mar 2021 00:38:25 +0000 (17:38 -0700)
committerTony Nguyen <anthony.l.nguyen@intel.com>
Wed, 26 May 2021 16:11:40 +0000 (09:11 -0700)
commitc40591cc3d48194faa80bda652d86a1ed8e221be
tree5a301380a403a1b664fd2a833ac7694a1b938c55
parentd4ef55288aa2e1b76033717242728ac98ddc4721
intel: remove checker warning

The sparse checker (C=2) found an assignment where we were mixing
types when trying to convert from data read directly from the
device NVM, to an array in CPU order in-memory, which
unfortunately the driver tries to do in-place.

This is easily solved by using the swap operation instead of an
assignment, and is already proven in other Intel drivers to be
functionally correct and the same code, just without a sparse
warning.

The change is the same in all three drivers.

Signed-off-by: Jesse Brandeburg <jesse.brandeburg@intel.com>
Tested-by: Dave Switzer <david.switzer@intel.com>
Signed-off-by: Tony Nguyen <anthony.l.nguyen@intel.com>
drivers/net/ethernet/intel/e1000/e1000_ethtool.c
drivers/net/ethernet/intel/igb/igb_ethtool.c
drivers/net/ethernet/intel/igc/igc_ethtool.c