* [PATCH linux-next] scsi: lpfc: Remove the unneeded result variable 'n'
@ 2022-08-30 8:31 cgel.zte
0 siblings, 0 replies; only message in thread
From: cgel.zte @ 2022-08-30 8:31 UTC (permalink / raw)
To: james.smart
Cc: dick.kennedy, jejb, martin.petersen, linux-scsi, linux-kernel,
ye xingchen, Zeal Robot
From: ye xingchen <ye.xingchen@zte.com.cn>
Return the value scnprintf() directly instead of storing it in another
redundant variable.
Reported-by: Zeal Robot <zealci@zte.com.cn>
Signed-off-by: ye xingchen <ye.xingchen@zte.com.cn>
---
drivers/scsi/lpfc/lpfc_ct.c | 5 +----
1 file changed, 1 insertion(+), 4 deletions(-)
diff --git a/drivers/scsi/lpfc/lpfc_ct.c b/drivers/scsi/lpfc/lpfc_ct.c
index 13dfe285493d..f1e533794fad 100644
--- a/drivers/scsi/lpfc/lpfc_ct.c
+++ b/drivers/scsi/lpfc/lpfc_ct.c
@@ -1797,15 +1797,12 @@ int
lpfc_vport_symbolic_port_name(struct lpfc_vport *vport, char *symbol,
size_t size)
{
- int n;
-
/*
* Use the lpfc board number as the Symbolic Port
* Name object. NPIV is not in play so this integer
* value is sufficient and unique per FC-ID.
*/
- n = scnprintf(symbol, size, "%d", vport->phba->brd_no);
- return n;
+ return scnprintf(symbol, size, "%d", vport->phba->brd_no);
}
--
2.25.1
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2022-08-30 8:31 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-08-30 8:31 [PATCH linux-next] scsi: lpfc: Remove the unneeded result variable 'n' cgel.zte
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).