Re: resource_size_t and printk()

Greg KH
2006-07-11T23:23:37Z

On Wed, Jul 05, 2006 at 06:20:07AM +0200, Pierre Ossman wrote:
> Greg KH wrote:
> > On Tue, Jul 04, 2006 at 10:54:54PM +0200, Pierre Ossman wrote:
> >
> >> Hi there!
> >>
> >> Your commit b60ba8343b78b182c03cf239d4342785376c1ad1 has been causing me
> >> a bit of confusion and I thought I'd point out the problem so that you
> >> can resolve it. :)
> >>
> >> resource_size_t is not guaranteed to be a long long, but might be a u64
> >> or u32 depending on your .config. So you need an explicit cast in the
> >> printk:s or you get a lot of junk on the output.
> >>
> >
> > That is exactly correct. Is there somewhere in that patch that I forgot
> > to fix this up properly?
> >
> >
>
> In drivers/pnp/interface.c, theres a couple of these:
>
> @@ -264,7 +264,7 @@ static ssize_t pnp_show_current_resource
> if (pnp_port_flags(dev, i) & IORESOURCE_DISABLED)
> pnp_printf(buffer," disabled\n");
> else
> - pnp_printf(buffer," 0x%lx-0x%lx\n",
> + pnp_printf(buffer," 0x%llx-0x%llx\n",
> pnp_port_start(dev, i),
> pnp_port_end(dev, i));
> }
>

Good catch, care to create a patch to fix these?

thanks,

greg k-h