Re: resource_size_t and printk()

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, Jul 12, 2006 at 10:18:09AM +0200, Pierre Ossman wrote:
> Greg KH wrote:
> > Good catch, care to create a patch to fix these?
> >   
> 
> Included.

> [PNP] Add missing casts in printk() arguments
> 
> Some resource_size_t values are fed to printk() without handling the fact
> that they can have different size depending on your .config.
> 
> Signed-off-by: Pierre Ossman <[email protected]>
> ---
> 
>  drivers/pnp/interface.c |   12 ++++++------
>  1 files changed, 6 insertions(+), 6 deletions(-)
> 
> diff --git a/drivers/pnp/interface.c b/drivers/pnp/interface.c
> index 3163e3d..0c14f4f 100644
> --- a/drivers/pnp/interface.c
> +++ b/drivers/pnp/interface.c
> @@ -265,8 +265,8 @@ static ssize_t pnp_show_current_resource
>  				pnp_printf(buffer," disabled\n");
>  			else
>  				pnp_printf(buffer," 0x%llx-0x%llx\n",
> -						pnp_port_start(dev, i),
> -						pnp_port_end(dev, i));
> +					(long long)pnp_port_start(dev, i),
> +					(long long)pnp_port_end(dev, i));
>  		}
>  	}
>  	for (i = 0; i < PNP_MAX_MEM; i++) {
> @@ -276,8 +276,8 @@ static ssize_t pnp_show_current_resource
>  				pnp_printf(buffer," disabled\n");
>  			else
>  				pnp_printf(buffer," 0x%llx-0x%llx\n",
> -						pnp_mem_start(dev, i),
> -						pnp_mem_end(dev, i));
> +					(long long)pnp_mem_start(dev, i),
> +					(long long)pnp_mem_end(dev, i));

Like Randy said, please use "unsigned long long".

Care to redo this?

thanks,

greg k-h
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[Index of Archives]     [Kernel Newbies]     [Netfilter]     [Bugtraq]     [Photo]     [Stuff]     [Gimp]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Video 4 Linux]     [Linux for the blind]     [Linux Resources]
  Powered by Linux