From: Greg KH <gregkh@linuxfoundation.org>
To: Hao Xu <haoxu.linuxkernel@gmail.com>
Cc: devel@driverdev.osuosl.org, gneukum1@gmail.com,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH v2] staging: kpc2000: kpc_i2c: remove the macros inb_p and outb_p
Date: Mon, 10 Jun 2019 17:52:25 +0200 [thread overview]
Message-ID: <20190610155225.GB29035@kroah.com> (raw)
In-Reply-To: <1560152904-31894-1-git-send-email-haoxu.linuxkernel@gmail.com>
On Mon, Jun 10, 2019 at 03:48:24PM +0800, Hao Xu wrote:
> remove inb_p and outb_p to call readq/writeq directly.
>
> Signed-off-by: Hao Xu <haoxu.linuxkernel@gmail.com>
> ---
> Changes in v2:
> - remove the macros inb_p/outb_p and use readq/writeq directly, per https://lkml.kernel.org/lkml/20190608134505.GA963@arch-01.home/
> ---
> drivers/staging/kpc2000/kpc2000_i2c.c | 112 ++++++++++++++++------------------
> 1 file changed, 53 insertions(+), 59 deletions(-)
>
> diff --git a/drivers/staging/kpc2000/kpc2000_i2c.c b/drivers/staging/kpc2000/kpc2000_i2c.c
> index 69e8773..246d5b3 100644
> --- a/drivers/staging/kpc2000/kpc2000_i2c.c
> +++ b/drivers/staging/kpc2000/kpc2000_i2c.c
> @@ -122,12 +122,6 @@ struct i2c_device {
> /* Not really a feature, but it's convenient to handle it as such */
> #define FEATURE_IDF BIT(15)
>
> -// FIXME!
> -#undef inb_p
> -#define inb_p(a) readq((void *)a)
> -#undef outb_p
> -#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.
> */
> @@ -135,7 +129,7 @@ static int i801_check_pre(struct i2c_device *priv)
> {
> int status;
>
> - status = inb_p(SMBHSTSTS(priv));
> + status = readq((void *)SMBHSTSTS(priv));
Ugh, all of the void * casting, is is really needed everywhere? That
just makes everything a mess...
thanks,
greg k-h
next prev parent reply other threads:[~2019-06-10 15:52 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-06-10 7:48 [PATCH v2] staging: kpc2000: kpc_i2c: remove the macros inb_p and outb_p Hao Xu
2019-06-10 15:52 ` Greg KH [this message]
2019-06-11 2:19 ` Geordan Neukum
2019-06-11 13:57 ` Matt Sickler
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=20190610155225.GB29035@kroah.com \
--to=gregkh@linuxfoundation.org \
--cc=devel@driverdev.osuosl.org \
--cc=gneukum1@gmail.com \
--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