* [PATCH] mmc: sdhci-brcmstb: Resolve "unused" warnings with CONFIG_OF=n
@ 2022-12-06 0:04 Brian Norris
2022-12-06 0:10 ` Florian Fainelli
2022-12-07 12:37 ` Ulf Hansson
0 siblings, 2 replies; 3+ messages in thread
From: Brian Norris @ 2022-12-06 0:04 UTC (permalink / raw)
To: Ulf Hansson
Cc: linux-mmc, Florian Fainelli, Adrian Hunter, Al Cooper,
linux-kernel, linux-arm-kernel,
Broadcom internal kernel review list, Brian Norris,
kernel test robot
With W=1, we can see this gcc warning:
drivers/mmc/host/sdhci-brcmstb.c:182:34: warning: ‘sdhci_brcm_of_match’ defined but not used [-Wunused-const-variable=]
182 | static const struct of_device_id sdhci_brcm_of_match[] = {
| ^~~~~~~~~~~~~~~~~~~
Rather than play around more with #ifdef's, the simplest solution is to
just mark this __maybe_unused.
Fixes: 1fad8422c989 ("mmc: sdhci-brcmstb: Allow building with COMPILE_TEST")
Reported-by: kernel test robot <lkp@intel.com>
Link: https://lore.kernel.org/all/202212060700.NjMecjxS-lkp@intel.com/
Signed-off-by: Brian Norris <briannorris@chromium.org>
---
drivers/mmc/host/sdhci-brcmstb.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/mmc/host/sdhci-brcmstb.c b/drivers/mmc/host/sdhci-brcmstb.c
index 55d8bd232695..f2cf3d70db79 100644
--- a/drivers/mmc/host/sdhci-brcmstb.c
+++ b/drivers/mmc/host/sdhci-brcmstb.c
@@ -179,7 +179,7 @@ static const struct brcmstb_match_priv match_priv_7216 = {
.ops = &sdhci_brcmstb_ops_7216,
};
-static const struct of_device_id sdhci_brcm_of_match[] = {
+static const struct of_device_id __maybe_unused sdhci_brcm_of_match[] = {
{ .compatible = "brcm,bcm7425-sdhci", .data = &match_priv_7425 },
{ .compatible = "brcm,bcm7445-sdhci", .data = &match_priv_7445 },
{ .compatible = "brcm,bcm7216-sdhci", .data = &match_priv_7216 },
--
2.39.0.rc0.267.gcb52ba06e7-goog
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] mmc: sdhci-brcmstb: Resolve "unused" warnings with CONFIG_OF=n
2022-12-06 0:04 [PATCH] mmc: sdhci-brcmstb: Resolve "unused" warnings with CONFIG_OF=n Brian Norris
@ 2022-12-06 0:10 ` Florian Fainelli
2022-12-07 12:37 ` Ulf Hansson
1 sibling, 0 replies; 3+ messages in thread
From: Florian Fainelli @ 2022-12-06 0:10 UTC (permalink / raw)
To: Brian Norris, Ulf Hansson
Cc: linux-mmc, Florian Fainelli, Adrian Hunter, Al Cooper,
linux-kernel, linux-arm-kernel,
Broadcom internal kernel review list, kernel test robot
On 12/5/22 16:04, Brian Norris wrote:
> With W=1, we can see this gcc warning:
>
> drivers/mmc/host/sdhci-brcmstb.c:182:34: warning: ‘sdhci_brcm_of_match’ defined but not used [-Wunused-const-variable=]
> 182 | static const struct of_device_id sdhci_brcm_of_match[] = {
> | ^~~~~~~~~~~~~~~~~~~
>
> Rather than play around more with #ifdef's, the simplest solution is to
> just mark this __maybe_unused.
>
> Fixes: 1fad8422c989 ("mmc: sdhci-brcmstb: Allow building with COMPILE_TEST")
> Reported-by: kernel test robot <lkp@intel.com>
> Link: https://lore.kernel.org/all/202212060700.NjMecjxS-lkp@intel.com/
> Signed-off-by: Brian Norris <briannorris@chromium.org>
Acked-by: Florian Fainelli <f.fainelli@gmail.com>
--
Florian
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] mmc: sdhci-brcmstb: Resolve "unused" warnings with CONFIG_OF=n
2022-12-06 0:04 [PATCH] mmc: sdhci-brcmstb: Resolve "unused" warnings with CONFIG_OF=n Brian Norris
2022-12-06 0:10 ` Florian Fainelli
@ 2022-12-07 12:37 ` Ulf Hansson
1 sibling, 0 replies; 3+ messages in thread
From: Ulf Hansson @ 2022-12-07 12:37 UTC (permalink / raw)
To: Brian Norris
Cc: linux-mmc, Florian Fainelli, Adrian Hunter, Al Cooper,
linux-kernel, linux-arm-kernel,
Broadcom internal kernel review list, kernel test robot
On Tue, 6 Dec 2022 at 01:04, Brian Norris <briannorris@chromium.org> wrote:
>
> With W=1, we can see this gcc warning:
>
> drivers/mmc/host/sdhci-brcmstb.c:182:34: warning: ‘sdhci_brcm_of_match’ defined but not used [-Wunused-const-variable=]
> 182 | static const struct of_device_id sdhci_brcm_of_match[] = {
> | ^~~~~~~~~~~~~~~~~~~
>
> Rather than play around more with #ifdef's, the simplest solution is to
> just mark this __maybe_unused.
>
> Fixes: 1fad8422c989 ("mmc: sdhci-brcmstb: Allow building with COMPILE_TEST")
> Reported-by: kernel test robot <lkp@intel.com>
> Link: https://lore.kernel.org/all/202212060700.NjMecjxS-lkp@intel.com/
> Signed-off-by: Brian Norris <briannorris@chromium.org>
Applied for next, thanks!
Kind regards
Uffe
> ---
>
> drivers/mmc/host/sdhci-brcmstb.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/mmc/host/sdhci-brcmstb.c b/drivers/mmc/host/sdhci-brcmstb.c
> index 55d8bd232695..f2cf3d70db79 100644
> --- a/drivers/mmc/host/sdhci-brcmstb.c
> +++ b/drivers/mmc/host/sdhci-brcmstb.c
> @@ -179,7 +179,7 @@ static const struct brcmstb_match_priv match_priv_7216 = {
> .ops = &sdhci_brcmstb_ops_7216,
> };
>
> -static const struct of_device_id sdhci_brcm_of_match[] = {
> +static const struct of_device_id __maybe_unused sdhci_brcm_of_match[] = {
> { .compatible = "brcm,bcm7425-sdhci", .data = &match_priv_7425 },
> { .compatible = "brcm,bcm7445-sdhci", .data = &match_priv_7445 },
> { .compatible = "brcm,bcm7216-sdhci", .data = &match_priv_7216 },
> --
> 2.39.0.rc0.267.gcb52ba06e7-goog
>
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2022-12-07 12:39 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-12-06 0:04 [PATCH] mmc: sdhci-brcmstb: Resolve "unused" warnings with CONFIG_OF=n Brian Norris
2022-12-06 0:10 ` Florian Fainelli
2022-12-07 12:37 ` Ulf Hansson
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).