Re: [git patches] libata updates for 2.6.34

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

 



On 03/05/2010 01:58 PM, Bartlomiej Zolnierkiewicz wrote:
On Monday 01 March 2010 09:23:30 pm Jeff Garzik wrote:

       libata: Pass host flags into the pci helper

It introduces a subtle bug:

struct ata_host {
...
	unsigned long		flags;

@@ -1642,8 +1643,8 @@ extern int ata_pci_sff_activate_host(struct ata_host *host,
  				     irq_handler_t irq_handler,
  				     struct scsi_host_template *sht);
  extern int ata_pci_sff_init_one(struct pci_dev *pdev,
-				const struct ata_port_info * const * ppi,
-				struct scsi_host_template *sht, void *host_priv);
+		const struct ata_port_info * const * ppi,
+		struct scsi_host_template *sht, void *host_priv, int hflags);

'int' type is not equal 'unsigned long' one on 64-bit architectures.

True but largely irrelevant as we will never use more than 32 bits worth of host flags.


Besides doing it this way is clearly suboptimal as the same effect
could have been achieved by doing:

extern int __ata_pci_sff_init_one(struct pci_dev *pdev,
				const struct ata_port_info * const *ppi,
				struct scsi_host_template *sht, void *host_priv,
				int hflag);
static inline int ata_pci_sff_init_one(struct pci_dev *pdev,
				const struct ata_port_info * const *ppi,
				struct scsi_host_template *sht, void *host_priv)
{
	return __ata_pci_sff_init_one(pdev, ppi, sht, host_priv, 0);
}

This is far uglier than simply changing the API.


without the need to update all drivers and without breaking pending
out-of-tree driver patches (yeah, it breaks my pata_ep93xx patches)..

Every post you include a disclaimer about "my patches are not intended for upstream" yet you still complain?

Some people are never satisfied...

	Jeff


--
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