[U-Boot] [PATCH] common/spl: Mark arguments as unused

Tom Rini trini at ti.com
Tue Oct 23 17:45:49 CEST 2012


On Tue, Oct 23, 2012 at 12:26:53PM +0200, Stefan Roese wrote:
> On 10/23/2012 12:05 PM, Vikram Narayanan wrote:
> > As dummy{1,2} are not used anywhere, mark it with __maybe_unused
> >
> > Signed-off-by: Vikram Narayanan <vikram186 at gmail.com>
> > Cc: Stefan Roese <sr at denx.de>
> > ---
> >  common/spl/spl.c |    2 +-
> >  1 files changed, 1 insertions(+), 1 deletions(-)
> > 
> > diff --git a/common/spl/spl.c b/common/spl/spl.c
> > index 0d829c0..62fd3bd 100644
> > --- a/common/spl/spl.c
> > +++ b/common/spl/spl.c
> > @@ -145,7 +145,7 @@ static void spl_ram_load_image(void)
> >  }
> >  #endif
> >  
> > -void board_init_r(gd_t *dummy1, ulong dummy2)
> > +void board_init_r(__maybe_unused gd_t *dummy1, __maybe_unused ulong dummy2)
> >  {
> >  	u32 boot_device;
> >  	debug(">>spl:board_init_r()\n");
> > 
> 
> Perhaps even __always_unused instead of __maybe_unused as these
> variables are never used?

Also, what does this give us?  Fixing a sparse warning?

-- 
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 836 bytes
Desc: Digital signature
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20121023/9c8bf30b/attachment.pgp>


More information about the U-Boot mailing list