[RFC PATCH 2.6.12-rc3] dynamic driver sysfs callbacks and RFC on bmcsensor rewrite

Greg KH greg at kroah.com
Tue May 10 02:03:35 CEST 2005


On Mon, May 09, 2005 at 06:34:24PM -0400, Yani Ioannou wrote:
> Hi Jean,
> 
> On 5/9/05, Jean Delvare <khali at linux-fr.org> wrote:
> > Hi Yani,
> > 
> > You could always define a static array of pointers, and use the passed
> > int as an index to that array, thus converting the int into a pointer.
> > It's not very different from defining a static array of ints and passing
> > the int addresses as the void*, but for some reason I tend to prefer the
> > int -> pointer conversion (most certainly because my view if awfully
> > biased by my misknowledge of the kernel except for the i2c and hardware
> > monitoring code).
> 
> Yes, so it is possible just very ugly :-). I'm not sure what I think
> of the int->pointer conversion, I guess its a necessary evil. I can't
> help feel like I'm doing something wrong when I do it though..

Storing an int or a long in a pointer is just fine, don't feel dirty,
it's a natural thing :)

More comments on your main patch in a bit...

thanks,

greg k-h



More information about the lm-sensors mailing list