Re: [PATCH 16/20] libata: make ata_host_alloc() take care of hpriv alloc/free

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

 



Tejun Heo wrote:
Transfer responsibility to allocate/init hpriv from LLD/port_info to
host allocation.  All host allocation/prepare routines now
take @hpriv_hz and initialize host->private_data accordingly.
hpriv area is aligned to __alignof__(long long) and zeroed.

As hpriv handling is moved to host allocation, pinfo->private_data
is removed.  The only user of pinfo->private_data was
ata_pci_init_one() which is updated to take @hpriv argument directly.
This change makes port_info carry one less host-wide info - which
is good because mismatched scope causes confusion and bug
(e.g. ata_piix private_data init bug).

Signed-off-by: Tejun Heo <htejun@xxxxxxxxx>

A nice model to follow is netdev_priv() and the alloc_netdev() allocation code...

-
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