From: Dan Carpenter <dan.carpenter@linaro.org>
To: kenechukwu maduechesi <maduechesik@gmail.com>
Cc: shreeya.patel23498@gmail.com, outreachy@lists.linux.dev,
Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
linux-staging@lists.linux.dev, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] staging: rts5208: Add parenthesis to macro arguments
Date: Fri, 20 Oct 2023 10:38:23 +0300 [thread overview]
Message-ID: <3371515f-aaac-4449-83af-e7f10d60eae3@kadam.mountain> (raw)
In-Reply-To: <20231020065439.GA3579@ubuntu>
On Thu, Oct 19, 2023 at 11:54:39PM -0700, kenechukwu maduechesi wrote:
> Checkpatch suggests using (reg) and (host) instead of reg and host
>
> The use of parenthesis in the macro argument '(reg)' ensures proper
> precedence and resolves potential issues that may arise due to the
> surrounding code context. This modification adheres to the recommended
> coding style and improves the readability or maintainability of the
> code.
>
> Signed-off-by: kenechukwu maduechesi <maduechesik@gmail.com>
> ---
> drivers/staging/rts5208/rtsx.h | 16 ++++++++--------
> 1 file changed, 8 insertions(+), 8 deletions(-)
>
> diff --git a/drivers/staging/rts5208/rtsx.h b/drivers/staging/rts5208/rtsx.h
> index 2e101da83220..7d3373797eb4 100644
> --- a/drivers/staging/rts5208/rtsx.h
> +++ b/drivers/staging/rts5208/rtsx.h
> @@ -39,17 +39,17 @@
> /*
> * macros for easy use
> */
> -#define rtsx_writel(chip, reg, value) \
> +#define rtsx_writel(chip, (reg), value) \
This will break the build. But also someone already fixed this in
linux-next.
> iowrite32(value, (chip)->rtsx->remap_addr + reg)
regards,
dan carpenter
next prev parent reply other threads:[~2023-10-20 7:38 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-10-20 6:54 [PATCH] staging: rts5208: Add parenthesis to macro arguments kenechukwu maduechesi
2023-10-20 7:38 ` Dan Carpenter [this message]
2023-10-20 7:48 ` Julia Lawall
2023-10-22 6:13 ` kernel test robot
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=3371515f-aaac-4449-83af-e7f10d60eae3@kadam.mountain \
--to=dan.carpenter@linaro.org \
--cc=gregkh@linuxfoundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-staging@lists.linux.dev \
--cc=maduechesik@gmail.com \
--cc=outreachy@lists.linux.dev \
--cc=shreeya.patel23498@gmail.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