[PATCH] mmc: sdhci-brcmstb: Resolve "unused" warnings with CONFIG_OF=n

Florian Fainelli f.fainelli at gmail.com
Mon Dec 5 16:10:19 PST 2022


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 at intel.com>
> Link: https://lore.kernel.org/all/202212060700.NjMecjxS-lkp@intel.com/
> Signed-off-by: Brian Norris <briannorris at chromium.org>

Acked-by: Florian Fainelli <f.fainelli at gmail.com>
-- 
Florian




More information about the linux-arm-kernel mailing list