diff mbox series

[09/20] ata: acard-ahci: Ignore -Woverride-init

Message ID 20210128180239.548512-10-lee.jones@linaro.org
State New
Headers show
Series [01/20] ata: ahci_dm816: Ignore -Woverride-init | expand

Commit Message

Lee Jones Jan. 28, 2021, 6:02 p.m. UTC
Some ATA drivers use the SCSI host template, a series of interwoven
macros, to aid with initialisation.  Some of these macros conflict,
resulting in the over-writing of previously set values.

This is known behaviour and can be safely ignored.

Fixes the following W=1 kernel build warning(s):

 In file included from drivers/ata/acard-ahci.c:33:
 drivers/ata/ahci.h:387:16: warning: initialized field overwritten [-Woverride-init]
 drivers/ata/acard-ahci.c:70:2: note: in expansion of macro ‘AHCI_SHT’
 drivers/ata/ahci.h:387:16: note: (near initialization for ‘acard_ahci_sht.can_queue’)
 drivers/ata/acard-ahci.c:70:2: note: in expansion of macro ‘AHCI_SHT’
 drivers/ata/ahci.h:391:17: warning: initialized field overwritten [-Woverride-init]
 drivers/ata/acard-ahci.c:70:2: note: in expansion of macro ‘AHCI_SHT’
 drivers/ata/ahci.h:391:17: note: (near initialization for ‘acard_ahci_sht.sdev_attrs’)
 drivers/ata/acard-ahci.c:70:2: note: in expansion of macro ‘AHCI_SHT’

Cc: Jens Axboe <axboe@kernel.dk>
Cc: linux-ide@vger.kernel.org
Signed-off-by: Lee Jones <lee.jones@linaro.org>
---
 drivers/ata/Makefile | 1 +
 1 file changed, 1 insertion(+)
diff mbox series

Patch

diff --git a/drivers/ata/Makefile b/drivers/ata/Makefile
index 79c59550c23a0..4542f101042ac 100644
--- a/drivers/ata/Makefile
+++ b/drivers/ata/Makefile
@@ -1,5 +1,6 @@ 
 # SPDX-License-Identifier: GPL-2.0
 
+CFLAGS_acard-ahci.o		= $(call cc-disable-warning, override-init)
 CFLAGS_ahci_dm816.o		= $(call cc-disable-warning, override-init)
 CFLAGS_ahci_mtk.o		= $(call cc-disable-warning, override-init)
 CFLAGS_ahci_platform.o		= $(call cc-disable-warning, override-init)