lkml.org 
[lkml]   [2007]   [Mar]   [28]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [KJ][PATCH] BIT macro cleanup
Milind Arun Choudhary wrote:
> BIT macro cleanup,now in bitops.h
>
> Signed-off-by: Milind Arun Choudhary <milindchoudhary@gmail.com>
>
> ---
>
<snip>
> diff --git a/drivers/net/s2io.h b/drivers/net/s2io.h
> index 0de0c65..5aa3be5 100644
> --- a/drivers/net/s2io.h
> +++ b/drivers/net/s2io.h
> @@ -14,6 +14,7 @@
> #define _S2IO_H
>
> #define TBD 0
> +#undef BIT
> #define BIT(loc) (0x8000000000000000ULL >> (loc))
> #define vBIT(val, loc, sz) (((u64)val) << (64-loc-sz))
> #define INV(d) ((d&0xff)<<24) | (((d>>8)&0xff)<<16) | (((d>>16)&0xff)<<8)| ((d>>24)&0xff)
>
Why not use "LLBIT(63 - loc)" instead?

Richard Knutsson

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2007-03-29 05:53    [W:0.126 / U:0.096 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site