Re: [PATCH 4/5] ata: libata-scsi: Assign local_port_no at host allocation time

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

 



On Wed, Jun 19, 2024 at 01:04:44PM +0900, Damien Le Moal wrote:
> 
> So the confusion here is the naming: ap->print_id is an ID increasing for all
> adapters, ap->port_no is the index of the port in the host (adapter) array of
> ports and local_port_no is the same + 1...
> 
> So I think we can get rid of local_port_no by simply rewriting:
> 
> ata_port_simple_attr(local_port_no, port_no, "%u\n", unsigned int);
> 
> in libata-transport.c. That will avoid this useless and confusing code.

Right now, libsas ports has both port_no and local_port_no set to 0,
so if we change common code to always print sysfs port_no attribute
as ap->port_no + 1, the sysfs value for libsas ports will change,
which would be a user visible change, but perhaps that is fine?

I don't understand why sysfs port_no should start at 0 for libsas,
but at 1 for other libata ports.


Kind regards,
Niklas




[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