]> git.baikalelectronics.ru Git - kernel.git/commitdiff
igb/igc: use strongly typed pointer
authorJesse Brandeburg <jesse.brandeburg@intel.com>
Fri, 26 Mar 2021 00:38:27 +0000 (17:38 -0700)
committerTony Nguyen <anthony.l.nguyen@intel.com>
Wed, 26 May 2021 16:11:41 +0000 (09:11 -0700)
The igb and igc driver both use a trick of creating a local type
pointer on the stack to ease dealing with a receive descriptor in
64 bit chunks for printing.  Sparse however was not taken into
account and receive descriptors are always in little endian
order, so just make the unions use __le64 instead of u64.

No functional change.

Signed-off-by: Jesse Brandeburg <jesse.brandeburg@intel.com>
Tested-by: Dvora Fuxbrumer <dvorax.fuxbrumer@linux.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_main.c
drivers/net/ethernet/intel/igc/igc_dump.c

index 038a9fd1af44de7dde4e0b0527a25a44588baaa9..cf91e3624a8995367cf08bdd299f68b63d302cb2 100644 (file)
@@ -356,7 +356,7 @@ static void igb_dump(struct igb_adapter *adapter)
        struct igb_reg_info *reginfo;
        struct igb_ring *tx_ring;
        union e1000_adv_tx_desc *tx_desc;
-       struct my_u0 { u64 a; u64 b; } *u0;
+       struct my_u0 { __le64 a; __le64 b; } *u0;
        struct igb_ring *rx_ring;
        union e1000_adv_rx_desc *rx_desc;
        u32 staterr;
index 495bed47ed0a1a9b1f3ec6daf8bb5636a0503861..c09c95cc5f70e5493d239edc9e2958d3502693cf 100644 (file)
@@ -112,7 +112,7 @@ static void igc_regdump(struct igc_hw *hw, struct igc_reg_info *reginfo)
 void igc_rings_dump(struct igc_adapter *adapter)
 {
        struct net_device *netdev = adapter->netdev;
-       struct my_u0 { u64 a; u64 b; } *u0;
+       struct my_u0 { __le64 a; __le64 b; } *u0;
        union igc_adv_tx_desc *tx_desc;
        union igc_adv_rx_desc *rx_desc;
        struct igc_ring *tx_ring;