From: Simon Horman <horms@verge.net.au>
To: Arnd Bergmann <arnd@arndb.de>
Cc: Hai Nguyen Pham <hai.pham.ud@renesas.com>,
Joerg Roedel <jroedel@suse.de>,
Geert Uytterhoeven <geert+renesas@glider.be>,
Will Deacon <will@kernel.org>,
linux-kernel@vger.kernel.org, iommu@lists.linux-foundation.org,
Robin Murphy <robin.murphy@arm.com>
Subject: Re: [PATCH] iommu/renesas: fix unused-function warning
Date: Tue, 12 May 2020 11:53:29 +0200 [thread overview]
Message-ID: <20200512095329.GA18408@vergenet.net> (raw)
In-Reply-To: <20200508220224.688985-1-arnd@arndb.de>
On Sat, May 09, 2020 at 12:02:16AM +0200, Arnd Bergmann wrote:
> gcc warns because the only reference to ipmmu_find_group
> is inside of an #ifdef:
>
> drivers/iommu/ipmmu-vmsa.c:878:28: error: 'ipmmu_find_group' defined but not used [-Werror=unused-function]
>
> Change the #ifdef to an equivalent IS_ENABLED().
>
> Fixes: 6580c8a78424 ("iommu/renesas: Convert to probe/release_device() call-backs")
> Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Reviewed-by: Simon Horman <horms@verge.net.au>
> ---
> drivers/iommu/ipmmu-vmsa.c | 7 ++-----
> 1 file changed, 2 insertions(+), 5 deletions(-)
>
> diff --git a/drivers/iommu/ipmmu-vmsa.c b/drivers/iommu/ipmmu-vmsa.c
> index fb7e702dee23..4c2972f3153b 100644
> --- a/drivers/iommu/ipmmu-vmsa.c
> +++ b/drivers/iommu/ipmmu-vmsa.c
> @@ -903,11 +903,8 @@ static const struct iommu_ops ipmmu_ops = {
> .probe_device = ipmmu_probe_device,
> .release_device = ipmmu_release_device,
> .probe_finalize = ipmmu_probe_finalize,
> -#if defined(CONFIG_ARM) && !defined(CONFIG_IOMMU_DMA)
> - .device_group = generic_device_group,
> -#else
> - .device_group = ipmmu_find_group,
> -#endif
> + .device_group = IS_ENABLED(CONFIG_ARM) && !IS_ENABLED(CONFIG_IOMMU_DMA)
> + ? generic_device_group : ipmmu_find_group,
> .pgsize_bitmap = SZ_1G | SZ_2M | SZ_4K,
> .of_xlate = ipmmu_of_xlate,
> };
> --
> 2.26.0
>
_______________________________________________
iommu mailing list
iommu@lists.linux-foundation.org
https://lists.linuxfoundation.org/mailman/listinfo/iommu
WARNING: multiple messages have this Message-ID (diff)
From: Simon Horman <horms@verge.net.au>
To: Arnd Bergmann <arnd@arndb.de>
Cc: Joerg Roedel <joro@8bytes.org>, Joerg Roedel <jroedel@suse.de>,
Geert Uytterhoeven <geert+renesas@glider.be>,
Yoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com>,
Will Deacon <will@kernel.org>,
Robin Murphy <robin.murphy@arm.com>,
Hai Nguyen Pham <hai.pham.ud@renesas.com>,
iommu@lists.linux-foundation.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] iommu/renesas: fix unused-function warning
Date: Tue, 12 May 2020 11:53:29 +0200 [thread overview]
Message-ID: <20200512095329.GA18408@vergenet.net> (raw)
In-Reply-To: <20200508220224.688985-1-arnd@arndb.de>
On Sat, May 09, 2020 at 12:02:16AM +0200, Arnd Bergmann wrote:
> gcc warns because the only reference to ipmmu_find_group
> is inside of an #ifdef:
>
> drivers/iommu/ipmmu-vmsa.c:878:28: error: 'ipmmu_find_group' defined but not used [-Werror=unused-function]
>
> Change the #ifdef to an equivalent IS_ENABLED().
>
> Fixes: 6580c8a78424 ("iommu/renesas: Convert to probe/release_device() call-backs")
> Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Reviewed-by: Simon Horman <horms@verge.net.au>
> ---
> drivers/iommu/ipmmu-vmsa.c | 7 ++-----
> 1 file changed, 2 insertions(+), 5 deletions(-)
>
> diff --git a/drivers/iommu/ipmmu-vmsa.c b/drivers/iommu/ipmmu-vmsa.c
> index fb7e702dee23..4c2972f3153b 100644
> --- a/drivers/iommu/ipmmu-vmsa.c
> +++ b/drivers/iommu/ipmmu-vmsa.c
> @@ -903,11 +903,8 @@ static const struct iommu_ops ipmmu_ops = {
> .probe_device = ipmmu_probe_device,
> .release_device = ipmmu_release_device,
> .probe_finalize = ipmmu_probe_finalize,
> -#if defined(CONFIG_ARM) && !defined(CONFIG_IOMMU_DMA)
> - .device_group = generic_device_group,
> -#else
> - .device_group = ipmmu_find_group,
> -#endif
> + .device_group = IS_ENABLED(CONFIG_ARM) && !IS_ENABLED(CONFIG_IOMMU_DMA)
> + ? generic_device_group : ipmmu_find_group,
> .pgsize_bitmap = SZ_1G | SZ_2M | SZ_4K,
> .of_xlate = ipmmu_of_xlate,
> };
> --
> 2.26.0
>
next prev parent reply other threads:[~2020-05-12 9:59 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-05-08 22:02 [PATCH] iommu/renesas: fix unused-function warning Arnd Bergmann
2020-05-08 22:02 ` Arnd Bergmann
2020-05-12 9:53 ` Simon Horman [this message]
2020-05-12 9:53 ` Simon Horman
2020-05-13 8:58 ` Joerg Roedel
2020-05-13 8:58 ` Joerg Roedel
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=20200512095329.GA18408@vergenet.net \
--to=horms@verge.net.au \
--cc=arnd@arndb.de \
--cc=geert+renesas@glider.be \
--cc=hai.pham.ud@renesas.com \
--cc=iommu@lists.linux-foundation.org \
--cc=jroedel@suse.de \
--cc=linux-kernel@vger.kernel.org \
--cc=robin.murphy@arm.com \
--cc=will@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.