Re: bit ops on unsigned long?

From: Linus Torvalds (torvalds@transmeta.com)
Date: Fri Mar 15 2002 - 19:58:14 EST


On Sat, 16 Mar 2002, Rusty Russell wrote:
>
> nfs is broken in 2.5 ATM because it does set_bit on an "int".
> Can be *please* just bite the bullet and change the prototype on these
> ops so we stop seeing the same mistakes over and over?

The problem with the prototype is that it's not always correct.

It's fine to pass non-"unsigned long *" pointers to set_bit, if you know
the pointers are otherwise aligned. Things like buffer bitmaps etc.

How does the patch look? If it has a lot of unnecessary casts, I don't
want it, but if the casts are only in things like ext2_setbit(), then that
might be ok..

                Linus

-
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/



This archive was generated by hypermail 2b29 : Fri Mar 15 2002 - 22:00:22 EST