Commit 5d6fb560 authored by Arnd Bergmann's avatar Arnd Bergmann Committed by Vinod Koul

dmaengine: ste_dma40: fix unneeded variable warning

clang-9 points out that there are two variables that depending on the
configuration may only be used in an ARRAY_SIZE() expression but not
referenced:

drivers/dma/ste_dma40.c:145:12: error: variable 'd40_backup_regs' is not needed and will not be emitted [-Werror,-Wunneeded-internal-declaration]
static u32 d40_backup_regs[] = {
           ^
drivers/dma/ste_dma40.c:214:12: error: variable 'd40_backup_regs_chan' is not needed and will not be emitted [-Werror,-Wunneeded-internal-declaration]
static u32 d40_backup_regs_chan[] = {

Mark these __maybe_unused to shut up the warning.
Signed-off-by: default avatarArnd Bergmann <arnd@arndb.de>
Reviewed-by: default avatarNathan Chancellor <natechancellor@gmail.com>
Reviewed-by: default avatarLinus Walleij <linus.walleij@linaro.org>
Link: https://lore.kernel.org/r/20190712091357.744515-1-arnd@arndb.deSigned-off-by: default avatarVinod Koul <vkoul@kernel.org>
parent 6f4722b1
...@@ -142,7 +142,7 @@ enum d40_events { ...@@ -142,7 +142,7 @@ enum d40_events {
* when the DMA hw is powered off. * when the DMA hw is powered off.
* TODO: Add save/restore of D40_DREG_GCC on dma40 v3 or later, if that works. * TODO: Add save/restore of D40_DREG_GCC on dma40 v3 or later, if that works.
*/ */
static u32 d40_backup_regs[] = { static __maybe_unused u32 d40_backup_regs[] = {
D40_DREG_LCPA, D40_DREG_LCPA,
D40_DREG_LCLA, D40_DREG_LCLA,
D40_DREG_PRMSE, D40_DREG_PRMSE,
...@@ -211,7 +211,7 @@ static u32 d40_backup_regs_v4b[] = { ...@@ -211,7 +211,7 @@ static u32 d40_backup_regs_v4b[] = {
#define BACKUP_REGS_SZ_V4B ARRAY_SIZE(d40_backup_regs_v4b) #define BACKUP_REGS_SZ_V4B ARRAY_SIZE(d40_backup_regs_v4b)
static u32 d40_backup_regs_chan[] = { static __maybe_unused u32 d40_backup_regs_chan[] = {
D40_CHAN_REG_SSCFG, D40_CHAN_REG_SSCFG,
D40_CHAN_REG_SSELT, D40_CHAN_REG_SSELT,
D40_CHAN_REG_SSPTR, D40_CHAN_REG_SSPTR,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment