From: Julia Lawall <julia.lawall@inria.fr>
To: aliya-rahmani <aliyarahmani786@gmail.com>
Cc: outreachy@lists.linux.dev, florian.c.schilhabel@googlemail.com,
gregkh@linuxfoundation.org, linux-staging@lists.linux.dev
Subject: Re: [PATCH] staging: rtl8712: efuse: code style - avoid macro argument precedence issues
Date: Mon, 11 Apr 2022 08:47:24 +0200 (CEST) [thread overview]
Message-ID: <alpine.DEB.2.22.394.2204110845280.3197@hadrien> (raw)
In-Reply-To: <20220411064143.45300-1-aliyarahmani786@gmail.com>
On Mon, 11 Apr 2022, aliya-rahmani wrote:
> 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
Your messages say "avoid" and "fix", but they don't explicitly say what
you do.
>
> Signed-off-by: aliya-rahmani <aliyarahmani786@gmail.com>
This could be better as:
Aliya Rahmani <aliyarahmani786@gmail.com>
julia
> ---
> 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
>
>
>
next prev parent reply other threads:[~2022-04-11 6:47 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-04-11 6:41 [PATCH] staging: rtl8712: efuse: code style - avoid macro argument precedence issues aliya-rahmani
2022-04-11 6:47 ` Julia Lawall [this message]
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=alpine.DEB.2.22.394.2204110845280.3197@hadrien \
--to=julia.lawall@inria.fr \
--cc=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