From: Stephen Rothwell <sfr@canb.auug.org.au>
To: Jie Deng <jie.deng@intel.com>
Cc: linux-i2c@vger.kernel.org,
virtualization@lists.linux-foundation.org,
linux-kernel@vger.kernel.org, wsa@kernel.org,
viresh.kumar@linaro.org, conghui.chen@intel.com
Subject: Re: [PATCH] i2c: virtio: Fix the compiler warning when CONFIG_ACPI is not set
Date: Thu, 19 Aug 2021 13:06:51 +1000 [thread overview]
Message-ID: <20210819130651.73945bcc@canb.auug.org.au> (raw)
In-Reply-To: <4309f869890e70810f2c40a8d60495240e318303.1629333590.git.jie.deng@intel.com>
[-- Attachment #1: Type: text/plain, Size: 1404 bytes --]
Hi Jie,
On Thu, 19 Aug 2021 08:48:41 +0800 Jie Deng <jie.deng@intel.com> wrote:
>
> Fix the compiler warning "drivers/i2c/busses/i2c-virtio.c:208:17:
> warning: unused variable 'pdev' [-Wunused-variable]" when CONFIG_ACPI
> is not set.
>
> Fixes: 8fb12751ac78 ("i2c: virtio: add a virtio i2c frontend driver")
Reported-by: Stephen Rothwell <sfr@canb.auug.org.au>
> Signed-off-by: Jie Deng <jie.deng@intel.com>
> ---
> drivers/i2c/busses/i2c-virtio.c | 3 +--
> 1 file changed, 1 insertion(+), 2 deletions(-)
>
> diff --git a/drivers/i2c/busses/i2c-virtio.c b/drivers/i2c/busses/i2c-virtio.c
> index d3e60d9..964c601 100644
> --- a/drivers/i2c/busses/i2c-virtio.c
> +++ b/drivers/i2c/busses/i2c-virtio.c
> @@ -205,7 +205,6 @@ static const struct i2c_adapter_quirks virtio_i2c_quirks = {
>
> static int virtio_i2c_probe(struct virtio_device *vdev)
> {
> - struct device *pdev = vdev->dev.parent;
> struct virtio_i2c *vi;
> int ret;
>
> @@ -234,7 +233,7 @@ static int virtio_i2c_probe(struct virtio_device *vdev)
> * Setup ACPI node for controlled devices which will be probed through
> * ACPI.
> */
> - ACPI_COMPANION_SET(&vi->adap.dev, ACPI_COMPANION(pdev));
> + ACPI_COMPANION_SET(&vi->adap.dev, ACPI_COMPANION(vdev->dev.parent));
>
> ret = i2c_add_adapter(&vi->adap);
> if (ret)
Looks good to me.
--
Cheers,
Stephen Rothwell
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 488 bytes --]
next prev parent reply other threads:[~2021-08-19 3:06 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-08-19 0:48 [PATCH] i2c: virtio: Fix the compiler warning when CONFIG_ACPI is not set Jie Deng
2021-08-19 3:06 ` Stephen Rothwell [this message]
2021-08-19 3:49 ` Viresh Kumar
2021-08-19 17:24 ` Wolfram Sang
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=20210819130651.73945bcc@canb.auug.org.au \
--to=sfr@canb.auug.org.au \
--cc=conghui.chen@intel.com \
--cc=jie.deng@intel.com \
--cc=linux-i2c@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=viresh.kumar@linaro.org \
--cc=virtualization@lists.linux-foundation.org \
--cc=wsa@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;
as well as URLs for NNTP newsgroup(s).