Linux kernel staging patches
 help / color / mirror / Atom feed
From: aliya-rahmani <aliyarahmani786@gmail.com>
To: outreachy@lists.linux.dev
Cc: florian.c.schilhabel@googlemail.com, gregkh@linuxfoundation.org,
	linux-staging@lists.linux.dev,
	aliya-rahmani <aliyarahmani786@gmail.com>
Subject: [PATCH] staging: rtl8712: efuse: code style - avoid macro argument precedence issues
Date: Mon, 11 Apr 2022 12:11:43 +0530	[thread overview]
Message-ID: <20220411064143.45300-1-aliyarahmani786@gmail.com> (raw)

This patch fixes the following checkpatch.pl check:
 CHECK: Macro argument 'offset' and 'word_en' may be better as '(offset)' and 'word_en' to avoid precedence issues

Signed-off-by: aliya-rahmani <aliyarahmani786@gmail.com>
---
 drivers/staging/rtl8712/rtl8712_efuse.h | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/staging/rtl8712/rtl8712_efuse.h b/drivers/staging/rtl8712/rtl8712_efuse.h
index 4969d307e978..2e1ea9d7a295 100644
--- a/drivers/staging/rtl8712/rtl8712_efuse.h
+++ b/drivers/staging/rtl8712/rtl8712_efuse.h
@@ -15,8 +15,8 @@
 
 #define GET_EFUSE_OFFSET(header)	((header & 0xF0) >> 4)
 #define GET_EFUSE_WORD_EN(header)	(header & 0x0F)
-#define MAKE_EFUSE_HEADER(offset, word_en)	(((offset & 0x0F) << 4) | \
-						(word_en & 0x0F))
+#define MAKE_EFUSE_HEADER(offset, word_en)	((((offset) & 0x0F) << 4) | \
+						((word_en) & 0x0F))
 /*--------------------------------------------------------------------------*/
 struct PGPKT_STRUCT {
 	u8 offset;
-- 
2.25.1


             reply	other threads:[~2022-04-11  6:42 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-04-11  6:41 aliya-rahmani [this message]
2022-04-11  6:47 ` [PATCH] staging: rtl8712: efuse: code style - avoid macro argument precedence issues Julia Lawall
2022-04-11 11:02   ` [PATCH v2] " aliya-rahmani

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=20220411064143.45300-1-aliyarahmani786@gmail.com \
    --to=aliyarahmani786@gmail.com \
    --cc=florian.c.schilhabel@googlemail.com \
    --cc=gregkh@linuxfoundation.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