[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <AANLkTinMCi=bxqJ+3WhNOM6AoaHLi_8WOUSi_wrzno5p@mail.gmail.com>
Date: Fri, 27 Aug 2010 18:09:51 -0400
From: Bob Copeland <me@...copeland.com>
To: Andreas Herrmann <herrmann.der.user@...glemail.com>
Cc: "H. Peter Anvin" <hpa@...or.com>, Ingo Molnar <mingo@...e.hu>,
Peter Zijlstra <a.p.zijlstra@...llo.nl>,
Andrew Morton <akpm@...ux-foundation.org>,
linux-kernel@...r.kernel.org,
Borislav Petkov <borislav.petkov@....com>,
Zhu Yi <yi.zhu@...el.com>,
"Luis R. Rodriguez" <lrodriguez@...eros.com>
Subject: Re: [PATCH] bitops: Provide generic sign_extend function (moving it
out from wireless code)
On Fri, Aug 27, 2010 at 6:16 AM, Andreas Herrmann
<herrmann.der.user@...glemail.com> wrote:
> -static int sign_extend(int val, const int nbits)
> -static s32 sign_extend(u32 oper, int index)
Note these two are specified slightly differently, so return different
values with the same arguments. The ath[59]k version takes the number
of bits (1-based) while the other one takes the position of the high
order bit (0-based). I think the former is a little more natural but
it's a matter of taste.
Anyway I personally have no problem with merging them once the above
is fixed. I wrote a similar patch when I wrote the ath5k version, but
never bothered to submit it.
--
Bob Copeland %% www.bobcopeland.com
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists