linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: adanhawthorn@gmail.com (Nathan Howard)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH 3/5] staging: bcm2835-audio: bcm2835.h: fix macro coding style issue
Date: Fri, 17 Feb 2017 15:16:19 -0500	[thread overview]
Message-ID: <1487362603-15967-3-git-send-email-adanhawthorn@gmail.com> (raw)
In-Reply-To: <1487362603-15967-1-git-send-email-adanhawthorn@gmail.com>

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>
---
 drivers/staging/bcm2835-audio/bcm2835.h | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)

diff --git a/drivers/staging/bcm2835-audio/bcm2835.h b/drivers/staging/bcm2835-audio/bcm2835.h
index 81fdb10..2f9d1c9 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 {
-- 
2.7.4

  parent reply	other threads:[~2017-02-17 20:16 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-02-17 20:16 [PATCH 1/5] staging: bcm2835-audio: bcm2835.h: fix block comment warning Nathan Howard
2017-02-17 20:16 ` [PATCH 2/5] staging: bcm2835-audio: bcm2835.h: fix printk coding style issue Nathan Howard
2017-02-17 20:16 ` Nathan Howard [this message]
2017-02-17 20:16 ` [PATCH 4/5] staging: bcm2835-audio: bcm2835.h: fix volatile " Nathan Howard
2017-02-17 23:04   ` Joe Perches
2017-02-18  0:41     ` Adan Hawthorn
2017-02-17 20:16 ` [PATCH 5/5] staging: bcm2835-audio: bcm2835.h: fix line length " Nathan Howard
2017-02-18  1:17   ` Joe Perches
2017-02-18  1:32     ` Adan Hawthorn
2017-02-18  1:38       ` Joe Perches
2017-02-18  2:08         ` Adan Hawthorn

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1487362603-15967-3-git-send-email-adanhawthorn@gmail.com \
    --to=adanhawthorn@gmail.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).