Re: [PATCH 1/2] [libata] sata_mv: Remove PCI dependency

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



saeed bishara wrote:
-	if (unlikely(irq_stat & PCI_ERR)) {
+	if (unlikely(irq_stat & PCI_ERR) && HAS_PCI(host)) {
 		mv_pci_error(host, mmio);
 		handled = 1;
 		goto out_unlock;	/* skip all other HC irq handling */

the unlikely() should cover the entire expression.



 static int __init mv_init(void)
 {
-	return pci_register_driver(&mv_pci_driver);
+	int rc;
+#ifdef CONFIG_PCI
+	rc = pci_register_driver(&mv_pci_driver);
+	if (rc)
+		return rc;
+#endif
+	return 0;
 }

I would do

{
	int rc = -ENODEV;

	#ifdef CONFIG_PCI
	rc = pci_register_driver(...);
	#endif

	return rc;
}

to ensure sane non-SoC, non-PCI behavior (which this patch now enables).

Finally, in Kconfig, even when removing the CONFIG_PCI dependency, the driver suddenly has other unsatified dependencies: CONFIG_HAS_DMA and CONFIG_HAS_IOMEM. Those two need to be added to the Kconfig dep list.

I would have made these minor corrections myself, but git-am (main kernel patch-apply tool, for git users) doesn't seem to like the patch:

Applying sata_mv: Remove PCI dependency

fatal: corrupt patch at line 59


-
To unsubscribe from this list: send the line "unsubscribe linux-ide" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Filesystems]     [Linux SCSI]     [Linux RAID]     [Git]     [Kernel Newbies]     [Linux Newbie]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Samba]     [Device Mapper]

  Powered by Linux