From: Viresh Kumar <viresh.kumar@linaro.org>
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,
sfr@canb.auug.org.au, conghui.chen@intel.com
Subject: Re: [PATCH] i2c: virtio: Fix the compiler warning when CONFIG_ACPI is not set
Date: Thu, 19 Aug 2021 09:19:52 +0530 [thread overview]
Message-ID: <20210819034952.vunr5v5xqcu4m4zg@vireshk-i7> (raw)
In-Reply-To: <4309f869890e70810f2c40a8d60495240e318303.1629333590.git.jie.deng@intel.com>
On 19-08-21, 08:48, Jie Deng 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")
> 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)
Acked-by: Viresh Kumar <viresh.kumar@linaro.org>
--
viresh
next prev parent reply other threads:[~2021-08-19 3:49 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
2021-08-19 3:49 ` Viresh Kumar [this message]
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=20210819034952.vunr5v5xqcu4m4zg@vireshk-i7 \
--to=viresh.kumar@linaro.org \
--cc=conghui.chen@intel.com \
--cc=jie.deng@intel.com \
--cc=linux-i2c@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=sfr@canb.auug.org.au \
--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).