ibmpex: trivial endian annotation in extract_data helper
PATCH 1/1 ibmpex: trivial endian annotation in extract_data helper
This helper is used in few enough locations that open-coding it at the call sites may be better than the helper.
Signed-off-by Harvey Harrison <[email protected]>
--- drivers/hwmon/ibmpex.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)
drivers/hwmon/ibmpex.c +1 -1
@@ -40,7 +40,7 @@static inline u16 extract_value (const char *data,int offset) { -return be16_to_cpup ((u16 *)&data[offset]); +return be16_to_cpup ((__be16 *)&data[offset]); }#define TEMP_SENSOR 1
Signature · 1 line
1.6.0.3.729.g6ea410
Quoted 2 lines · Harvey Harrison
This helper is used in few enough locations that open-coding it at the call sites may be better than the helper.
I'm not sure how this comment relates to the diff.
That said, the diff itself is ok by me.
--D
Quoted 6 lines · Darrick J. Wong
Quoted 2 lines · Harvey Harrison
This helper is used in few enough locations that open-coding it at the call sites may be better than the helper.
I'm not sure how this comment relates to the diff.
I was referring to the extract_data helper inline, it's only used ~5 times and doesn't add much (IMO) over just opencoding it.
Cheers,
Harvey