linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 00/11] Rid W=1 warnings from ATA
@ 2021-05-28  9:04 Lee Jones
  2021-05-28  9:04 ` [PATCH 01/11] ata: include: libata: Move fields commonly over-written to separate MACRO Lee Jones
                   ` (12 more replies)
  0 siblings, 13 replies; 15+ messages in thread
From: Lee Jones @ 2021-05-28  9:04 UTC (permalink / raw)
  To: lee.jones
  Cc: linux-kernel, Alan Cox, ALWAYS copy, Andre Hedrick, ATI Inc,
	benh, Jens Axboe, Mark Lord, Philipp Zabel, Tejun Heo

This set is part of a larger effort attempting to clean-up W=1
kernel builds, which are currently overwhelmingly riddled with
niggly little warnings.

Lee Jones (11):
  ata: include: libata: Move fields commonly over-written to separate
    MACRO
  ata: ahci: Ensure initialised fields are not overwritten in AHCI_SHT()
  ata: sata_sil24: Do not over-write initialise fields in 'sil24_sht'
  ata: sata_mv: Do not over-write initialise fields in 'mv6_sht'
  ata: sata_nv: Do not over-write initialise fields in 'nv_adma_sht' and
    'nv_swncq_sht'
  ata: pata_atiixp: Avoid overwriting initialised field in 'atiixp_sht'
  ata: pata_cs5520: Avoid overwriting initialised field in 'cs5520_sht'
  ata: pata_cs5530: Avoid overwriting initialised field in 'cs5530_sht'
  ata: pata_sc1200: sc1200_sht'Avoid overwriting initialised field in '
  ata: pata_serverworks: Avoid overwriting initialised field in
    'serverworks_osb4_sht
  ata: pata_macio: Avoid overwriting initialised field in
    'pata_macio_sht'

 drivers/ata/ahci.h             |  7 +++++--
 drivers/ata/pata_atiixp.c      |  3 ++-
 drivers/ata/pata_cs5520.c      |  3 ++-
 drivers/ata/pata_cs5530.c      |  3 ++-
 drivers/ata/pata_macio.c       |  5 ++++-
 drivers/ata/pata_sc1200.c      |  3 ++-
 drivers/ata/pata_serverworks.c |  3 ++-
 drivers/ata/sata_mv.c          |  6 +++++-
 drivers/ata/sata_nv.c          | 10 ++++++++--
 drivers/ata/sata_sil24.c       |  5 ++++-
 include/linux/libata.h         | 13 ++++++++-----
 11 files changed, 44 insertions(+), 17 deletions(-)

Cc: Alan Cox <alan@lxorguk.ukuu.org.uk>
Cc: ALWAYS copy <linux-ide@vger.kernel.org>
Cc: Andre Hedrick <andre@linux-ide.org>
Cc: ATI Inc <hyu@ati.com>
Cc: benh@kernel.crashing.org
Cc: Jens Axboe <axboe@kernel.dk>
Cc: linux-ide@vger.kernel.org
Cc: Mark Lord <mlord@pobox.com>
Cc: Philipp Zabel <p.zabel@pengutronix.de>
Cc: Tejun Heo <tj@kernel.org>
-- 
2.31.1


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

* [PATCH 01/11] ata: include: libata: Move fields commonly over-written to separate MACRO
  2021-05-28  9:04 [PATCH 00/11] Rid W=1 warnings from ATA Lee Jones
@ 2021-05-28  9:04 ` Lee Jones
  2021-05-28  9:04 ` [PATCH 02/11] ata: ahci: Ensure initialised fields are not overwritten in AHCI_SHT() Lee Jones
                   ` (11 subsequent siblings)
  12 siblings, 0 replies; 15+ messages in thread
From: Lee Jones @ 2021-05-28  9:04 UTC (permalink / raw)
  To: lee.jones
  Cc: linux-kernel, Jens Axboe, Mark Lord, Philipp Zabel, Tejun Heo, linux-ide

This is a pre-cursor to some upcoming W=1 fix-ups.

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

Cc: Jens Axboe <axboe@kernel.dk>
Cc: Mark Lord <mlord@pobox.com>
Cc: Philipp Zabel <p.zabel@pengutronix.de>
Cc: Tejun Heo <tj@kernel.org>
Cc: linux-ide@vger.kernel.org
Signed-off-by: Lee Jones <lee.jones@linaro.org>
---
 include/linux/libata.h | 13 ++++++++-----
 1 file changed, 8 insertions(+), 5 deletions(-)

diff --git a/include/linux/libata.h b/include/linux/libata.h
index 5f550eb27f811..3fcd24236793e 100644
--- a/include/linux/libata.h
+++ b/include/linux/libata.h
@@ -1397,25 +1397,28 @@ extern struct device_attribute *ata_common_sdev_attrs[];
 	ATA_SCSI_COMPAT_IOCTL					\
 	.queuecommand		= ata_scsi_queuecmd,		\
 	.dma_need_drain		= ata_scsi_dma_need_drain,	\
-	.can_queue		= ATA_DEF_QUEUE,		\
-	.tag_alloc_policy	= BLK_TAG_ALLOC_RR,		\
 	.this_id		= ATA_SHT_THIS_ID,		\
 	.emulated		= ATA_SHT_EMULATED,		\
 	.proc_name		= drv_name,			\
-	.slave_configure	= ata_scsi_slave_config,	\
 	.slave_destroy		= ata_scsi_slave_destroy,	\
 	.bios_param		= ata_std_bios_param,		\
 	.unlock_native_capacity	= ata_scsi_unlock_native_capacity
 
-#define ATA_BASE_SHT(drv_name)					\
+#define ATA_SUBBASE_SHT(drv_name)				\
 	__ATA_BASE_SHT(drv_name),				\
+	.can_queue		= ATA_DEF_QUEUE,		\
+	.tag_alloc_policy	= BLK_TAG_ALLOC_RR,		\
+	.slave_configure	= ata_scsi_slave_config
+
+#define ATA_BASE_SHT(drv_name)					\
+	ATA_SUBBASE_SHT(drv_name),				\
 	.sdev_attrs		= ata_common_sdev_attrs
 
 #ifdef CONFIG_SATA_HOST
 extern struct device_attribute *ata_ncq_sdev_attrs[];
 
 #define ATA_NCQ_SHT(drv_name)					\
-	__ATA_BASE_SHT(drv_name),				\
+	ATA_SUBBASE_SHT(drv_name),				\
 	.sdev_attrs		= ata_ncq_sdev_attrs,		\
 	.change_queue_depth	= ata_scsi_change_queue_depth
 #endif
-- 
2.31.1


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

* [PATCH 02/11] ata: ahci: Ensure initialised fields are not overwritten in AHCI_SHT()
  2021-05-28  9:04 [PATCH 00/11] Rid W=1 warnings from ATA Lee Jones
  2021-05-28  9:04 ` [PATCH 01/11] ata: include: libata: Move fields commonly over-written to separate MACRO Lee Jones
@ 2021-05-28  9:04 ` Lee Jones
  2021-05-28  9:04 ` [PATCH 03/11] ata: sata_sil24: Do not over-write initialise fields in 'sil24_sht' Lee Jones
                   ` (10 subsequent siblings)
  12 siblings, 0 replies; 15+ messages in thread
From: Lee Jones @ 2021-05-28  9:04 UTC (permalink / raw)
  To: lee.jones; +Cc: linux-kernel, Jens Axboe, Philipp Zabel, Tejun Heo, ALWAYS copy

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

  In file included from drivers/ata/ahci_platform.c:21:
  drivers/ata/ahci.h:388:16: warning: initialized field overwritten [-Woverride-init]
  drivers/ata/ahci_platform.c:40:2: note: in expansion of macro ‘AHCI_SHT’
  drivers/ata/ahci.h:388:16: note: (near initialization for ‘ahci_platform_sht.can_queue’)
  drivers/ata/ahci_platform.c:40:2: note: in expansion of macro ‘AHCI_SHT’
  drivers/ata/ahci.h:392:17: warning: initialized field overwritten [-Woverride-init]
  drivers/ata/ahci_platform.c:40:2: note: in expansion of macro ‘AHCI_SHT’
  drivers/ata/ahci.h:392:17: note: (near initialization for ‘ahci_platform_sht.sdev_attrs’)
  drivers/ata/ahci_platform.c:40:2: note: in expansion of macro ‘AHCI_SHT’
  In file included from drivers/ata/ahci_mtk.c:18:
  drivers/ata/ahci.h:388:16: warning: initialized field overwritten [-Woverride-init]
  drivers/ata/ahci_mtk.c:41:2: note: in expansion of macro ‘AHCI_SHT’
  drivers/ata/ahci.h:388:16: note: (near initialization for ‘ahci_platform_sht.can_queue’)
  drivers/ata/ahci_mtk.c:41:2: note: in expansion of macro ‘AHCI_SHT’
  drivers/ata/ahci.h:392:17: warning: initialized field overwritten [-Woverride-init]
  drivers/ata/ahci_mtk.c:41:2: note: in expansion of macro ‘AHCI_SHT’
  drivers/ata/ahci.h:392:17: note: (near initialization for ‘ahci_platform_sht.sdev_attrs’)
  drivers/ata/ahci_mtk.c:41:2: note: in expansion of macro ‘AHCI_SHT’
  In file included from drivers/ata/ahci_dm816.c:16:
  drivers/ata/ahci.h:388:16: warning: initialized field overwritten [-Woverride-init]
  drivers/ata/ahci_dm816.c:138:2: note: in expansion of macro ‘AHCI_SHT’
  drivers/ata/ahci.h:388:16: note: (near initialization for ‘ahci_dm816_platform_sht.can_queue’)
  drivers/ata/ahci_dm816.c:138:2: note: in expansion of macro ‘AHCI_SHT’
  drivers/ata/ahci.h:392:17: warning: initialized field overwritten [-Woverride-init]
  drivers/ata/ahci_dm816.c:138:2: note: in expansion of macro ‘AHCI_SHT’
  drivers/ata/ahci.h:392:17: note: (near initialization for ‘ahci_dm816_platform_sht.sdev_attrs’)
  drivers/ata/ahci_dm816.c:138:2: note: in expansion of macro ‘AHCI_SHT’

  NB: Snipped 150 lines of this for brevity!

Cc: Jens Axboe <axboe@kernel.dk>
Cc: Philipp Zabel <p.zabel@pengutronix.de>
Cc: Tejun Heo <tj@kernel.org>
Cc: ALWAYS copy <linux-ide@vger.kernel.org>
Cc: linux-ide@vger.kernel.org
Signed-off-by: Lee Jones <lee.jones@linaro.org>
---
 drivers/ata/ahci.h | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)

diff --git a/drivers/ata/ahci.h b/drivers/ata/ahci.h
index d1f284f0c83d9..2e89499bd9c3d 100644
--- a/drivers/ata/ahci.h
+++ b/drivers/ata/ahci.h
@@ -384,12 +384,15 @@ extern struct device_attribute *ahci_sdev_attrs[];
  * for ATA_BASE_SHT
  */
 #define AHCI_SHT(drv_name)						\
-	ATA_NCQ_SHT(drv_name),						\
+	__ATA_BASE_SHT(drv_name),					\
 	.can_queue		= AHCI_MAX_CMDS,			\
 	.sg_tablesize		= AHCI_MAX_SG,				\
 	.dma_boundary		= AHCI_DMA_BOUNDARY,			\
 	.shost_attrs		= ahci_shost_attrs,			\
-	.sdev_attrs		= ahci_sdev_attrs
+	.sdev_attrs		= ahci_sdev_attrs,			\
+	.change_queue_depth     = ata_scsi_change_queue_depth,		\
+	.tag_alloc_policy       = BLK_TAG_ALLOC_RR,             	\
+	.slave_configure        = ata_scsi_slave_config
 
 extern struct ata_port_operations ahci_ops;
 extern struct ata_port_operations ahci_platform_ops;
-- 
2.31.1


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

* [PATCH 03/11] ata: sata_sil24: Do not over-write initialise fields in 'sil24_sht'
  2021-05-28  9:04 [PATCH 00/11] Rid W=1 warnings from ATA Lee Jones
  2021-05-28  9:04 ` [PATCH 01/11] ata: include: libata: Move fields commonly over-written to separate MACRO Lee Jones
  2021-05-28  9:04 ` [PATCH 02/11] ata: ahci: Ensure initialised fields are not overwritten in AHCI_SHT() Lee Jones
@ 2021-05-28  9:04 ` Lee Jones
  2021-05-28  9:04 ` [PATCH 04/11] ata: sata_mv: Do not over-write initialise fields in 'mv6_sht' Lee Jones
                   ` (9 subsequent siblings)
  12 siblings, 0 replies; 15+ messages in thread
From: Lee Jones @ 2021-05-28  9:04 UTC (permalink / raw)
  To: lee.jones; +Cc: linux-kernel, Jens Axboe, linux-ide

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

 In file included from drivers/ata/sata_sil24.c:14:
 drivers/ata/sata_sil24.c:378:16: warning: initialized field overwritten [-Woverride-init]
 drivers/ata/sata_sil24.c:378:16: note: (near initialization for ‘sil24_sht.can_queue’)

Cc: Jens Axboe <axboe@kernel.dk>
Cc: linux-ide@vger.kernel.org
Signed-off-by: Lee Jones <lee.jones@linaro.org>
---
 drivers/ata/sata_sil24.c | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/drivers/ata/sata_sil24.c b/drivers/ata/sata_sil24.c
index 560070d4f1d09..06a1e27c4f84a 100644
--- a/drivers/ata/sata_sil24.c
+++ b/drivers/ata/sata_sil24.c
@@ -374,11 +374,14 @@ static struct pci_driver sil24_pci_driver = {
 };
 
 static struct scsi_host_template sil24_sht = {
-	ATA_NCQ_SHT(DRV_NAME),
+	__ATA_BASE_SHT(DRV_NAME),
 	.can_queue		= SIL24_MAX_CMDS,
 	.sg_tablesize		= SIL24_MAX_SGE,
 	.dma_boundary		= ATA_DMA_BOUNDARY,
 	.tag_alloc_policy	= BLK_TAG_ALLOC_FIFO,
+	.sdev_attrs		= ata_ncq_sdev_attrs,
+	.change_queue_depth	= ata_scsi_change_queue_depth,
+	.slave_configure	= ata_scsi_slave_config
 };
 
 static struct ata_port_operations sil24_ops = {
-- 
2.31.1


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

* [PATCH 04/11] ata: sata_mv: Do not over-write initialise fields in 'mv6_sht'
  2021-05-28  9:04 [PATCH 00/11] Rid W=1 warnings from ATA Lee Jones
                   ` (2 preceding siblings ...)
  2021-05-28  9:04 ` [PATCH 03/11] ata: sata_sil24: Do not over-write initialise fields in 'sil24_sht' Lee Jones
@ 2021-05-28  9:04 ` Lee Jones
  2021-05-28  9:04 ` [PATCH 05/11] ata: sata_nv: Do not over-write initialise fields in 'nv_adma_sht' and 'nv_swncq_sht' Lee Jones
                   ` (8 subsequent siblings)
  12 siblings, 0 replies; 15+ messages in thread
From: Lee Jones @ 2021-05-28  9:04 UTC (permalink / raw)
  To: lee.jones; +Cc: linux-kernel, Jens Axboe, Mark Lord, ALWAYS copy

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

 drivers/ata/sata_mv.c:670:16: warning: initialized field overwritten [-Woverride-init]
 drivers/ata/sata_mv.c:670:16: note: (near initialization for ‘mv6_sht.can_queue’)

Cc: Jens Axboe <axboe@kernel.dk>
Cc: Mark Lord <mlord@pobox.com>
Cc: ALWAYS copy <linux-ide@vger.kernel.org>
Cc: linux-ide@vger.kernel.org
Signed-off-by: Lee Jones <lee.jones@linaro.org>
---
 drivers/ata/sata_mv.c | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/drivers/ata/sata_mv.c b/drivers/ata/sata_mv.c
index c8867c12c0b86..9d86203e1e7a1 100644
--- a/drivers/ata/sata_mv.c
+++ b/drivers/ata/sata_mv.c
@@ -666,10 +666,14 @@ static struct scsi_host_template mv5_sht = {
 };
 #endif
 static struct scsi_host_template mv6_sht = {
-	ATA_NCQ_SHT(DRV_NAME),
+	__ATA_BASE_SHT(DRV_NAME),
 	.can_queue		= MV_MAX_Q_DEPTH - 1,
 	.sg_tablesize		= MV_MAX_SG_CT / 2,
 	.dma_boundary		= MV_DMA_BOUNDARY,
+	.sdev_attrs             = ata_ncq_sdev_attrs,
+	.change_queue_depth	= ata_scsi_change_queue_depth,
+	.tag_alloc_policy	= BLK_TAG_ALLOC_RR,
+	.slave_configure	= ata_scsi_slave_config
 };
 
 static struct ata_port_operations mv5_ops = {
-- 
2.31.1


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

* [PATCH 05/11] ata: sata_nv: Do not over-write initialise fields in 'nv_adma_sht' and 'nv_swncq_sht'
  2021-05-28  9:04 [PATCH 00/11] Rid W=1 warnings from ATA Lee Jones
                   ` (3 preceding siblings ...)
  2021-05-28  9:04 ` [PATCH 04/11] ata: sata_mv: Do not over-write initialise fields in 'mv6_sht' Lee Jones
@ 2021-05-28  9:04 ` Lee Jones
  2021-05-28  9:04 ` [PATCH 06/11] ata: pata_atiixp: Avoid overwriting initialised field in 'atiixp_sht' Lee Jones
                   ` (7 subsequent siblings)
  12 siblings, 0 replies; 15+ messages in thread
From: Lee Jones @ 2021-05-28  9:04 UTC (permalink / raw)
  To: lee.jones; +Cc: linux-kernel, Jens Axboe, linux-ide

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

 drivers/ata/sata_nv.c:379:16: warning: initialized field overwritten [-Woverride-init]
 drivers/ata/sata_nv.c:379:16: note: (near initialization for ‘nv_adma_sht.can_queue’)
 drivers/ata/sata_nv.c:382:21: warning: initialized field overwritten [-Woverride-init]
 drivers/ata/sata_nv.c:382:21: note: (near initialization for ‘nv_adma_sht.slave_configure’)
 drivers/ata/sata_nv.c:387:16: warning: initialized field overwritten [-Woverride-init]
 drivers/ata/sata_nv.c:387:16: note: (near initialization for ‘nv_swncq_sht.can_queue’)
 drivers/ata/sata_nv.c:390:21: warning: initialized field overwritten [-Woverride-init]
 drivers/ata/sata_nv.c:390:21: note: (near initialization for ‘nv_swncq_sht.slave_configure’)

Cc: Jens Axboe <axboe@kernel.dk>
Cc: linux-ide@vger.kernel.org
Signed-off-by: Lee Jones <lee.jones@linaro.org>
---
 drivers/ata/sata_nv.c | 10 ++++++++--
 1 file changed, 8 insertions(+), 2 deletions(-)

diff --git a/drivers/ata/sata_nv.c b/drivers/ata/sata_nv.c
index de45045566692..c385d18ce87b7 100644
--- a/drivers/ata/sata_nv.c
+++ b/drivers/ata/sata_nv.c
@@ -375,19 +375,25 @@ static struct scsi_host_template nv_sht = {
 };
 
 static struct scsi_host_template nv_adma_sht = {
-	ATA_NCQ_SHT(DRV_NAME),
+	__ATA_BASE_SHT(DRV_NAME),
 	.can_queue		= NV_ADMA_MAX_CPBS,
 	.sg_tablesize		= NV_ADMA_SGTBL_TOTAL_LEN,
 	.dma_boundary		= NV_ADMA_DMA_BOUNDARY,
 	.slave_configure	= nv_adma_slave_config,
+	.sdev_attrs             = ata_ncq_sdev_attrs,
+	.change_queue_depth     = ata_scsi_change_queue_depth,
+	.tag_alloc_policy	= BLK_TAG_ALLOC_RR,
 };
 
 static struct scsi_host_template nv_swncq_sht = {
-	ATA_NCQ_SHT(DRV_NAME),
+	__ATA_BASE_SHT(DRV_NAME),
 	.can_queue		= ATA_MAX_QUEUE - 1,
 	.sg_tablesize		= LIBATA_MAX_PRD,
 	.dma_boundary		= ATA_DMA_BOUNDARY,
 	.slave_configure	= nv_swncq_slave_config,
+	.sdev_attrs             = ata_ncq_sdev_attrs,
+	.change_queue_depth     = ata_scsi_change_queue_depth,
+	.tag_alloc_policy	= BLK_TAG_ALLOC_RR,
 };
 
 /*
-- 
2.31.1


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

* [PATCH 06/11] ata: pata_atiixp: Avoid overwriting initialised field in 'atiixp_sht'
  2021-05-28  9:04 [PATCH 00/11] Rid W=1 warnings from ATA Lee Jones
                   ` (4 preceding siblings ...)
  2021-05-28  9:04 ` [PATCH 05/11] ata: sata_nv: Do not over-write initialise fields in 'nv_adma_sht' and 'nv_swncq_sht' Lee Jones
@ 2021-05-28  9:04 ` Lee Jones
  2021-05-28  9:04 ` [PATCH 07/11] ata: pata_cs5520: Avoid overwriting initialised field in 'cs5520_sht' Lee Jones
                   ` (6 subsequent siblings)
  12 siblings, 0 replies; 15+ messages in thread
From: Lee Jones @ 2021-05-28  9:04 UTC (permalink / raw)
  To: lee.jones; +Cc: linux-kernel, Jens Axboe, ATI Inc, linux-ide

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

 drivers/ata/pata_atiixp.c:256:19: warning: initialized field overwritten [-Woverride-init]
 drivers/ata/pata_atiixp.c:256:19: note: (near initialization for ‘atiixp_sht.sg_tablesize’)

Cc: Jens Axboe <axboe@kernel.dk>
Cc: ATI Inc <hyu@ati.com>
Cc: linux-ide@vger.kernel.org
Signed-off-by: Lee Jones <lee.jones@linaro.org>
---
 drivers/ata/pata_atiixp.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/ata/pata_atiixp.c b/drivers/ata/pata_atiixp.c
index d671d33ef2874..c3a65ccd4b799 100644
--- a/drivers/ata/pata_atiixp.c
+++ b/drivers/ata/pata_atiixp.c
@@ -252,8 +252,9 @@ static void atiixp_bmdma_stop(struct ata_queued_cmd *qc)
 }
 
 static struct scsi_host_template atiixp_sht = {
-	ATA_BMDMA_SHT(DRV_NAME),
+	ATA_BASE_SHT(DRV_NAME),
 	.sg_tablesize		= LIBATA_DUMB_MAX_PRD,
+	.dma_boundary		= ATA_DMA_BOUNDARY,
 };
 
 static struct ata_port_operations atiixp_port_ops = {
-- 
2.31.1


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

* [PATCH 07/11] ata: pata_cs5520: Avoid overwriting initialised field in 'cs5520_sht'
  2021-05-28  9:04 [PATCH 00/11] Rid W=1 warnings from ATA Lee Jones
                   ` (5 preceding siblings ...)
  2021-05-28  9:04 ` [PATCH 06/11] ata: pata_atiixp: Avoid overwriting initialised field in 'atiixp_sht' Lee Jones
@ 2021-05-28  9:04 ` Lee Jones
  2021-05-28  9:04 ` [PATCH 08/11] ata: pata_cs5530: Avoid overwriting initialised field in 'cs5530_sht' Lee Jones
                   ` (5 subsequent siblings)
  12 siblings, 0 replies; 15+ messages in thread
From: Lee Jones @ 2021-05-28  9:04 UTC (permalink / raw)
  To: lee.jones; +Cc: linux-kernel, Jens Axboe, linux-ide

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

 drivers/ata/pata_cs5520.c:99:19: warning: initialized field overwritten [-Woverride-init]
 drivers/ata/pata_cs5520.c:99:19: note: (near initialization for ‘cs5520_sht.sg_tablesize’)

Cc: Jens Axboe <axboe@kernel.dk>
Cc: linux-ide@vger.kernel.org
Signed-off-by: Lee Jones <lee.jones@linaro.org>
---
 drivers/ata/pata_cs5520.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/ata/pata_cs5520.c b/drivers/ata/pata_cs5520.c
index d09d432d3c442..247c147026243 100644
--- a/drivers/ata/pata_cs5520.c
+++ b/drivers/ata/pata_cs5520.c
@@ -95,8 +95,9 @@ static void cs5520_set_piomode(struct ata_port *ap, struct ata_device *adev)
 }
 
 static struct scsi_host_template cs5520_sht = {
-	ATA_BMDMA_SHT(DRV_NAME),
+	ATA_BASE_SHT(DRV_NAME),
 	.sg_tablesize		= LIBATA_DUMB_MAX_PRD,
+	.dma_boundary		= ATA_DMA_BOUNDARY,
 };
 
 static struct ata_port_operations cs5520_port_ops = {
-- 
2.31.1


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

* [PATCH 08/11] ata: pata_cs5530: Avoid overwriting initialised field in 'cs5530_sht'
  2021-05-28  9:04 [PATCH 00/11] Rid W=1 warnings from ATA Lee Jones
                   ` (6 preceding siblings ...)
  2021-05-28  9:04 ` [PATCH 07/11] ata: pata_cs5520: Avoid overwriting initialised field in 'cs5520_sht' Lee Jones
@ 2021-05-28  9:04 ` Lee Jones
  2021-05-28  9:05 ` [PATCH 09/11] ata: pata_sc1200: sc1200_sht'Avoid overwriting initialised field in ' Lee Jones
                   ` (4 subsequent siblings)
  12 siblings, 0 replies; 15+ messages in thread
From: Lee Jones @ 2021-05-28  9:04 UTC (permalink / raw)
  To: lee.jones; +Cc: linux-kernel, Jens Axboe, linux-ide

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

 drivers/ata/pata_cs5530.c:151:18: warning: initialized field overwritten [-Woverride-init]
 drivers/ata/pata_cs5530.c:151:18: note: (near initialization for ‘cs5530_sht.sg_tablesize’)

Cc: Jens Axboe <axboe@kernel.dk>
Cc: linux-ide@vger.kernel.org
Signed-off-by: Lee Jones <lee.jones@linaro.org>
---
 drivers/ata/pata_cs5530.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/ata/pata_cs5530.c b/drivers/ata/pata_cs5530.c
index a1b4aaccaa50a..d5b7ac14e78f5 100644
--- a/drivers/ata/pata_cs5530.c
+++ b/drivers/ata/pata_cs5530.c
@@ -147,8 +147,9 @@ static unsigned int cs5530_qc_issue(struct ata_queued_cmd *qc)
 }
 
 static struct scsi_host_template cs5530_sht = {
-	ATA_BMDMA_SHT(DRV_NAME),
+	ATA_BASE_SHT(DRV_NAME),
 	.sg_tablesize	= LIBATA_DUMB_MAX_PRD,
+	.dma_boundary	= ATA_DMA_BOUNDARY,
 };
 
 static struct ata_port_operations cs5530_port_ops = {
-- 
2.31.1


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

* [PATCH 09/11] ata: pata_sc1200: sc1200_sht'Avoid overwriting initialised field in '
  2021-05-28  9:04 [PATCH 00/11] Rid W=1 warnings from ATA Lee Jones
                   ` (7 preceding siblings ...)
  2021-05-28  9:04 ` [PATCH 08/11] ata: pata_cs5530: Avoid overwriting initialised field in 'cs5530_sht' Lee Jones
@ 2021-05-28  9:05 ` Lee Jones
  2021-05-28  9:05 ` [PATCH 10/11] ata: pata_serverworks: Avoid overwriting initialised field in 'serverworks_osb4_sht Lee Jones
                   ` (3 subsequent siblings)
  12 siblings, 0 replies; 15+ messages in thread
From: Lee Jones @ 2021-05-28  9:05 UTC (permalink / raw)
  To: lee.jones; +Cc: linux-kernel, Jens Axboe, Alan Cox, Mark Lord, linux-ide

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

 drivers/ata/pata_sc1200.c:197:18: warning: initialized field overwritten [-Woverride-init]
 drivers/ata/pata_sc1200.c:197:18: note: (near initialization for ‘sc1200_sht.sg_tablesize’)

Cc: Jens Axboe <axboe@kernel.dk>
Cc: Alan Cox <alan@lxorguk.ukuu.org.uk>
Cc: Mark Lord <mlord@pobox.com>
Cc: linux-ide@vger.kernel.org
Signed-off-by: Lee Jones <lee.jones@linaro.org>
---
 drivers/ata/pata_sc1200.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/ata/pata_sc1200.c b/drivers/ata/pata_sc1200.c
index 3b8c111140bdb..f28daf62a37df 100644
--- a/drivers/ata/pata_sc1200.c
+++ b/drivers/ata/pata_sc1200.c
@@ -193,8 +193,9 @@ static int sc1200_qc_defer(struct ata_queued_cmd *qc)
 }
 
 static struct scsi_host_template sc1200_sht = {
-	ATA_BMDMA_SHT(DRV_NAME),
+	ATA_BASE_SHT(DRV_NAME),
 	.sg_tablesize	= LIBATA_DUMB_MAX_PRD,
+	.dma_boundary	= ATA_DMA_BOUNDARY,
 };
 
 static struct ata_port_operations sc1200_port_ops = {
-- 
2.31.1


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

* [PATCH 10/11] ata: pata_serverworks: Avoid overwriting initialised field in 'serverworks_osb4_sht
  2021-05-28  9:04 [PATCH 00/11] Rid W=1 warnings from ATA Lee Jones
                   ` (8 preceding siblings ...)
  2021-05-28  9:05 ` [PATCH 09/11] ata: pata_sc1200: sc1200_sht'Avoid overwriting initialised field in ' Lee Jones
@ 2021-05-28  9:05 ` Lee Jones
  2021-05-28  9:05 ` [PATCH 11/11] ata: pata_macio: Avoid overwriting initialised field in 'pata_macio_sht' Lee Jones
                   ` (2 subsequent siblings)
  12 siblings, 0 replies; 15+ messages in thread
From: Lee Jones @ 2021-05-28  9:05 UTC (permalink / raw)
  To: lee.jones; +Cc: linux-kernel, Jens Axboe, Andre Hedrick, linux-ide

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

 drivers/ata/pata_serverworks.c:257:18: warning: initialized field overwritten [-Woverride-init]
 drivers/ata/pata_serverworks.c:257:18: note: (near initialization for ‘serverworks_osb4_sht.sg_tablesize’)

Cc: Jens Axboe <axboe@kernel.dk>
Cc: Andre Hedrick <andre@linux-ide.org>
Cc: linux-ide@vger.kernel.org
Signed-off-by: Lee Jones <lee.jones@linaro.org>
---
 drivers/ata/pata_serverworks.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/ata/pata_serverworks.c b/drivers/ata/pata_serverworks.c
index 7511e11eef4d6..b602e303fb54c 100644
--- a/drivers/ata/pata_serverworks.c
+++ b/drivers/ata/pata_serverworks.c
@@ -253,8 +253,9 @@ static void serverworks_set_dmamode(struct ata_port *ap, struct ata_device *adev
 }
 
 static struct scsi_host_template serverworks_osb4_sht = {
-	ATA_BMDMA_SHT(DRV_NAME),
+	ATA_BASE_SHT(DRV_NAME),
 	.sg_tablesize	= LIBATA_DUMB_MAX_PRD,
+	.dma_boundary	= ATA_DMA_BOUNDARY,
 };
 
 static struct scsi_host_template serverworks_csb_sht = {
-- 
2.31.1


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

* [PATCH 11/11] ata: pata_macio: Avoid overwriting initialised field in 'pata_macio_sht'
  2021-05-28  9:04 [PATCH 00/11] Rid W=1 warnings from ATA Lee Jones
                   ` (9 preceding siblings ...)
  2021-05-28  9:05 ` [PATCH 10/11] ata: pata_serverworks: Avoid overwriting initialised field in 'serverworks_osb4_sht Lee Jones
@ 2021-05-28  9:05 ` Lee Jones
  2021-06-16 12:44 ` [PATCH 00/11] Rid W=1 warnings from ATA Lee Jones
  2021-06-16 12:50 ` Jens Axboe
  12 siblings, 0 replies; 15+ messages in thread
From: Lee Jones @ 2021-05-28  9:05 UTC (permalink / raw)
  To: lee.jones; +Cc: linux-kernel, Jens Axboe, benh, linux-ide

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

 drivers/ata/pata_macio.c:925:21: warning: initialized field overwritten [-Woverride-init]
 drivers/ata/pata_macio.c:925:21: note: (near initialization for ‘pata_macio_sht.slave_configure’)

Cc: Jens Axboe <axboe@kernel.dk>
Cc: benh@kernel.crashing.org
Cc: linux-ide@vger.kernel.org
Signed-off-by: Lee Jones <lee.jones@linaro.org>
---
 drivers/ata/pata_macio.c | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/drivers/ata/pata_macio.c b/drivers/ata/pata_macio.c
index e47a28271f5bb..be0ca8d5b3452 100644
--- a/drivers/ata/pata_macio.c
+++ b/drivers/ata/pata_macio.c
@@ -914,7 +914,7 @@ static int pata_macio_do_resume(struct pata_macio_priv *priv)
 #endif /* CONFIG_PM_SLEEP */
 
 static struct scsi_host_template pata_macio_sht = {
-	ATA_BASE_SHT(DRV_NAME),
+	__ATA_BASE_SHT(DRV_NAME),
 	.sg_tablesize		= MAX_DCMDS,
 	/* We may not need that strict one */
 	.dma_boundary		= ATA_DMA_BOUNDARY,
@@ -923,6 +923,9 @@ static struct scsi_host_template pata_macio_sht = {
 	 */
 	.max_segment_size	= MAX_DBDMA_SEG,
 	.slave_configure	= pata_macio_slave_config,
+	.sdev_attrs		= ata_common_sdev_attrs,
+	.can_queue		= ATA_DEF_QUEUE,
+	.tag_alloc_policy	= BLK_TAG_ALLOC_RR,
 };
 
 static struct ata_port_operations pata_macio_ops = {
-- 
2.31.1


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

* Re: [PATCH 00/11] Rid W=1 warnings from ATA
  2021-05-28  9:04 [PATCH 00/11] Rid W=1 warnings from ATA Lee Jones
                   ` (10 preceding siblings ...)
  2021-05-28  9:05 ` [PATCH 11/11] ata: pata_macio: Avoid overwriting initialised field in 'pata_macio_sht' Lee Jones
@ 2021-06-16 12:44 ` Lee Jones
  2021-06-16 12:50 ` Jens Axboe
  12 siblings, 0 replies; 15+ messages in thread
From: Lee Jones @ 2021-06-16 12:44 UTC (permalink / raw)
  To: linux-kernel, Alan Cox, ALWAYS copy, Andre Hedrick, ATI Inc,
	benh, Jens Axboe, Mark Lord, Philipp Zabel, Tejun Heo

On Fri, 28 May 2021, Lee Jones wrote:

> This set is part of a larger effort attempting to clean-up W=1
> kernel builds, which are currently overwhelmingly riddled with
> niggly little warnings.
> 
> Lee Jones (11):
>   ata: include: libata: Move fields commonly over-written to separate
>     MACRO
>   ata: ahci: Ensure initialised fields are not overwritten in AHCI_SHT()
>   ata: sata_sil24: Do not over-write initialise fields in 'sil24_sht'
>   ata: sata_mv: Do not over-write initialise fields in 'mv6_sht'
>   ata: sata_nv: Do not over-write initialise fields in 'nv_adma_sht' and
>     'nv_swncq_sht'
>   ata: pata_atiixp: Avoid overwriting initialised field in 'atiixp_sht'
>   ata: pata_cs5520: Avoid overwriting initialised field in 'cs5520_sht'
>   ata: pata_cs5530: Avoid overwriting initialised field in 'cs5530_sht'
>   ata: pata_sc1200: sc1200_sht'Avoid overwriting initialised field in '
>   ata: pata_serverworks: Avoid overwriting initialised field in
>     'serverworks_osb4_sht
>   ata: pata_macio: Avoid overwriting initialised field in
>     'pata_macio_sht'
> 
>  drivers/ata/ahci.h             |  7 +++++--
>  drivers/ata/pata_atiixp.c      |  3 ++-
>  drivers/ata/pata_cs5520.c      |  3 ++-
>  drivers/ata/pata_cs5530.c      |  3 ++-
>  drivers/ata/pata_macio.c       |  5 ++++-
>  drivers/ata/pata_sc1200.c      |  3 ++-
>  drivers/ata/pata_serverworks.c |  3 ++-
>  drivers/ata/sata_mv.c          |  6 +++++-
>  drivers/ata/sata_nv.c          | 10 ++++++++--
>  drivers/ata/sata_sil24.c       |  5 ++++-
>  include/linux/libata.h         | 13 ++++++++-----
>  11 files changed, 44 insertions(+), 17 deletions(-)
> 
> Cc: Alan Cox <alan@lxorguk.ukuu.org.uk>
> Cc: ALWAYS copy <linux-ide@vger.kernel.org>
> Cc: Andre Hedrick <andre@linux-ide.org>
> Cc: ATI Inc <hyu@ati.com>
> Cc: benh@kernel.crashing.org
> Cc: Jens Axboe <axboe@kernel.dk>
> Cc: linux-ide@vger.kernel.org
> Cc: Mark Lord <mlord@pobox.com>
> Cc: Philipp Zabel <p.zabel@pengutronix.de>
> Cc: Tejun Heo <tj@kernel.org>

These have been on the list for just about 3 weeks now.

Is anyone planning on reviewing/merging these please?

-- 
Lee Jones [李琼斯]
Senior Technical Lead - Developer Services
Linaro.org │ Open source software for Arm SoCs
Follow Linaro: Facebook | Twitter | Blog

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

* Re: [PATCH 00/11] Rid W=1 warnings from ATA
  2021-05-28  9:04 [PATCH 00/11] Rid W=1 warnings from ATA Lee Jones
                   ` (11 preceding siblings ...)
  2021-06-16 12:44 ` [PATCH 00/11] Rid W=1 warnings from ATA Lee Jones
@ 2021-06-16 12:50 ` Jens Axboe
  2021-06-17  9:49   ` Lee Jones
  12 siblings, 1 reply; 15+ messages in thread
From: Jens Axboe @ 2021-06-16 12:50 UTC (permalink / raw)
  To: Lee Jones
  Cc: linux-kernel, Alan Cox, ALWAYS copy, Andre Hedrick, ATI Inc,
	benh, Mark Lord, Philipp Zabel, Tejun Heo

On 5/28/21 3:04 AM, Lee Jones wrote:
> This set is part of a larger effort attempting to clean-up W=1
> kernel builds, which are currently overwhelmingly riddled with
> niggly little warnings.

Queued up for 5.14, thanks.

-- 
Jens Axboe


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

* Re: [PATCH 00/11] Rid W=1 warnings from ATA
  2021-06-16 12:50 ` Jens Axboe
@ 2021-06-17  9:49   ` Lee Jones
  0 siblings, 0 replies; 15+ messages in thread
From: Lee Jones @ 2021-06-17  9:49 UTC (permalink / raw)
  To: Jens Axboe
  Cc: linux-kernel, Alan Cox, ALWAYS copy, Andre Hedrick, ATI Inc,
	benh, Mark Lord, Philipp Zabel, Tejun Heo

On Wed, 16 Jun 2021, Jens Axboe wrote:

> On 5/28/21 3:04 AM, Lee Jones wrote:
> > This set is part of a larger effort attempting to clean-up W=1
> > kernel builds, which are currently overwhelmingly riddled with
> > niggly little warnings.
> 
> Queued up for 5.14, thanks.

Ideal.  Thanks a bunch Jens.

-- 
Lee Jones [李琼斯]
Senior Technical Lead - Developer Services
Linaro.org │ Open source software for Arm SoCs
Follow Linaro: Facebook | Twitter | Blog

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

end of thread, other threads:[~2021-06-17  9:50 UTC | newest]

Thread overview: 15+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-05-28  9:04 [PATCH 00/11] Rid W=1 warnings from ATA Lee Jones
2021-05-28  9:04 ` [PATCH 01/11] ata: include: libata: Move fields commonly over-written to separate MACRO Lee Jones
2021-05-28  9:04 ` [PATCH 02/11] ata: ahci: Ensure initialised fields are not overwritten in AHCI_SHT() Lee Jones
2021-05-28  9:04 ` [PATCH 03/11] ata: sata_sil24: Do not over-write initialise fields in 'sil24_sht' Lee Jones
2021-05-28  9:04 ` [PATCH 04/11] ata: sata_mv: Do not over-write initialise fields in 'mv6_sht' Lee Jones
2021-05-28  9:04 ` [PATCH 05/11] ata: sata_nv: Do not over-write initialise fields in 'nv_adma_sht' and 'nv_swncq_sht' Lee Jones
2021-05-28  9:04 ` [PATCH 06/11] ata: pata_atiixp: Avoid overwriting initialised field in 'atiixp_sht' Lee Jones
2021-05-28  9:04 ` [PATCH 07/11] ata: pata_cs5520: Avoid overwriting initialised field in 'cs5520_sht' Lee Jones
2021-05-28  9:04 ` [PATCH 08/11] ata: pata_cs5530: Avoid overwriting initialised field in 'cs5530_sht' Lee Jones
2021-05-28  9:05 ` [PATCH 09/11] ata: pata_sc1200: sc1200_sht'Avoid overwriting initialised field in ' Lee Jones
2021-05-28  9:05 ` [PATCH 10/11] ata: pata_serverworks: Avoid overwriting initialised field in 'serverworks_osb4_sht Lee Jones
2021-05-28  9:05 ` [PATCH 11/11] ata: pata_macio: Avoid overwriting initialised field in 'pata_macio_sht' Lee Jones
2021-06-16 12:44 ` [PATCH 00/11] Rid W=1 warnings from ATA Lee Jones
2021-06-16 12:50 ` Jens Axboe
2021-06-17  9:49   ` Lee Jones

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).