EDAC/altera: Skip defining unused structures for specific configs
authorKrzysztof Kozlowski <krzysztof.kozlowski@canonical.com>
Tue, 1 Jun 2021 09:27:04 +0000 (11:27 +0200)
committerBorislav Petkov <bp@suse.de>
Mon, 16 Aug 2021 18:21:46 +0000 (20:21 +0200)
commit7d07deb3b838ae93994003cf824515acb352eef3
treeeef8ac51edb3b491484e9cfa31fd9efbb128f47d
parent767f4b620edadac579c9b8b6660761d4285fa6f9
EDAC/altera: Skip defining unused structures for specific configs

The Altera EDAC driver has several features conditionally built
depending on Kconfig options. The edac_device_prv_data structures
are conditionally used in of_device_id tables. They reference other
functions and structures which can be defined as __maybe_unused.

Silence build warnings like:

  drivers/edac/altera_edac.c:643:37: warning:
      ‘altr_edac_device_inject_fops’ defined but not used [-Wunused-const-variable=]

Reported-by: kernel test robot <lkp@intel.com>
Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@canonical.com>
Signed-off-by: Borislav Petkov <bp@suse.de>
Acked-by: Dinh Nguyen <dinguyen@kernel.org>
Link: https://lkml.kernel.org/r/20210601092704.203555-1-krzysztof.kozlowski@canonical.com
drivers/edac/altera_edac.c