Re: [RFC][PATCH] Expanding the size of "start" and "end" field in"struct resource"

From: Eric W. Biederman
Date: Wed Mar 15 2006 - 16:32:58 EST


Vivek Goyal <vgoyal@xxxxxxxxxx> writes:

> Few problems which I have noticed so far.
>
> - Many printk() warnings. Wherever start and end are being printed,
> the format specifier being used is %lx. Needs to be changed to %Lx.

Sane, but we need to check the 64bit case as well.

> - Some folks save a pointer of type (unsigned long *) to start and end field
> and then try to operate on it. This pointer type shall have to be changed
> to something like u64*.
>
> unsigned long *port, *end, *tport, *tend;
> port = &dev->res.port_resource[idx].start;

Weird.

> - Some folks cast "start" to a pointer and then use it. Compiler gives warning.
>
> addr_reg = (void __iomem *) addr->start;

I'm not familiar enough with that part of the code off the top of my head
but that except for a few helper functions that kind of behavior should
be pretty much forbidden.

This feels like entering the guts of ugly barely working drivers at
the moment.

Eric

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