Re: [KJ][PATCH] BIT macro cleanup

From: Richard Knutsson
Date: Wed Mar 28 2007 - 23:51:29 EST


Milind Arun Choudhary wrote:
BIT macro cleanup,now in bitops.h

Signed-off-by: Milind Arun Choudhary <milindchoudhary@xxxxxxxxx>

---
<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@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/