Skip to contentSkip to conversation

ibmpex: trivial endian annotation in extract_data helper

PATCH In review Harvey Harrison 2 participants 3 messages Oct 24, 2008 – Oct 27, 2008 Hardware monitoring

lore
Share & tools
lore
#0 lore raw

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.

---
 drivers/hwmon/ibmpex.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
drivers/hwmon/ibmpex.c +1 -1
index 537d9fb..a363633 100644
@@ -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
#1 lore raw
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

#2 lore raw
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