Re: bit ops on unsigned long?

Rusty Russell (
Mon, 25 Mar 2002 18:07:07 +1100

In message <> you write:
> > These changed are required because otherwise you try to do set_bit on
> > something not aligned as a long on all archs.
> But of course. I'm not denying that. Naturally the type should be
> changed. I thought that was obvious so I didn't bother agreeing. But
> in fact, it already *is* aligned on a long boundary. Better, in
> fact. It's aligned on a 16 byte boundary. Even though the type was
> __u32.

I'm confused:

@@ -212,7 +212,7 @@
struct minor_list
int major;
- __u32 bits[8];
+ unsigned long bits[256 / BITS_PER_LONG];
struct minor_list *next;

How, exactly, did "bits" end up on a 16-bute boundary before this


  Anyone who quotes me in their sig is an idiot. -- Rusty Russell.
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to
More majordomo info at
Please read the FAQ at