]> git.baikalelectronics.ru Git - kernel.git/commit
igb: override two checker warnings
authorJesse Brandeburg <jesse.brandeburg@intel.com>
Fri, 26 Mar 2021 00:38:30 +0000 (17:38 -0700)
committerTony Nguyen <anthony.l.nguyen@intel.com>
Wed, 26 May 2021 16:11:41 +0000 (09:11 -0700)
commitb77eabc5a6cfb90141fd81c5708daa3e3c8cbe97
treed5f1603e9efee92f2fd584a9c1971b80a0107d50
parenta4daa572ef2c15e1cc75885b720e51962fe82845
igb: override two checker warnings

The igb PTP code was using htons() on a constant to try to
byte swap the value before writing it to a register. This byte
swap has the consequence of triggering sparse conflicts between
the register write which expect cpu ordered input, and the code
which generated a big endian constant. Just override the cast
to make sure code doesn't change but silence the warning.

Can't do a __swab16 in this case because big endian systems
would then write the wrong value.

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/igb/igb_ptp.c