linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH AUTOSEL 4.19 01/27] dmaengine: ste_dma40: fix unneeded variable warning
@ 2019-08-20 13:41 Sasha Levin
  2019-08-20 13:41 ` [PATCH AUTOSEL 4.19 02/27] nvme-multipath: revalidate nvme_ns_head gendisk in nvme_validate_ns Sasha Levin
                   ` (25 more replies)
  0 siblings, 26 replies; 29+ messages in thread
From: Sasha Levin @ 2019-08-20 13:41 UTC (permalink / raw)
  To: linux-kernel, stable
  Cc: Arnd Bergmann, Nathan Chancellor, Linus Walleij, Vinod Koul,
	Sasha Levin, dmaengine, clang-built-linux

From: Arnd Bergmann <arnd@arndb.de>

[ Upstream commit 5d6fb560729a5d5554e23db8d00eb57cd0021083 ]

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: Arnd Bergmann <arnd@arndb.de>
Reviewed-by: Nathan Chancellor <natechancellor@gmail.com>
Reviewed-by: Linus Walleij <linus.walleij@linaro.org>
Link: https://lore.kernel.org/r/20190712091357.744515-1-arnd@arndb.de
Signed-off-by: Vinod Koul <vkoul@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
 drivers/dma/ste_dma40.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/dma/ste_dma40.c b/drivers/dma/ste_dma40.c
index f4edfc56f34ef..3d55405c49cac 100644
--- a/drivers/dma/ste_dma40.c
+++ b/drivers/dma/ste_dma40.c
@@ -142,7 +142,7 @@ enum d40_events {
  * when the DMA hw is powered off.
  * 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_LCLA,
 	D40_DREG_PRMSE,
@@ -211,7 +211,7 @@ static u32 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_SSELT,
 	D40_CHAN_REG_SSPTR,
-- 
2.20.1


^ permalink raw reply related	[flat|nested] 29+ messages in thread

end of thread, other threads:[~2019-08-20 19:37 UTC | newest]

Thread overview: 29+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-08-20 13:41 [PATCH AUTOSEL 4.19 01/27] dmaengine: ste_dma40: fix unneeded variable warning Sasha Levin
2019-08-20 13:41 ` [PATCH AUTOSEL 4.19 02/27] nvme-multipath: revalidate nvme_ns_head gendisk in nvme_validate_ns Sasha Levin
2019-08-20 13:41 ` [PATCH AUTOSEL 4.19 03/27] afs: Fix the CB.ProbeUuid service handler to reply correctly Sasha Levin
2019-08-20 13:41 ` [PATCH AUTOSEL 4.19 04/27] afs: Fix loop index mixup in afs_deliver_vl_get_entry_by_name_u() Sasha Levin
2019-08-20 13:41 ` [PATCH AUTOSEL 4.19 05/27] fs: afs: Fix a possible null-pointer dereference in afs_put_read() Sasha Levin
2019-08-20 13:41 ` [PATCH AUTOSEL 4.19 06/27] afs: Only update d_fsdata if different in afs_d_revalidate() Sasha Levin
2019-08-20 13:41 ` [PATCH AUTOSEL 4.19 07/27] intel_th: Use the correct style for SPDX License Identifier Sasha Levin
2019-08-20 13:47   ` Joe Perches
2019-08-20 19:37     ` Sasha Levin
2019-08-20 13:41 ` [PATCH AUTOSEL 4.19 08/27] nvmet-loop: Flush nvme_delete_wq when removing the port Sasha Levin
2019-08-20 13:41 ` [PATCH AUTOSEL 4.19 09/27] nvme: fix a possible deadlock when passthru commands sent to a multipath device Sasha Levin
2019-08-20 13:41 ` [PATCH AUTOSEL 4.19 10/27] nvme-pci: Fix async probe remove race Sasha Levin
2019-08-20 13:41 ` [PATCH AUTOSEL 4.19 11/27] soundwire: cadence_master: fix register definition for SLAVE_STATE Sasha Levin
2019-08-20 13:41 ` [PATCH AUTOSEL 4.19 12/27] soundwire: cadence_master: fix definitions for INTSTAT0/1 Sasha Levin
2019-08-20 13:41 ` [PATCH AUTOSEL 4.19 13/27] iio: adc: max9611: Fix temperature reading in probe Sasha Levin
2019-08-20 13:42 ` [PATCH AUTOSEL 4.19 14/27] auxdisplay: panel: need to delete scan_timer when misc_register fails in panel_attach Sasha Levin
2019-08-20 13:42 ` [PATCH AUTOSEL 4.19 15/27] dmaengine: stm32-mdma: Fix a possible null-pointer dereference in stm32_mdma_irq_handler() Sasha Levin
2019-08-20 13:42 ` [PATCH AUTOSEL 4.19 16/27] omap-dma/omap_vout_vrfb: fix off-by-one fi value Sasha Levin
2019-08-20 13:42 ` [PATCH AUTOSEL 4.19 17/27] iommu/dma: Handle SG length overflow better Sasha Levin
2019-08-20 13:42 ` [PATCH AUTOSEL 4.19 18/27] usb: gadget: composite: Clear "suspended" on reset/disconnect Sasha Levin
2019-08-20 13:42 ` [PATCH AUTOSEL 4.19 19/27] usb: gadget: mass_storage: Fix races between fsg_disable and fsg_set_alt Sasha Levin
2019-08-20 13:42 ` [PATCH AUTOSEL 4.19 20/27] xen/blkback: fix memory leaks Sasha Levin
2019-08-20 13:42 ` [PATCH AUTOSEL 4.19 21/27] arm64: cpufeature: Don't treat granule sizes as strict Sasha Levin
2019-08-20 13:42 ` [PATCH AUTOSEL 4.19 22/27] i2c: rcar: avoid race when unregistering slave client Sasha Levin
2019-08-20 13:42 ` [PATCH AUTOSEL 4.19 23/27] i2c: emev2: " Sasha Levin
2019-08-20 13:42 ` [PATCH AUTOSEL 4.19 24/27] drm/ast: Fixed reboot test may cause system hanged Sasha Levin
2019-08-20 13:42 ` [PATCH AUTOSEL 4.19 25/27] usb: host: fotg2: restart hcd after port reset Sasha Levin
2019-08-20 13:42 ` [PATCH AUTOSEL 4.19 26/27] tools: hv: fixed Python pep8/flake8 warnings for lsvmbus Sasha Levin
2019-08-20 13:42 ` [PATCH AUTOSEL 4.19 27/27] tools: hv: fix KVP and VSS daemons exit code Sasha Levin

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).