Re: [PATCH] libata: reduce ata_pci_[sff,bmdma]_init_one() size

From: Alan Cox
Date: Wed Feb 09 2011 - 16:13:53 EST


> Perhaps this will save even more:
>
> if (bmdma)
> pci_set_master(pdev);
> rc = ata_pci_sff_activate_host(host, bmdma ? ata_bmdma_interrupt :
> ata_sff_interrupt, sht);

gcc is usually smart enough to work that out - and it's definitely easier
to read as Bartlomiej has it.

I agree with the comment that libata-sata rather than ifdefs would be
good for the SATA bit as well btw.

And yes ADMA was designed for PATA
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/