Re: [PATCH 1/3] PNP cleanups - Make use of pnp_{port,mem,irq,dma}_{start,end,flags}macros wherever possible

From: Rene Herman
Date: Tue Nov 20 2007 - 05:21:45 EST


On 20-11-07 10:51, Thomas Renninger wrote:

Make use of pnp_{port,mem,irq,dma}_{start,end,flags} macros wherever possible

The macros to access the resource table in pnp sublayer was not used
consequently.
This patch makes use of these macros instead of accessing the resource
arrays directly.

For dma and irq also pnp_{dma,irq}_{start,end} macros have been introduced
to unify the access to the different resource types.

The pnp_{irq,dma} macros has now the same functionality than the:
pnp_{irq,dma}_start macros. This will be cleaned up by the next patch.

Signed-off-by: Thomas Renninger <trenn@xxxxxxx>

Earlier comments (in private mail):

- dev->res.port_resource[nport].start =
+ pnp_port_start(dev, nport) =
simple_strtoul(buf, &buf, 0);
If I'm not mistaken, there's a standing fatwa on macros as lvalues.
Andrew?

Andrew Morton wrote:

Well, it's a pretty nasty thing to do, IMO. But given that we've already
gone and done it I suppose the change is OK from a consistency POV.

Otherwise acked as identity transformation.

Acked-by: Rene Herman <rene.herman@xxxxxxxxx>

Rene.

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