Re: [PATCH 2/3] PNP cleanups - Unify the pnp macros to access resourcesin the pnp resource table

From: Rene Herman
Date: Tue Nov 20 2007 - 05:22:10 EST


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

Unify the pnp macros to access resources in the pnp resource table

port, mem, dma and irq resource macros are now all used in the same
way. This is the basis (or makes it at least easier) for changing how
the resources are allocated for memory optimizations.

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

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

as identity transformation again.

Andrew Morton wrote:

Normally when I get a big tree-wide patch like this I'll just drop the
hunks which get rejects so that the patch doesn't screw up other people's
trees if I merge first.


> > Index: linux-2.6.24-rc2/include/linux/pnp.h
> ===================================================================
> --- linux-2.6.24-rc2.orig/include/linux/pnp.h
> +++ linux-2.6.24-rc2/include/linux/pnp.h
> @@ -55,7 +55,6 @@ struct pnp_dev;
> (pnp_mem_end((dev),(bar)) - \
> pnp_mem_start((dev),(bar)) + 1))
> > -#define pnp_irq(dev,bar) ((dev)->res.irq_resource[(bar)].start)
> #define pnp_irq_start(dev,bar) ((dev)->res.irq_resource[(bar)].start)
> #define pnp_irq_end(dev,bar) ((dev)->res.irq_resource[(bar)].end)
> #define pnp_irq_flags(dev,bar) ((dev)->res.irq_resource[(bar)].flags)
> @@ -63,7 +62,6 @@ struct pnp_dev;
> ((pnp_irq_flags((dev),(bar)) & (IORESOURCE_IRQ | IORESOURCE_UNSET)) \
> == IORESOURCE_IRQ)
> > -#define pnp_dma(dev,bar) ((dev)->res.dma_resource[(bar)].start)

But if I do that, we'll get build breakage.

And we'll break any files which you missed in the conversion, or which
people currently have queued in the subsystem trees, or which people are
maintaining out-of-tree.

Hence I'd suggest that we retain the above as back-compatibility wrappers
for a while.

And Shaohua Li wrote:

patches are great. I have a minor comment. Keep pnp_irq and pnp_dma and
define them as pnp_irq_start and pnp_dma_start. pnp_irq_start and
pnp_dma_start is a little confusing from a pnp driver point of view.

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/