From: Menna Mahmoud <eng.mennamahmoud.mm@gmail.com>
To: outreachy@lists.linux.dev
Cc: lars@metafoo.de, Michael.Hennerich@analog.com, jic23@kernel.org,
gregkh@linuxfoundation.org, linux-iio@vger.kernel.org,
linux-staging@lists.linux.dev, linux-kernel@vger.kernel.org,
eng.mennamahmoud.mm@gmail.com
Subject: [PATCH] staging: iio: meter: enclose Macros with complex values in parentheses
Date: Sun, 12 Mar 2023 15:33:47 +0200 [thread overview]
Message-ID: <20230312133347.120944-1-eng.mennamahmoud.mm@gmail.com> (raw)
enclose Macros with complex values in parentheses is especially useful
in making macro definitions “safe” (so that they
evaluate each operand exactly once).
this error reported by chechpatch.pl
"ERROR: Macros with complex values should be enclosed in parentheses"
for ADE7854_SPI_SLOW, ADE7854_SPI_BURST and ADE7854_SPI_FAST
macros and this error fixed by enclose these macros in parentheses.
Signed-off-by: Menna Mahmoud <eng.mennamahmoud.mm@gmail.com>
---
drivers/staging/iio/meter/ade7854.h | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/drivers/staging/iio/meter/ade7854.h b/drivers/staging/iio/meter/ade7854.h
index 7a49f8f1016f..41eeedef569b 100644
--- a/drivers/staging/iio/meter/ade7854.h
+++ b/drivers/staging/iio/meter/ade7854.h
@@ -139,9 +139,9 @@
#define ADE7854_MAX_RX 7
#define ADE7854_STARTUP_DELAY 1000
-#define ADE7854_SPI_SLOW (u32)(300 * 1000)
-#define ADE7854_SPI_BURST (u32)(1000 * 1000)
-#define ADE7854_SPI_FAST (u32)(2000 * 1000)
+#define ADE7854_SPI_SLOW ((u32)(300 * 1000))
+#define ADE7854_SPI_BURST ((u32)(1000 * 1000))
+#define ADE7854_SPI_FAST ((u32)(2000 * 1000))
/**
* struct ade7854_state - device instance specific data
--
2.34.1
next reply other threads:[~2023-03-12 13:34 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-03-12 13:33 Menna Mahmoud [this message]
2023-03-12 14:12 ` Julia Lawall
2023-03-12 14:23 ` Menna Mahmoud
2023-03-12 14:25 ` Julia Lawall
2023-03-15 0:25 ` Alison Schofield
2023-03-15 4:19 ` Dan Carpenter
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=20230312133347.120944-1-eng.mennamahmoud.mm@gmail.com \
--to=eng.mennamahmoud.mm@gmail.com \
--cc=Michael.Hennerich@analog.com \
--cc=gregkh@linuxfoundation.org \
--cc=jic23@kernel.org \
--cc=lars@metafoo.de \
--cc=linux-iio@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-staging@lists.linux.dev \
--cc=outreachy@lists.linux.dev \
/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®