On Sat, 2009-05-09 at 02:52 -0400, Jeff Garzik wrote: > Ying Chu wrote: > > Hi, James > > > > DECLARE_BITMAP isn't a good option for mvsas, since the tags array couldn't be global(it's chip-related) and even if we define the static tag array both in mv64xx.c and mv94xx.c, it still couldn't honor 88SE9480 as there are 2 separate cores. So if we use DECLARE_BITMAP, it's hard to maintain the corresponding tag for different core. > > > > Can we use the following replacement: > > - u8 tags[MVS_SLOTS >> 3]; > > + unsigned long tags[MVS_SLOTS / BITS_PER_LONG]; > > You are doing exactly the same thing as DECLARE_BITMAP here, so just use > DECLARE_BITMAP :) > > include/linux/types.h: > #define DECLARE_BITMAP(name,bits) \ > unsigned long name[BITS_TO_LONGS(bits)] Right, it's one of those annoying definitions that's designed to be compound, so things like static DECLARE_BITMAP(x, y); is legal as well as struct { DECLARE_BITMAP(x,y); }; in either case, the scope is precisely what an ordinary variable would have had at that point. Most of our DECLARE_XX are designed like this. James -- To unsubscribe from this list: send the line "unsubscribe linux-scsi" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html