Re: [PATCH] use idr_get_new to allocate a bus id indrivers/i2c/i2c-core.c

From: Andrew Morton
Date: Sun May 16 2004 - 04:38:01 EST


Faik Uygur <faikuygur@xxxxxxx> wrote:
>
> > Is the kernel likely to ever have so many bus IDs that we actually need
> > this patch? Or do you specifically want first-fit-from-zero for some
> > reason?
>
> Actually there is no special need for this. It is just what i think would
> be the expected behaviour. There was a thread two weeks ago about this issue:
>
> http://marc.theaimsgroup.com/?l=linux-kernel&m=108370586601550&w=2
>
> here is the updated patch:

Looks good to me, thanks.

fyi, the IDR implementation in -mm doesn't mangle the top eight bits of the
idr_get_new() return value, so that masking will be able to go away.

And you'll then be able to support 2^31-1 i2c adapters...
-
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/