sata_mv: Remove dumplicated host template
PATCH 1/1 sata_mv: Remove dumplicated host template
The mv5_sht and mv6_sht structures are identical. This patch removes one of those structures and renames the other to mv_sht.
--- drivers/ata/sata_mv.c | 22 ++-------------------- 1 files changed, 2 insertions(+), 20 deletions(-)
drivers/ata/sata_mv.c +2 -20
@@ -452,25 +452,7 @@ static void mv_reset_pci_bus(struct pci_dev *pdev, void __iomem *mmio);static void mv_channel_reset (struct mv_host_priv *hpriv,void __iomem *mmio,unsigned int port_no); -static struct scsi_host_template mv5_sht = { - .module =THIS_MODULE , - .name =DRV_NAME , - .ioctl = ata_scsi_ioctl, - .queuecommand = ata_scsi_queuecmd, - .can_queue =ATA_DEF_QUEUE , - .this_id =ATA_SHT_THIS_ID , - .sg_tablesize =MV_MAX_SG_CT /2 , - .cmd_per_lun =ATA_SHT_CMD_PER_LUN , - .emulated =ATA_SHT_EMULATED , - .use_clustering =1 , - .proc_name =DRV_NAME , - .dma_boundary =MV_DMA_BOUNDARY , - .slave_configure = ata_scsi_slave_config, - .slave_destroy = ata_scsi_slave_destroy, - .bios_param = ata_std_bios_param, -}; - -static struct scsi_host_template mv6_sht = { +static struct scsi_host_template mv_sht = { .module =THIS_MODULE , .name =DRV_NAME , .ioctl = ata_scsi_ioctl,
@@ -2740,7 +2722,7 @@ static int mv_init_one(struct pci_dev *pdev, const struct pci_device_id *ent)pci_set_master (pdev);pci_try_set_mwi (pdev);return ata_host_activate (host, pdev->irq, mv_interrupt,IRQF_SHARED , -IS_GEN_I (hpriv) ? &mv5_sht : &mv6_sht); + &mv_sht); }static int __init mv_init (void )
Signature · 1 line
1.5.0.6
Quoted 7 lines · Saeed Bishara
The
mv5_shtandmv6_shtstructures are identical. This patch removes one of those structures and renames the other tomv_sht.Signed-off-by Saeed Bishara <[email protected]>--- drivers/ata/sata_mv.c | 22 ++-------------------- 1 files changed, 2 insertions(+), 20 deletions(-)
Quite true -- but we must re-add mv6_sht once NCQ support is added. Therefore I'll drop this patch for now.
Mark Lord is working on this (at the behest of Marvell, I believe). I also created a preliminary NON-WORKING implementation of NCQ that I made available to Mark as a starting point:
Branch 'mv-ncq' ofgit://git.kernel.org/pub/scm/linux/kernel/git/jgarzik/libata-dev.git
If nothing happens in six months, we can revisit your patch :)
Regards,
Jeff