Messages in this thread | | | Date | Fri, 20 Oct 2023 10:38:23 +0300 | From | Dan Carpenter <> | Subject | Re: [PATCH] staging: rts5208: Add parenthesis to macro arguments |
| |
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
| |