From: Guangbin Huang <huangguangbin2@huawei.com>
To: <wg@grandegger.com>, <mkl@pengutronix.de>, <davem@davemloft.net>,
<kuba@kernel.org>
Cc: <linux-can@vger.kernel.org>, <netdev@vger.kernel.org>,
<linux-kernel@vger.kernel.org>, <lipeng321@huawei.com>,
<huangguangbin2@huawei.com>
Subject: [PATCH net-next 3/8] net: at91_can: fix the code style issue about macro
Date: Sat, 19 Jun 2021 17:56:24 +0800 [thread overview]
Message-ID: <1624096589-13452-4-git-send-email-huangguangbin2@huawei.com> (raw)
In-Reply-To: <1624096589-13452-1-git-send-email-huangguangbin2@huawei.com>
From: Peng Li <lipeng321@huawei.com>
Macros with complex values should be enclosed in parentheses
Signed-off-by: Peng Li <lipeng321@huawei.com>
Signed-off-by: Guangbin Huang <huangguangbin2@huawei.com>
---
drivers/net/can/at91_can.c | 16 ++++++++--------
1 file changed, 8 insertions(+), 8 deletions(-)
diff --git a/drivers/net/can/at91_can.c b/drivers/net/can/at91_can.c
index 058c18fac167..8ea638d04cc7 100644
--- a/drivers/net/can/at91_can.c
+++ b/drivers/net/can/at91_can.c
@@ -43,14 +43,14 @@ enum at91_reg {
};
/* Mailbox registers (0 <= i <= 15) */
-#define AT91_MMR(i) (enum at91_reg)(0x200 + ((i) * 0x20))
-#define AT91_MAM(i) (enum at91_reg)(0x204 + ((i) * 0x20))
-#define AT91_MID(i) (enum at91_reg)(0x208 + ((i) * 0x20))
-#define AT91_MFID(i) (enum at91_reg)(0x20C + ((i) * 0x20))
-#define AT91_MSR(i) (enum at91_reg)(0x210 + ((i) * 0x20))
-#define AT91_MDL(i) (enum at91_reg)(0x214 + ((i) * 0x20))
-#define AT91_MDH(i) (enum at91_reg)(0x218 + ((i) * 0x20))
-#define AT91_MCR(i) (enum at91_reg)(0x21C + ((i) * 0x20))
+#define AT91_MMR(i) ((enum at91_reg)(0x200 + ((i) * 0x20)))
+#define AT91_MAM(i) ((enum at91_reg)(0x204 + ((i) * 0x20)))
+#define AT91_MID(i) ((enum at91_reg)(0x208 + ((i) * 0x20)))
+#define AT91_MFID(i) ((enum at91_reg)(0x20C + ((i) * 0x20)))
+#define AT91_MSR(i) ((enum at91_reg)(0x210 + ((i) * 0x20)))
+#define AT91_MDL(i) ((enum at91_reg)(0x214 + ((i) * 0x20)))
+#define AT91_MDH(i) ((enum at91_reg)(0x218 + ((i) * 0x20)))
+#define AT91_MCR(i) ((enum at91_reg)(0x21C + ((i) * 0x20)))
/* Register bits */
#define AT91_MR_CANEN BIT(0)
--
2.8.1
next prev parent reply other threads:[~2021-06-19 10:00 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-06-19 9:56 [PATCH net-next 0/8] net: at91_can: clean up some code style issues Guangbin Huang
2021-06-19 9:56 ` [PATCH net-next 1/8] net: at91_can: remove redundant blank lines Guangbin Huang
2021-06-19 9:56 ` [PATCH net-next 2/8] net: at91_can: add blank line after declarations Guangbin Huang
2021-06-19 9:56 ` Guangbin Huang [this message]
2021-06-19 9:56 ` [PATCH net-next 4/8] net: at91_can: use BIT macro Guangbin Huang
2021-06-19 9:56 ` [PATCH net-next 5/8] net: at91_can: fix the alignment issue Guangbin Huang
2021-06-19 9:56 ` [PATCH net-next 6/8] net: at91_can: add braces {} to all arms of the statement Guangbin Huang
2021-06-19 9:56 ` [PATCH net-next 7/8] net: at91_can: remove redundant space Guangbin Huang
2021-06-19 9:56 ` [PATCH net-next 8/8] net: at91_can: fix the comments style issue Guangbin Huang
2021-06-19 20:21 ` [PATCH net-next 0/8] net: at91_can: clean up some code style issues Marc Kleine-Budde
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=1624096589-13452-4-git-send-email-huangguangbin2@huawei.com \
--to=huangguangbin2@huawei.com \
--cc=davem@davemloft.net \
--cc=kuba@kernel.org \
--cc=linux-can@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=lipeng321@huawei.com \
--cc=mkl@pengutronix.de \
--cc=netdev@vger.kernel.org \
--cc=wg@grandegger.com \
/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).