Skip to content

Commit

Permalink
ata: pata_macio: Avoid overwriting initialised field in 'pata_macio_sht'
Browse files Browse the repository at this point in the history
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>
Link: https://lore.kernel.org/r/20210528090502.1799866-12-lee.jones@linaro.org
Signed-off-by: Jens Axboe <axboe@kernel.dk>
  • Loading branch information
Lee Jones authored and Jens Axboe committed Jun 16, 2021
1 parent ec3d951 commit 827b3e8
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion drivers/ata/pata_macio.c
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand All @@ -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 = {
Expand Down

0 comments on commit 827b3e8

Please sign in to comment.