LKML Archive on lore.kernel.org
help / color / mirror / Atom feed
* [PATCH] ibmpex: trivial endian annotation in extract_data helper
@ 2008-10-24 23:44 Harvey Harrison
  2008-10-27 18:32 ` Darrick J. Wong
  0 siblings, 1 reply; 3+ messages in thread
From: Harvey Harrison @ 2008-10-24 23:44 UTC (permalink / raw)
  To: Darrick J. Wong; +Cc: Andrew Morton, LKML

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 <harvey.harrison@gmail.com>
---
 drivers/hwmon/ibmpex.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/drivers/hwmon/ibmpex.c b/drivers/hwmon/ibmpex.c
index 537d9fb..a363633 100644
--- a/drivers/hwmon/ibmpex.c
+++ b/drivers/hwmon/ibmpex.c
@@ -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
-- 
1.6.0.3.729.g6ea410




^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] ibmpex: trivial endian annotation in extract_data helper
  2008-10-24 23:44 [PATCH] ibmpex: trivial endian annotation in extract_data helper Harvey Harrison
@ 2008-10-27 18:32 ` Darrick J. Wong
  2008-10-27 19:26   ` Harvey Harrison
  0 siblings, 1 reply; 3+ messages in thread
From: Darrick J. Wong @ 2008-10-27 18:32 UTC (permalink / raw)
  To: Harvey Harrison; +Cc: Andrew Morton, LKML

On Fri, Oct 24, 2008 at 04:44:58PM -0700, Harvey Harrison wrote:
> 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

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] ibmpex: trivial endian annotation in extract_data helper
  2008-10-27 18:32 ` Darrick J. Wong
@ 2008-10-27 19:26   ` Harvey Harrison
  0 siblings, 0 replies; 3+ messages in thread
From: Harvey Harrison @ 2008-10-27 19:26 UTC (permalink / raw)
  To: djwong; +Cc: Andrew Morton, LKML

On Mon, 2008-10-27 at 11:32 -0700, Darrick J. Wong wrote:
> On Fri, Oct 24, 2008 at 04:44:58PM -0700, Harvey Harrison wrote:
> > 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


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2008-10-27 19:31 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-10-24 23:44 [PATCH] ibmpex: trivial endian annotation in extract_data helper Harvey Harrison
2008-10-27 18:32 ` Darrick J. Wong
2008-10-27 19:26   ` Harvey Harrison

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).