public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Geordan Neukum <gneukum1@gmail.com>
To: Hao Xu <haoxu.linuxkernel@gmail.com>
Cc: gregkh@linuxfoundation.org, devel@driverdev.osuosl.org,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH 1/2] staging: kpc2000: kpc2000_i2c: void* -> void *
Date: Sat, 8 Jun 2019 13:45:05 +0000	[thread overview]
Message-ID: <20190608134505.GA963@arch-01.home> (raw)
In-Reply-To: <1559978867-3693-1-git-send-email-haoxu.linuxkernel@gmail.com>

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.

  parent reply	other threads:[~2019-06-08 13:45 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
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 [this message]
2019-06-09 11:07   ` [PATCH 1/2] staging: kpc2000: kpc2000_i2c: void* -> void * Greg KH

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=20190608134505.GA963@arch-01.home \
    --to=gneukum1@gmail.com \
    --cc=devel@driverdev.osuosl.org \
    --cc=gregkh@linuxfoundation.org \
    --cc=haoxu.linuxkernel@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    /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