lkml.org 
[lkml]   [2014]   [Nov]   [18]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] ARM: vfp: Silence mvfr0 unused variable warning
Hi Stephen,

On Tue, 18 Nov 2014 12:56:31 -0800 Stephen Boyd <sboyd@codeaurora.org> wrote:
>
> Stephen Rothwell reports that commit 3f4c9f8f0a20 ("ARM: 8197/1:
> vfp: Fix VFPv3 hwcap detection on CPUID based cpus") introduced an
> unused variable warning.
>
> arch/arm/vfp/vfpmodule.c: In function 'vfp_init':
> arch/arm/vfp/vfpmodule.c:725:6: warning: unused variable 'mvfr0'
> [-Wunused-variable]
> u32 mvfr0;
>
> Silence this warning by using IS_ENABLED instead of ifdefs.
>
> Reported-by: Stephen Rothwell <sfr@canb.auug.org.au>
> Signed-off-by: Stephen Boyd <sboyd@codeaurora.org>

Looks good (though I haven't tested it). One small nit below:

> + if (IS_ENABLED(CONFIG_VFPv3)) {
> + mvfr0 = fmrx(MVFR0);

Now that you have a block here, you could move the declaration of mvfr0
into this block, right?

--
Cheers,
Stephen Rothwell sfr@canb.auug.org.au
[unhandled content-type:application/pgp-signature]
\
 
 \ /
  Last update: 2014-11-18 22:41    [W:0.048 / U:0.164 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site