lkml.org 
[lkml]   [2007]   [Aug]   [23]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 4/9] s2io, rename BIT macro
Jiri Slaby wrote:
> s2io, rename BIT macro
>
> BIT macro will be global definiton of (1<<x)
>
> Signed-off-by: Jiri Slaby <jirislaby@gmail.com>
>
> ---
>
[snip]
> cnt++;
> if (cnt == 5)
> diff --git a/drivers/net/s2io.h b/drivers/net/s2io.h
> index 92983ee..448f899 100644
> --- a/drivers/net/s2io.h
> +++ b/drivers/net/s2io.h
> @@ -14,7 +14,7 @@
> #define _S2IO_H
>
> #define TBD 0
> -#define BIT(loc) (0x8000000000000000ULL >> (loc))
> +#define s2BIT(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)
>
>
Sorry for the late response, but would it not be better/easier to use
BIT() instead (or a global #define LLBIT(nr) (1ULL << (nr))) and just
recalculate the values?

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-08-24 04:41    [W:0.733 / U:0.068 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site