linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] scsi: mptfusion: remove redundant variable r
@ 2021-12-05 22:59 Colin Ian King
  2021-12-07  3:22 ` Martin K. Petersen
  2021-12-14  4:40 ` Martin K. Petersen
  0 siblings, 2 replies; 3+ messages in thread
From: Colin Ian King @ 2021-12-05 22:59 UTC (permalink / raw)
  To: Sathya Prakash, Sreekanth Reddy, Suganath Prabu Subramani,
	MPT-FusionLinux.pdl, linux-scsi
  Cc: kernel-janitors, linux-kernel

Variable r is being assigned a value that is never read. The assignment
is redundant and so is the variable, so remove these. Remove unnecessary
the {} braces in the if statement too.

Signed-off-by: Colin Ian King <colin.i.king@gmail.com>
---
 drivers/message/fusion/mptbase.c | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/drivers/message/fusion/mptbase.c b/drivers/message/fusion/mptbase.c
index b94d5e4fdc23..24a4532053e4 100644
--- a/drivers/message/fusion/mptbase.c
+++ b/drivers/message/fusion/mptbase.c
@@ -1274,8 +1274,6 @@ mpt_send_handshake_request(u8 cb_idx, MPT_ADAPTER *ioc, int reqBytes, u32 *req,
 static int
 mpt_host_page_access_control(MPT_ADAPTER *ioc, u8 access_control_value, int sleepFlag)
 {
-	int	 r = 0;
-
 	/* return if in use */
 	if (CHIPREG_READ32(&ioc->chip->Doorbell)
 	    & MPI_DOORBELL_ACTIVE)
@@ -1289,9 +1287,9 @@ mpt_host_page_access_control(MPT_ADAPTER *ioc, u8 access_control_value, int slee
 		 (access_control_value<<12)));
 
 	/* Wait for IOC to clear Doorbell Status bit */
-	if ((r = WaitForDoorbellAck(ioc, 5, sleepFlag)) < 0) {
+	if (WaitForDoorbellAck(ioc, 5, sleepFlag) < 0)
 		return -2;
-	}else
+	else
 		return 0;
 }
 
-- 
2.33.1


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH] scsi: mptfusion: remove redundant variable r
  2021-12-05 22:59 [PATCH] scsi: mptfusion: remove redundant variable r Colin Ian King
@ 2021-12-07  3:22 ` Martin K. Petersen
  2021-12-14  4:40 ` Martin K. Petersen
  1 sibling, 0 replies; 3+ messages in thread
From: Martin K. Petersen @ 2021-12-07  3:22 UTC (permalink / raw)
  To: Colin Ian King
  Cc: Sathya Prakash, Sreekanth Reddy, Suganath Prabu Subramani,
	MPT-FusionLinux.pdl, linux-scsi, kernel-janitors, linux-kernel


Colin,

> Variable r is being assigned a value that is never read. The assignment
> is redundant and so is the variable, so remove these. Remove unnecessary
> the {} braces in the if statement too.

Applied to 5.17/scsi-staging, thanks!

-- 
Martin K. Petersen	Oracle Linux Engineering

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] scsi: mptfusion: remove redundant variable r
  2021-12-05 22:59 [PATCH] scsi: mptfusion: remove redundant variable r Colin Ian King
  2021-12-07  3:22 ` Martin K. Petersen
@ 2021-12-14  4:40 ` Martin K. Petersen
  1 sibling, 0 replies; 3+ messages in thread
From: Martin K. Petersen @ 2021-12-14  4:40 UTC (permalink / raw)
  To: Sreekanth Reddy, Colin Ian King, MPT-FusionLinux.pdl, linux-scsi,
	Suganath Prabu Subramani, Sathya Prakash
  Cc: Martin K . Petersen, kernel-janitors, linux-kernel

On Sun, 5 Dec 2021 22:59:01 +0000, Colin Ian King wrote:

> Variable r is being assigned a value that is never read. The assignment
> is redundant and so is the variable, so remove these. Remove unnecessary
> the {} braces in the if statement too.
> 
> 

Applied to 5.17/scsi-queue, thanks!

[1/1] scsi: mptfusion: remove redundant variable r
      https://git.kernel.org/mkp/scsi/c/c27fd25db39b

-- 
Martin K. Petersen	Oracle Linux Engineering

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2021-12-14  4:41 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-12-05 22:59 [PATCH] scsi: mptfusion: remove redundant variable r Colin Ian King
2021-12-07  3:22 ` Martin K. Petersen
2021-12-14  4:40 ` Martin K. Petersen

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).