Re: [PATCH] PNP: make the resource type an unsigned long

From: Bjorn Helgaas
Date: Mon Aug 11 2008 - 18:19:51 EST


On Monday 11 August 2008 04:08:18 pm H. Peter Anvin wrote:
> Bjorn Helgaas wrote:
> >
> > I see hpa's point that it makes no functional difference, but I do
> > think it's worthwhile to make the types match. I don't want to
> > debug the problem that happens when somebody adds an IORESOURCE_*
> > flag in the upper bits.
>
> Then half the platforms break anyway.
>
> We should change this to an explicit type.

Are you suggesting a change to the "unsigned long flags" in struct
resource, or a different change to pnp_resource_type()?

The struct resource change sounds reasonable, but I think neither
Rene nor I want to sign up to do that right now.

Whatever we have in struct resource, I think it makes sense to use
the same type everywhere we reference the "flags" element. I think
you're saying "it doesn't matter in this case that we use different
types." But I, as a code reader, would rather not have to spend the
mental energy to convince myself that you're right.

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