From: Nathan Howard Date: Fri, 17 Feb 2017 20:16:19 +0000 (-0500) Subject: staging: bcm2835-audio: bcm2835.h: fix macro coding style issue X-Git-Tag: v4.12-rc1~84^2~892 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=36ba7ca84ac8612b80a7af5229b5ace5c631dcf2;p=thirdparty%2Fkernel%2Flinux.git staging: bcm2835-audio: bcm2835.h: fix macro coding style issue Fix checkpatch.pl warning of the form "CHECK: Macro argument 'vol' may be better as '(vol)' to avoid precedence issues." Signed-off-by: Nathan Howard Signed-off-by: Greg Kroah-Hartman --- diff --git a/drivers/staging/bcm2835-audio/bcm2835.h b/drivers/staging/bcm2835-audio/bcm2835.h index 81fdb1041f062..2f9d1c95a29fa 100644 --- a/drivers/staging/bcm2835-audio/bcm2835.h +++ b/drivers/staging/bcm2835-audio/bcm2835.h @@ -77,8 +77,11 @@ enum { /* macros for alsa2chip and chip2alsa, instead of functions */ -#define alsa2chip(vol) (uint)(-((vol << 8) / 100)) /* convert alsa to chip volume (defined as macro rather than function call) */ -#define chip2alsa(vol) -((vol * 100) >> 8) /* convert chip to alsa volume */ +// convert alsa to chip volume (defined as macro rather than function call) +#define alsa2chip(vol) (uint)(-(((vol) << 8) / 100)) + +// convert chip to alsa volume +#define chip2alsa(vol) -(((vol) * 100) >> 8) /* Some constants for values .. */ enum snd_bcm2835_route {