* [PATCH 1/2] staging: kpc2000: kpc2000_i2c: void* -> void *
@ 2019-06-08 7:27 Hao Xu
2019-06-08 7:27 ` [PATCH 2/2] staging: kpc2000: kpc2000_i2c: add space after , Hao Xu
2019-06-08 13:45 ` [PATCH 1/2] staging: kpc2000: kpc2000_i2c: void* -> void * Geordan Neukum
0 siblings, 2 replies; 4+ messages in thread
From: Hao Xu @ 2019-06-08 7:27 UTC (permalink / raw)
To: gregkh; +Cc: gneukum1, haoxu.linuxkernel, devel, linux-kernel
modify void* to void * for #define inb_p(a) readq((void*)a)
and #define outb_p(d,a) writeq(d,(void*)a)
Signed-off-by: Hao Xu <haoxu.linuxkernel@gmail.com>
---
drivers/staging/kpc2000/kpc2000_i2c.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/staging/kpc2000/kpc2000_i2c.c b/drivers/staging/kpc2000/kpc2000_i2c.c
index a434dd0..de3a0c8 100644
--- a/drivers/staging/kpc2000/kpc2000_i2c.c
+++ b/drivers/staging/kpc2000/kpc2000_i2c.c
@@ -124,9 +124,9 @@ struct i2c_device {
// FIXME!
#undef inb_p
-#define inb_p(a) readq((void*)a)
+#define inb_p(a) readq((void *)a)
#undef outb_p
-#define outb_p(d,a) writeq(d,(void*)a)
+#define outb_p(d,a) writeq(d,(void *)a)
/* Make sure the SMBus host is ready to start transmitting.
* Return 0 if it is, -EBUSY if it is not.
--
1.8.3.1
^ permalink raw reply related [flat|nested] 4+ messages in thread* [PATCH 2/2] staging: kpc2000: kpc2000_i2c: add space after ,
2019-06-08 7:27 [PATCH 1/2] staging: kpc2000: kpc2000_i2c: void* -> void * Hao Xu
@ 2019-06-08 7:27 ` Hao Xu
2019-06-08 13:45 ` [PATCH 1/2] staging: kpc2000: kpc2000_i2c: void* -> void * Geordan Neukum
1 sibling, 0 replies; 4+ messages in thread
From: Hao Xu @ 2019-06-08 7:27 UTC (permalink / raw)
To: gregkh; +Cc: gneukum1, haoxu.linuxkernel, devel, linux-kernel
add space after , for #define outb_p(d,a) writeq(d,(void *)a)
Signed-off-by: Hao Xu <haoxu.linuxkernel@gmail.com>
---
drivers/staging/kpc2000/kpc2000_i2c.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/staging/kpc2000/kpc2000_i2c.c b/drivers/staging/kpc2000/kpc2000_i2c.c
index de3a0c8..69e8773 100644
--- a/drivers/staging/kpc2000/kpc2000_i2c.c
+++ b/drivers/staging/kpc2000/kpc2000_i2c.c
@@ -126,7 +126,7 @@ struct i2c_device {
#undef inb_p
#define inb_p(a) readq((void *)a)
#undef outb_p
-#define outb_p(d,a) writeq(d,(void *)a)
+#define outb_p(d, a) writeq(d, (void *)a)
/* Make sure the SMBus host is ready to start transmitting.
* Return 0 if it is, -EBUSY if it is not.
--
1.8.3.1
^ permalink raw reply related [flat|nested] 4+ messages in thread* Re: [PATCH 1/2] staging: kpc2000: kpc2000_i2c: void* -> void *
2019-06-08 7:27 [PATCH 1/2] staging: kpc2000: kpc2000_i2c: void* -> void * Hao Xu
2019-06-08 7:27 ` [PATCH 2/2] staging: kpc2000: kpc2000_i2c: add space after , Hao Xu
@ 2019-06-08 13:45 ` Geordan Neukum
2019-06-09 11:07 ` Greg KH
1 sibling, 1 reply; 4+ messages in thread
From: Geordan Neukum @ 2019-06-08 13:45 UTC (permalink / raw)
To: Hao Xu; +Cc: gregkh, devel, linux-kernel
On Sat, Jun 08, 2019 at 03:27:46PM +0800, Hao Xu wrote:
> modify void* to void * for #define inb_p(a) readq((void*)a)
> and #define outb_p(d,a) writeq(d,(void*)a)
>
> Signed-off-by: Hao Xu <haoxu.linuxkernel@gmail.com>
> ---
> drivers/staging/kpc2000/kpc2000_i2c.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/staging/kpc2000/kpc2000_i2c.c b/drivers/staging/kpc2000/kpc2000_i2c.c
> index a434dd0..de3a0c8 100644
> --- a/drivers/staging/kpc2000/kpc2000_i2c.c
> +++ b/drivers/staging/kpc2000/kpc2000_i2c.c
> @@ -124,9 +124,9 @@ struct i2c_device {
>
> // FIXME!
> #undef inb_p
> -#define inb_p(a) readq((void*)a)
> +#define inb_p(a) readq((void *)a)
> #undef outb_p
> -#define outb_p(d,a) writeq(d,(void*)a)
> +#define outb_p(d,a) writeq(d,(void *)a)
Alternatively to fixing up the style here, did you consider just
removing these two macros altogether and calling [read|write]q
directly throughout the kpc_i2c driver (per the '//FIXME' comment)?
Unless, I'm misunderstanding something, these macros are shadowing the
functions [in|out]b_p, which already exist in io.h. [in|out]b_p are for
8-bit i/o transactions and [read|write]q are for 64-bit transactions, so
shadowing the original [in|out]b_p with something that actually does
64-bit transactions is probably potentially misleading here.
^ permalink raw reply [flat|nested] 4+ messages in thread* Re: [PATCH 1/2] staging: kpc2000: kpc2000_i2c: void* -> void *
2019-06-08 13:45 ` [PATCH 1/2] staging: kpc2000: kpc2000_i2c: void* -> void * Geordan Neukum
@ 2019-06-09 11:07 ` Greg KH
0 siblings, 0 replies; 4+ messages in thread
From: Greg KH @ 2019-06-09 11:07 UTC (permalink / raw)
To: Geordan Neukum; +Cc: Hao Xu, devel, linux-kernel
On Sat, Jun 08, 2019 at 01:45:05PM +0000, Geordan Neukum wrote:
> On Sat, Jun 08, 2019 at 03:27:46PM +0800, Hao Xu wrote:
> > modify void* to void * for #define inb_p(a) readq((void*)a)
> > and #define outb_p(d,a) writeq(d,(void*)a)
> >
> > Signed-off-by: Hao Xu <haoxu.linuxkernel@gmail.com>
> > ---
> > drivers/staging/kpc2000/kpc2000_i2c.c | 4 ++--
> > 1 file changed, 2 insertions(+), 2 deletions(-)
> >
> > diff --git a/drivers/staging/kpc2000/kpc2000_i2c.c b/drivers/staging/kpc2000/kpc2000_i2c.c
> > index a434dd0..de3a0c8 100644
> > --- a/drivers/staging/kpc2000/kpc2000_i2c.c
> > +++ b/drivers/staging/kpc2000/kpc2000_i2c.c
> > @@ -124,9 +124,9 @@ struct i2c_device {
> >
> > // FIXME!
> > #undef inb_p
> > -#define inb_p(a) readq((void*)a)
> > +#define inb_p(a) readq((void *)a)
> > #undef outb_p
> > -#define outb_p(d,a) writeq(d,(void*)a)
> > +#define outb_p(d,a) writeq(d,(void *)a)
>
> Alternatively to fixing up the style here, did you consider just
> removing these two macros altogether and calling [read|write]q
> directly throughout the kpc_i2c driver (per the '//FIXME' comment)?
>
> Unless, I'm misunderstanding something, these macros are shadowing the
> functions [in|out]b_p, which already exist in io.h. [in|out]b_p are for
> 8-bit i/o transactions and [read|write]q are for 64-bit transactions, so
> shadowing the original [in|out]b_p with something that actually does
> 64-bit transactions is probably potentially misleading here.
Yes, these should be fixed up "properly". But I'll take the coding
style cleanups for now.
thanks,
greg k-h
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2019-06-09 11:07 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-06-08 7:27 [PATCH 1/2] staging: kpc2000: kpc2000_i2c: void* -> void * Hao Xu
2019-06-08 7:27 ` [PATCH 2/2] staging: kpc2000: kpc2000_i2c: add space after , Hao Xu
2019-06-08 13:45 ` [PATCH 1/2] staging: kpc2000: kpc2000_i2c: void* -> void * Geordan Neukum
2019-06-09 11:07 ` Greg KH
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox