Re: [PATCH] Fix broken debug output reserve_region_with_split()

From: David Miller
Date: Mon Oct 13 2008 - 21:34:53 EST


From: "Yinghai Lu" <yinghai@xxxxxxxxxx>
Date: Mon, 13 Oct 2008 18:14:21 -0700

> On Mon, Oct 13, 2008 at 6:04 PM, H. Peter Anvin <hpa@xxxxxxxxx> wrote:
> > Benjamin Herrenschmidt wrote:
> >>
> >> That debug outpout in kernel/resource.c is busted on 32-bit
> >> machines, fix it with appropriate casts.
> >>
> >> Signed-off-by: Benjamin Herrenschmidt <benh@xxxxxxxxxxxxxxxxxxx>
> >> ---
> >>
> >> One day Yinghai will figure out that resource_size_t can be 32-bit
> >> and thus as printk arguments must be cast to (unsigned long long)
> >> explicitely when using %llx... hopefully, that day, Ingo will also
> >> catch these before committing them as it's not the first one like
> >> this :-)
>
> we had patch to remove that two debug lines.
>
> >>
> >
> > I really think Linus' solution (add a resource printf modifier, that can
> > contain the whole format) is much better.
>
> yes. some pci resource print out etc could use that too.
> to get rid of the annoying casting.
>
> BTW: can you just enforce resource_t to u64?

Casting to u64 won't work. That can be either "unsigned long" or
"unsigned long long" depending upon the architecture, so you'd still
need to cast.
--
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/