lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20090529155148.GB28355@lackof.org>
Date:	Fri, 29 May 2009 09:51:48 -0600
From:	Grant Grundler <grundler@...isc-linux.org>
To:	Andrew Morton <akpm@...ux-foundation.org>
Cc:	Alexander Beregalov <a.beregalov@...il.com>,
	linux-parisc@...r.kernel.org, linux-kernel@...r.kernel.org,
	alan@...rguk.ukuu.org.uk
Subject: Re: [PATCH 2/2] serial: 8250_gsc: fix printk format warning

On Wed, May 27, 2009 at 10:51:06PM -0700, Andrew Morton wrote:
> On Mon, 18 May 2009 17:11:31 +0400 Alexander Beregalov <a.beregalov@...il.com> wrote:
> 
> > Fix this build warning:
> > drivers/serial/8250_gsc.c:44: warning: format '%lx' expects type
> > 'long unsigned int', but argument 2 has type 'resource_size_t'
> > 
> 
> The patch does more than fix a "warning".  It fixes an actual error. 
> The caller will prepare a 64-bit argument and the callee will print
> only 32 bits of it.

On parisc, AFAIK, GSC devices are always at a 32-bit addresses.
So whatever compiles clean is fine.

Please add "Reviewed by: Grant Grundler <grundler@...isc-linux.org>"

thanks,
grant

> > ---
> >  drivers/serial/8250_gsc.c |    2 +-
> >  1 files changed, 1 insertions(+), 1 deletions(-)
> > 
> > diff --git a/drivers/serial/8250_gsc.c b/drivers/serial/8250_gsc.c
> > index 418b4fe..a7b02a5 100644
> > --- a/drivers/serial/8250_gsc.c
> > +++ b/drivers/serial/8250_gsc.c
> > @@ -41,7 +41,7 @@ static int __init serial_init_chip(struct parisc_device *dev)
> >  			printk(KERN_INFO
> >  				"Serial: device 0x%lx not configured.\n"
> >  				"Enable support for Wax, Lasi, Asp or Dino.\n",
> > -				dev->hpa.start);
> > +				(unsigned long)dev->hpa.start);
> 
> Nope.  hpa.start can be u32 or u64.  We need to cast that to the wider
> type so that it will correctly print in all circumstances.
> 
> So I changed both patches to print with %ll and to cast to
> unsigned long long.
> --
> To unsubscribe from this list: send the line "unsubscribe linux-parisc" in
> the body of a message to majordomo@...r.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ