]> git.karo-electronics.de Git - karo-tx-linux.git/commit
EDAC, altera: Avoid unused function warnings
authorArnd Bergmann <arnd@arndb.de>
Sat, 16 Apr 2016 20:13:56 +0000 (22:13 +0200)
committerBorislav Petkov <bp@suse.de>
Sat, 23 Apr 2016 10:00:12 +0000 (12:00 +0200)
commit1aa6eb5c5b35771cfb28265eccd99b4b203b4154
tree1b1c125e6fb279df2e5de766a4efb6d7f37ba8d0
parent2c911f6cac9388830d2afb350d29f43f115b1a28
EDAC, altera: Avoid unused function warnings

The recently added Arria10 OCRAM ECC support caused some new harmless
warnings about unused functions when it is disabled:

  drivers/edac/altera_edac.c:1067:20: error: 'altr_edac_a10_ecc_irq' defined but not used [-Werror=unused-function]
  drivers/edac/altera_edac.c:658:12: error: 'altr_check_ecc_deps' defined but not used [-Werror=unused-function]

This rearranges the code slightly to have those two functions inside
of the same #ifdef that hides their callers. It also manages to
avoid a forward declaration of the IRQ handler in the process.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Acked-by: Thor Thayer <tthayer@opensource.altera.com>
Cc: Alan Tull <atull@opensource.altera.com>
Cc: Dinh Nguyen <dinguyen@opensource.altera.com>
Cc: linux-edac <linux-edac@vger.kernel.org>
Fixes: c7b4be8db8bc ("EDAC, altera: Add Arria10 OCRAM ECC support")
Link: http://lkml.kernel.org/r/1460837650-1237650-2-git-send-email-arnd@arndb.de
Signed-off-by: Borislav Petkov <bp@suse.de>
drivers/edac/altera_edac.c