From: Matthew Giassa <matthew@giassa.net>
To: gregkh@linuxfoundation.org
Cc: matthew@giassa.net, gilad@benyossef.com,
devel@driverdev.osuosl.org, linux-kernel@vger.kernel.org
Subject: [PATCH 3/3] staging: ccree: resolve possible macro issue in cc_hal.h
Date: Sat, 6 May 2017 15:46:56 -0700 [thread overview]
Message-ID: <1494110816-23895-4-git-send-email-matthew@giassa.net> (raw)
In-Reply-To: <1494110816-23895-1-git-send-email-matthew@giassa.net>
Wrapping "offset" in macro definition to resolve checkpatch issue, ie:
CHECK: Macro argument 'offset' may be better as '(offset)' to avoid
precedence issues
Signed-off-by: Matthew Giassa <matthew@giassa.net>
---
drivers/staging/ccree/cc_hal.h | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/drivers/staging/ccree/cc_hal.h b/drivers/staging/ccree/cc_hal.h
index 9b54c80..eecc866 100644
--- a/drivers/staging/ccree/cc_hal.h
+++ b/drivers/staging/ccree/cc_hal.h
@@ -26,7 +26,8 @@
#define READ_REGISTER(_addr) ioread32((_addr))
#define WRITE_REGISTER(_addr, _data) iowrite32((_data), (_addr))
-#define CC_HAL_WRITE_REGISTER(offset, val) WRITE_REGISTER(cc_base + offset, val)
-#define CC_HAL_READ_REGISTER(offset) READ_REGISTER(cc_base + offset)
+#define CC_HAL_WRITE_REGISTER(offset, val) \
+ WRITE_REGISTER(cc_base + (offset), val)
+#define CC_HAL_READ_REGISTER(offset) READ_REGISTER(cc_base + (offset))
#endif
--
2.7.4
next prev parent reply other threads:[~2017-05-06 22:47 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-05-06 22:46 [PATCH 0/3] staging: ccree: resolve checkpatch issues Matthew Giassa
2017-05-06 22:46 ` [PATCH 1/3] staging: ccree: resolve training whitespace in cc_hal.h Matthew Giassa
2017-05-06 22:46 ` [PATCH 2/3] staging: ccree: resolve columns over 80 chars " Matthew Giassa
2017-05-06 22:46 ` Matthew Giassa [this message]
2017-05-06 22:56 ` [PATCH 0/3] staging: ccree: resolve checkpatch issues Matthew Giassa
2017-05-10 7:17 ` Gilad Ben-Yossef
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=1494110816-23895-4-git-send-email-matthew@giassa.net \
--to=matthew@giassa.net \
--cc=devel@driverdev.osuosl.org \
--cc=gilad@benyossef.com \
--cc=gregkh@linuxfoundation.org \
--cc=linux-kernel@vger.kernel.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
all inboxes | Powered by JetHome®