summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNathan Howard <adanhawthorn@gmail.com>2017-02-17 15:16:19 -0500
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2017-03-06 09:17:03 +0100
commit36ba7ca84ac8612b80a7af5229b5ace5c631dcf2 (patch)
tree0d997a9cf3dc4e4262a95badc9db346626f76649
parent1e26728d90cdde8a655437ee8c2714ac4908b3cb (diff)
downloadlinux-36ba7ca84ac8612b80a7af5229b5ace5c631dcf2.tar.bz2
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 <adanhawthorn@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-rw-r--r--drivers/staging/bcm2835-audio/bcm2835.h7
1 files changed, 5 insertions, 2 deletions
diff --git a/drivers/staging/bcm2835-audio/bcm2835.h b/drivers/staging/bcm2835-audio/bcm2835.h
index 81fdb1041f06..2f9d1c95a29f 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 {