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 v2] staging: kpc2000: kpc_i2c: remove the macros inb_p and outb_p
Date: Mon, 10 Jun 2019 22:19:33 -0400 [thread overview]
Message-ID: <20190611021933.GA915@arch-01.home> (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
> @@ -307,28 +301,28 @@ static int i801_block_transaction_byte_by_byte(struct i2c_device *priv, union i2
> else
> smbcmd = I801_BLOCK_DATA;
> }
> - outb_p(smbcmd | ENABLE_INT9, SMBHSTCNT(priv));
> + writeq(smbcmd | ENABLE_INT9, (void *)SMBHSTCNT(priv));
>
> if (i == 1)
> - outb_p(inb(SMBHSTCNT(priv)) | I801_START, SMBHSTCNT(priv));
> + writeq(inb(SMBHSTCNT(priv)) | I801_START, (void *)SMBHSTCNT(priv));
This inb() call looks like a bug. We perform a 64-bit operation when
talking to this hardware register everywhere else in this driver. Anyone
have more insight into the hardware with which this driver interacts
such that they could shed some light on the subject?
Probably a separate issue, but I did notice it as a result of this patch.
Thanks,
Geordan
next prev parent reply other threads:[~2019-06-11 2:20 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
2019-06-11 2:19 ` Geordan Neukum [this message]
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=20190611021933.GA915@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