[Intel-wired-lan] [PATCH v3 1/9] ice: use __le16 types for explicitly Little Endian values
andrewx.bowers at intel.com
Mon Mar 16 19:15:39 UTC 2020
From: Intel-wired-lan <intel-wired-lan-bounces at osuosl.org> On Behalf Of Jacob Keller
Sent: Wednesday, March 11, 2020 6:58 PM
To: Intel Wired LAN <intel-wired-lan at lists.osuosl.org>
Cc: Jakub Kicinski <kuba at kernel.org>
Subject: [Intel-wired-lan] [PATCH v3 1/9] ice: use __le16 types for explicitly Little Endian values
The ice_read_sr_aq function returns words in the Little Endian format.
Remove the need for __force and typecasting by using a local variable in the ice_read_sr_word_aq function.
Additionally clarify explicitly that the ice_read_sr_aq function takes storage for __le16 values instead of using u16.
Being explicit about the endianness of this data helps when using tools like sparse to catch endian-related issues.
Signed-off-by: Jacob Keller <jacob.e.keller at intel.com>
Reviewed-by: Jesse Brandeburg <jesse.brandeburg at intel.com>
drivers/net/ethernet/intel/ice/ice_nvm.c | 12 +++++++-----
1 file changed, 7 insertions(+), 5 deletions(-)
Tested-by: Andrew Bowers <andrewx.bowers at intel.com>
More information about the Intel-wired-lan