Messages in this thread | | | Date | Wed, 22 Jul 2020 14:50:32 +0200 | From | Pavel Machek <> | Subject | Re: [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] | |