lkml.org 
[lkml]   [2020]   [Jul]   [22]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH v2 10/13] cpufreq: powernow-k8: Mark 'hi' and 'lo' dummy variables as __always_unused
On Wed 2020-07-15 09:26:31, Lee Jones wrote:
> if we fail to use a variable, even a dummy ones, then the compiler
> complains that it is set but not used. We know this is fine, so we
> set them as __always_unused here to let the compiler know.
>
> Fixes the following W=1 kernel build warning(s):
>
> drivers/cpufreq/powernow-k8.c: In function ‘pending_bit_stuck’:
> drivers/cpufreq/powernow-k8.c:89:10: warning: variable ‘hi’ set but not used [-Wunused-but-set-variable]
> 89 | u32 lo, hi;
> | ^~
> drivers/cpufreq/powernow-k8.c: In function ‘core_voltage_pre_transition’:
> drivers/cpufreq/powernow-k8.c:285:14: warning: variable ‘lo’ set but not used [-Wunused-but-set-variable]
> 285 | u32 maxvid, lo, rvomult = 1;
> | ^~
>
> Cc: Andreas Herrmann <herrmann.der.user@googlemail.com>
> Cc: Dominik Brodowski <linux@brodo.de>

Acked-by: Pavel Machek <pavel@ucw.cz>

--
(english) http://www.livejournal.com/~pavelmachek
(cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html
[unhandled content-type:application/pgp-signature]
\
 
 \ /
  Last update: 2020-07-22 14:50    [W:0.640 / U:0.152 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site