diff options
author | Niklas Cassel <cassel@kernel.org> | 2024-07-03 20:44:22 +0200 |
---|---|---|
committer | Niklas Cassel <cassel@kernel.org> | 2024-07-04 11:52:32 +0200 |
commit | 1dd63a6b573ffb989ca618e60b6469f885454606 (patch) | |
tree | 7f39c301d59bad4fcd55c901c5a77586b56fa1ff /drivers/ata/libata-transport.c | |
parent | ata: libata-sata: Remove superfluous assignment in ata_sas_port_alloc() (diff) | |
download | linux-1dd63a6b573ffb989ca618e60b6469f885454606.tar.xz linux-1dd63a6b573ffb989ca618e60b6469f885454606.zip |
ata: libata-core: Remove local_port_no struct member
ap->local_port_no is simply ap->port_no + 1.
Since ap->local_port_no can be derived from ap->port_no, there is no need
for the ap->local_port_no struct member, so remove ap->local_port_no.
Reviewed-by: Damien Le Moal <dlemoal@kernel.org>
Reviewed-by: Hannes Reinecke <hare@suse.de>
Reviewed-by: Martin K. Petersen <martin.petersen@oracle.com>
Link: https://lore.kernel.org/r/20240703184418.723066-16-cassel@kernel.org
Signed-off-by: Niklas Cassel <cassel@kernel.org>
Diffstat (limited to 'drivers/ata/libata-transport.c')
-rw-r--r-- | drivers/ata/libata-transport.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/ata/libata-transport.c b/drivers/ata/libata-transport.c index d24f201c0ab2..9e24c33388f9 100644 --- a/drivers/ata/libata-transport.c +++ b/drivers/ata/libata-transport.c @@ -217,7 +217,8 @@ static DEVICE_ATTR(name, S_IRUGO, show_ata_port_##name, NULL) ata_port_simple_attr(nr_pmp_links, nr_pmp_links, "%d\n", int); ata_port_simple_attr(stats.idle_irq, idle_irq, "%ld\n", unsigned long); -ata_port_simple_attr(local_port_no, port_no, "%u\n", unsigned int); +/* We want the port_no sysfs attibute to start at 1 (ap->port_no starts at 0) */ +ata_port_simple_attr(port_no + 1, port_no, "%u\n", unsigned int); static DECLARE_TRANSPORT_CLASS(ata_port_class, "ata_port", NULL, NULL, NULL); |