diff options
author | Niklas Cassel <cassel@kernel.org> | 2025-08-14 19:32:25 +0200 |
---|---|---|
committer | Martin K. Petersen <martin.petersen@oracle.com> | 2025-08-18 22:08:31 -0400 |
commit | 03f69351b63ea9583bd91c60a83d0a8573ea29fb (patch) | |
tree | 0e265fa101500a9a7e8508194164228e21a0e03b /scripts/kernel-doc.py | |
parent | ad70c6bc776b53e61c8db6533c833aff0ff5da8b (diff) |
scsi: pm80xx: Use pm80xx_get_local_phy_id() to access phy array
While the current code is perfectly fine (because we verify that the
device is directly attached before using attached_phy to index the
pm8001_ha->phy array), let's use the pm80xx_get_local_phy_id() helper
anyway, to reduce the chance that someone will copy paste this pattern
to other parts of the driver.
Note that in this specific case, we still need to keep the check that
the device is not behind an expander, because we do not want to clear
attached_phy of the expander if a device behind the expander disappears
(as that would disable all the other devices behind the expander).
However, if it is the expander itself that disappears, attached_phy will
be cleared, just like it would for any other directly attached device.
Signed-off-by: Niklas Cassel <cassel@kernel.org>
Link: https://lore.kernel.org/r/20250814173215.1765055-22-cassel@kernel.org
Reviewed-by: Damien Le Moal <dlemoal@kernel.org>
Reviewed-by: Igor Pylypiv <ipylypiv@google.com>
Acked-by: Jack Wang <jinpu.wang@ionos.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Diffstat (limited to 'scripts/kernel-doc.py')
0 files changed, 0 insertions, 0 deletions