linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] drivers:scsi:remove unneeded variable
@ 2021-12-09  1:59 cgel.zte
  0 siblings, 0 replies; only message in thread
From: cgel.zte @ 2021-12-09  1:59 UTC (permalink / raw)
  To: willy
  Cc: hare, jejb, martin.petersen, linux-scsi, linux-kernel,
	chiminghao, Zeal Robot

From: chiminghao <chi.minghao@zte.com.cn>

return value form directly instead of
taking this in another redundant variable.

Reported-by: Zeal Robot <zealci@zte.com.cm>
Signed-off-by: chiminghao <chi.minghao@zte.com.cn>
---
 drivers/scsi/advansys.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/drivers/scsi/advansys.c b/drivers/scsi/advansys.c
index ace5eff828e9..610c0be1b47b 100644
--- a/drivers/scsi/advansys.c
+++ b/drivers/scsi/advansys.c
@@ -6237,14 +6237,12 @@ AscMsgOutSDTR(ASC_DVC_VAR *asc_dvc, uchar sdtr_period, uchar sdtr_offset)
 static uchar
 AscCalSDTRData(ASC_DVC_VAR *asc_dvc, uchar sdtr_period, uchar syn_offset)
 {
-	uchar byte;
 	uchar sdtr_period_ix;
 
 	sdtr_period_ix = AscGetSynPeriodIndex(asc_dvc, sdtr_period);
 	if (sdtr_period_ix > asc_dvc->max_sdtr_index)
 		return 0xFF;
-	byte = (sdtr_period_ix << 4) | (syn_offset & ASC_SYN_MAX_OFFSET);
-	return byte;
+	return (sdtr_period_ix << 4) | (syn_offset & ASC_SYN_MAX_OFFSET);
 }
 
 static bool AscSetChipSynRegAtID(PortAddr iop_base, uchar id, uchar sdtr_data)
-- 
2.25.1


^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2021-12-09  1:59 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-12-09  1:59 [PATCH] drivers:scsi:remove unneeded variable 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).