From mboxrd@z Thu Jan 1 00:00:00 1970 From: Bowers, AndrewX Date: Mon, 16 Mar 2020 19:15:39 +0000 Subject: [Intel-wired-lan] [PATCH v3 1/9] ice: use __le16 types for explicitly Little Endian values In-Reply-To: <20200312015818.1007882-2-jacob.e.keller@intel.com> References: <20200312015818.1007882-1-jacob.e.keller@intel.com> <20200312015818.1007882-2-jacob.e.keller@intel.com> Message-ID: <1866427914e247048105464443d19822@intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: intel-wired-lan@osuosl.org List-ID: -----Original Message----- From: Intel-wired-lan On Behalf Of Jacob Keller Sent: Wednesday, March 11, 2020 6:58 PM To: Intel Wired LAN Cc: Jakub Kicinski 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 Reviewed-by: Jesse Brandeburg --- drivers/net/ethernet/intel/ice/ice_nvm.c | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) Tested-by: Andrew Bowers