summaryrefslogtreecommitdiff
path: root/drivers/scsi/scsi_transport_fc.c
diff options
context:
space:
mode:
authorDamien Le Moal <damien.lemoal@opensource.wdc.com>2022-02-28 18:48:57 +0900
committerMartin K. Petersen <martin.petersen@oracle.com>2022-03-01 23:56:27 -0500
commit32698c955295957d63f042f4bb30e9d613ca8b55 (patch)
treec58527095ea010eb5cb26f2b76e6bd9d35ce9e15 /drivers/scsi/scsi_transport_fc.c
parent26440303310591e29121964ede0048583cb3126d (diff)
scsi: libsas: Clean up sas_form_port()
Sparse throws a warning about context imbalance ("different lock contexts for basic block") in sas_form_port() as it gets confused with the fact that a port is locked within one of the two search loops and unlocked afterward outside of the search loops once the phy is added to the port. Since this code is not easy to follow, improve it by factoring out the code adding the phy to the port once the port is locked into the helper function sas_form_port_add_phy(). This helper can then be called directly within the port search loops, avoiding confusion and clearing the sparse warning. Link: https://lore.kernel.org/r/20220228094857.557329-1-damien.lemoal@opensource.wdc.com Reviewed-by: John Garry <john.garry@huawei.com> Signed-off-by: Damien Le Moal <damien.lemoal@opensource.wdc.com> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Diffstat (limited to 'drivers/scsi/scsi_transport_fc.c')
0 files changed, 0 insertions, 0 deletions