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

From: Florian Fainelli
Date: Mon Dec 05 2022 - 19:10:26 EST


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

Acked-by: Florian Fainelli <f.fainelli@xxxxxxxxx>
--
Florian