diff options
author | Damien Le Moal <damien.lemoal@opensource.wdc.com> | 2022-01-04 08:14:46 +0100 |
---|---|---|
committer | Damien Le Moal <damien.lemoal@opensource.wdc.com> | 2022-01-14 07:17:16 +0100 |
commit | e5b48ee30aec1fe6dff05e36b22e886c665b4736 (patch) | |
tree | 333dff1e9a973f1a43b2a5ea64d49152dde68220 /drivers/ata/sata_fsl.c | |
parent | ata: pata_bk3710: add compile test support (diff) | |
download | linux-e5b48ee30aec1fe6dff05e36b22e886c665b4736.tar.xz linux-e5b48ee30aec1fe6dff05e36b22e886c665b4736.zip |
ata: sata_fsl: fix scsi host initialization
When compiling with W=1, the sata_fsl driver compilation throws the
warning:
drivers/ata/sata_fsl.c:1385:22: error: initialized field overwritten
[-Werror=override-init]
1385 | .can_queue = SATA_FSL_QUEUE_DEPTH,
This is due to the driver scsi host template initialization overwriting
the can_queue field that is already set using the ATA_NCQ_SHT()
initializer macro, resulting in the same field being initialized twice
in the host template declaration.
To remove this warning, introduce the ATA_SUBBASE_SHT_QD() and
ATA_NCQ_SHT_QD() initialization macros to allow specifying a queue depth
different from the default ATA_DEF_QUEUE using an additional argument to
the macro.
Signed-off-by: Damien Le Moal <damien.lemoal@opensource.wdc.com>
Reviewed-by: Hannes Reinecke <hare@suse.de>
Diffstat (limited to 'drivers/ata/sata_fsl.c')
-rw-r--r-- | drivers/ata/sata_fsl.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/ata/sata_fsl.c b/drivers/ata/sata_fsl.c index 142e65d5efc7..101d4dd79f62 100644 --- a/drivers/ata/sata_fsl.c +++ b/drivers/ata/sata_fsl.c @@ -1380,8 +1380,7 @@ static void sata_fsl_host_stop(struct ata_host *host) * scsi mid-layer and libata interface structures */ static struct scsi_host_template sata_fsl_sht = { - ATA_NCQ_SHT("sata_fsl"), - .can_queue = SATA_FSL_QUEUE_DEPTH, + ATA_NCQ_SHT_QD("sata_fsl", SATA_FSL_QUEUE_DEPTH), .sg_tablesize = SATA_FSL_MAX_PRD_USABLE, .dma_boundary = ATA_DMA_BOUNDARY, }; |