All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] scsi: lpfc: Remove Unneeded variable 'status' in lpfc_fcp_cpu_map_store
@ 2020-09-16  2:28 Ye Bin
  2020-10-03  2:05 ` Martin K. Petersen
  2020-10-07  3:48 ` Martin K. Petersen
  0 siblings, 2 replies; 3+ messages in thread
From: Ye Bin @ 2020-09-16  2:28 UTC (permalink / raw)
  To: james.smart, dick.kennedy, linux-scsi; +Cc: Ye Bin, Hulk Robot

Fixes coccicheck warning:
drivers/scsi/lpfc/lpfc_attr.c:5341:5-11: Unneeded variable: "status". Return "- EINVAL" on line 5342

Reported-by: Hulk Robot <hulkci@huawei.com>
Signed-off-by: Ye Bin <yebin10@huawei.com>
---
 drivers/scsi/lpfc/lpfc_attr.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/drivers/scsi/lpfc/lpfc_attr.c b/drivers/scsi/lpfc/lpfc_attr.c
index ece6c250ebaf..e94eac194676 100644
--- a/drivers/scsi/lpfc/lpfc_attr.c
+++ b/drivers/scsi/lpfc/lpfc_attr.c
@@ -5338,8 +5338,7 @@ static ssize_t
 lpfc_fcp_cpu_map_store(struct device *dev, struct device_attribute *attr,
 		       const char *buf, size_t count)
 {
-	int status = -EINVAL;
-	return status;
+	return -EINVAL;
 }
 
 /*
-- 
2.25.4


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

* Re: [PATCH] scsi: lpfc: Remove Unneeded variable 'status' in lpfc_fcp_cpu_map_store
  2020-09-16  2:28 [PATCH] scsi: lpfc: Remove Unneeded variable 'status' in lpfc_fcp_cpu_map_store Ye Bin
@ 2020-10-03  2:05 ` Martin K. Petersen
  2020-10-07  3:48 ` Martin K. Petersen
  1 sibling, 0 replies; 3+ messages in thread
From: Martin K. Petersen @ 2020-10-03  2:05 UTC (permalink / raw)
  To: Ye Bin; +Cc: james.smart, dick.kennedy, linux-scsi, Hulk Robot


Ye,

> Fixes coccicheck warning:
> drivers/scsi/lpfc/lpfc_attr.c:5341:5-11: Unneeded variable: "status". Return "- EINVAL" on line 5342

Applied to 5.10/scsi-staging, thanks!

-- 
Martin K. Petersen	Oracle Linux Engineering

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

* Re: [PATCH] scsi: lpfc: Remove Unneeded variable 'status' in lpfc_fcp_cpu_map_store
  2020-09-16  2:28 [PATCH] scsi: lpfc: Remove Unneeded variable 'status' in lpfc_fcp_cpu_map_store Ye Bin
  2020-10-03  2:05 ` Martin K. Petersen
@ 2020-10-07  3:48 ` Martin K. Petersen
  1 sibling, 0 replies; 3+ messages in thread
From: Martin K. Petersen @ 2020-10-07  3:48 UTC (permalink / raw)
  To: james.smart, dick.kennedy, linux-scsi, Ye Bin
  Cc: Martin K . Petersen, Hulk Robot

On Wed, 16 Sep 2020 10:28:59 +0800, Ye Bin wrote:

> Fixes coccicheck warning:
> drivers/scsi/lpfc/lpfc_attr.c:5341:5-11: Unneeded variable: "status". Return "- EINVAL" on line 5342

Applied to 5.10/scsi-queue, thanks!

[1/1] scsi: lpfc: Remove unneeded variable 'status' in lpfc_fcp_cpu_map_store()
      https://git.kernel.org/mkp/scsi/c/37fa429ef7ba

-- 
Martin K. Petersen	Oracle Linux Engineering

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

end of thread, other threads:[~2020-10-07  3:50 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-09-16  2:28 [PATCH] scsi: lpfc: Remove Unneeded variable 'status' in lpfc_fcp_cpu_map_store Ye Bin
2020-10-03  2:05 ` Martin K. Petersen
2020-10-07  3:48 ` Martin K. Petersen

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.