diff options
author | 2021-05-28 10:04:56 +0100 | |
---|---|---|
committer | 2021-06-16 06:50:25 -0600 | |
commit | 7d43b8283eb23d7c042d2376c86d2d27365c3ed0 (patch) | |
tree | 61fbf141e92ccdb8bbb4cabfc8f45a7cb9ee9d39 /drivers/ata/sata_nv.c | |
parent | ata: sata_mv: Do not over-write initialise fields in 'mv6_sht' (diff) | |
download | linux-7d43b8283eb23d7c042d2376c86d2d27365c3ed0.tar.gz linux-7d43b8283eb23d7c042d2376c86d2d27365c3ed0.tar.bz2 linux-7d43b8283eb23d7c042d2376c86d2d27365c3ed0.zip |
ata: sata_nv: Do not over-write initialise fields in 'nv_adma_sht' and 'nv_swncq_sht'
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>
Link: https://lore.kernel.org/r/20210528090502.1799866-6-lee.jones@linaro.org
Signed-off-by: Jens Axboe <axboe@kernel.dk>
Diffstat (limited to 'drivers/ata/sata_nv.c')
-rw-r--r-- | drivers/ata/sata_nv.c | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/drivers/ata/sata_nv.c b/drivers/ata/sata_nv.c index de4504556669..c385d18ce87b 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, }; /* |