* [PATCH] staging: vt6655: Add braces to macro parameter 'iobase'
@ 2023-02-04 3:50 Guru Mehar Rachaputi
2023-02-04 7:55 ` Greg Kroah-Hartman
0 siblings, 1 reply; 3+ messages in thread
From: Guru Mehar Rachaputi @ 2023-02-04 3:50 UTC (permalink / raw)
To: Forest Bond, Greg Kroah-Hartman, linux-staging, linux-kernel
This patch is to fix checkpatch warning: "Macro argument 'iobase' may be better
as '(iobase)' to avoid precedence issues.
Signed-off-by: Guru Mehar Rachaputi <gurumeharrachaputi@gmail.com>
---
drivers/staging/vt6655/mac.h | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/staging/vt6655/mac.h b/drivers/staging/vt6655/mac.h
index acf931c3f5fd..a33af2852227 100644
--- a/drivers/staging/vt6655/mac.h
+++ b/drivers/staging/vt6655/mac.h
@@ -537,9 +537,9 @@
/*--------------------- Export Macros ------------------------------*/
-#define VT6655_MAC_SELECT_PAGE0(iobase) iowrite8(0, iobase + MAC_REG_PAGE1SEL)
+#define VT6655_MAC_SELECT_PAGE0(iobase) iowrite8(0, (iobase) + MAC_REG_PAGE1SEL)
-#define VT6655_MAC_SELECT_PAGE1(iobase) iowrite8(1, iobase + MAC_REG_PAGE1SEL)
+#define VT6655_MAC_SELECT_PAGE1(iobase) iowrite8(1, (iobase) + MAC_REG_PAGE1SEL)
#define MAKEWORD(lb, hb) \
((unsigned short)(((unsigned char)(lb)) | (((unsigned short)((unsigned char)(hb))) << 8)))
--
2.34.1
--
Thanks & Regards,
Guru
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] staging: vt6655: Add braces to macro parameter 'iobase'
2023-02-04 3:50 [PATCH] staging: vt6655: Add braces to macro parameter 'iobase' Guru Mehar Rachaputi
@ 2023-02-04 7:55 ` Greg Kroah-Hartman
2023-02-05 0:14 ` Guru Mehar Rachaputi
0 siblings, 1 reply; 3+ messages in thread
From: Greg Kroah-Hartman @ 2023-02-04 7:55 UTC (permalink / raw)
To: Guru Mehar Rachaputi; +Cc: Forest Bond, linux-staging, linux-kernel
On Sat, Feb 04, 2023 at 04:50:41AM +0100, Guru Mehar Rachaputi wrote:
> This patch is to fix checkpatch warning: "Macro argument 'iobase' may be better
> as '(iobase)' to avoid precedence issues.
>
> Signed-off-by: Guru Mehar Rachaputi <gurumeharrachaputi@gmail.com>
> ---
> drivers/staging/vt6655/mac.h | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/staging/vt6655/mac.h b/drivers/staging/vt6655/mac.h
> index acf931c3f5fd..a33af2852227 100644
> --- a/drivers/staging/vt6655/mac.h
> +++ b/drivers/staging/vt6655/mac.h
> @@ -537,9 +537,9 @@
>
> /*--------------------- Export Macros ------------------------------*/
>
> -#define VT6655_MAC_SELECT_PAGE0(iobase) iowrite8(0, iobase + MAC_REG_PAGE1SEL)
> +#define VT6655_MAC_SELECT_PAGE0(iobase) iowrite8(0, (iobase) + MAC_REG_PAGE1SEL)
This change really doesn't make much sense, right? How about turning
these into an inline function instead? That would be the correct thing
to do overall, right?
thanks,
greg k-h
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] staging: vt6655: Add braces to macro parameter 'iobase'
2023-02-04 7:55 ` Greg Kroah-Hartman
@ 2023-02-05 0:14 ` Guru Mehar Rachaputi
0 siblings, 0 replies; 3+ messages in thread
From: Guru Mehar Rachaputi @ 2023-02-05 0:14 UTC (permalink / raw)
To: Greg Kroah-Hartman; +Cc: Forest Bond, linux-staging, linux-kernel
On Sat, Feb 04, 2023 at 08:55:09AM +0100, Greg Kroah-Hartman wrote:
> On Sat, Feb 04, 2023 at 04:50:41AM +0100, Guru Mehar Rachaputi wrote:
> > This patch is to fix checkpatch warning: "Macro argument 'iobase' may be better
> > as '(iobase)' to avoid precedence issues.
> >
> > Signed-off-by: Guru Mehar Rachaputi <gurumeharrachaputi@gmail.com>
> > ---
> > drivers/staging/vt6655/mac.h | 4 ++--
> > 1 file changed, 2 insertions(+), 2 deletions(-)
> >
> > diff --git a/drivers/staging/vt6655/mac.h b/drivers/staging/vt6655/mac.h
> > index acf931c3f5fd..a33af2852227 100644
> > --- a/drivers/staging/vt6655/mac.h
> > +++ b/drivers/staging/vt6655/mac.h
> > @@ -537,9 +537,9 @@
> >
> > /*--------------------- Export Macros ------------------------------*/
> >
> > -#define VT6655_MAC_SELECT_PAGE0(iobase) iowrite8(0, iobase + MAC_REG_PAGE1SEL)
> > +#define VT6655_MAC_SELECT_PAGE0(iobase) iowrite8(0, (iobase) + MAC_REG_PAGE1SEL)
>
> This change really doesn't make much sense, right? How about turning
> these into an inline function instead? That would be the correct thing
> to do overall, right?
>
> thanks,
>
> greg k-h
Thanks for the reply and advice.
I have modified accordingly and sending in as a v2 patch for the above.
--
Thanks & Regards,
Guru
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2023-02-05 0:14 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-02-04 3:50 [PATCH] staging: vt6655: Add braces to macro parameter 'iobase' Guru Mehar Rachaputi
2023-02-04 7:55 ` Greg Kroah-Hartman
2023-02-05 0:14 ` Guru Mehar Rachaputi
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).