2008-10-24 23:45:16

by Harvey Harrison

[permalink] [raw]
Subject: [PATCH] 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(-)

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



2008-10-27 18:32:29

by djwong

[permalink] [raw]
Subject: Re: [PATCH] ibmpex: trivial endian annotation in extract_data helper

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

2008-10-27 19:31:49

by Harvey Harrison

[permalink] [raw]
Subject: Re: [PATCH] ibmpex: trivial endian annotation in extract_data helper

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