linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH -next] [SCSI] fnic: simplify the return expression of vnic_wq_copy_alloc
@ 2020-09-21  8:24 Liu Shixin
  2020-10-08  2:34 ` Martin K. Petersen
  2020-10-13 22:42 ` Martin K. Petersen
  0 siblings, 2 replies; 3+ messages in thread
From: Liu Shixin @ 2020-09-21  8:24 UTC (permalink / raw)
  To: Satish Kharat, Sesidhar Baddela, Karan Tilak Kumar,
	James E.J. Bottomley, Martin K. Petersen
  Cc: linux-scsi, linux-kernel, Liu Shixin

Simplify the return expression.

Signed-off-by: Liu Shixin <liushixin2@huawei.com>
---
 drivers/scsi/fnic/vnic_wq_copy.c | 8 +-------
 1 file changed, 1 insertion(+), 7 deletions(-)

diff --git a/drivers/scsi/fnic/vnic_wq_copy.c b/drivers/scsi/fnic/vnic_wq_copy.c
index 9eab7e7caf38..7b18635df7e6 100644
--- a/drivers/scsi/fnic/vnic_wq_copy.c
+++ b/drivers/scsi/fnic/vnic_wq_copy.c
@@ -79,8 +79,6 @@ int vnic_wq_copy_alloc(struct vnic_dev *vdev, struct vnic_wq_copy *wq,
 		       unsigned int index, unsigned int desc_count,
 		       unsigned int desc_size)
 {
-	int err;
-
 	wq->index = index;
 	wq->vdev = vdev;
 	wq->to_use_index = wq->to_clean_index = 0;
@@ -92,11 +90,7 @@ int vnic_wq_copy_alloc(struct vnic_dev *vdev, struct vnic_wq_copy *wq,
 
 	vnic_wq_copy_disable(wq);
 
-	err = vnic_dev_alloc_desc_ring(vdev, &wq->ring, desc_count, desc_size);
-	if (err)
-		return err;
-
-	return 0;
+	return vnic_dev_alloc_desc_ring(vdev, &wq->ring, desc_count, desc_size);
 }
 
 void vnic_wq_copy_init(struct vnic_wq_copy *wq, unsigned int cq_index,
-- 
2.25.1


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

* Re: [PATCH -next] [SCSI] fnic: simplify the return expression of vnic_wq_copy_alloc
  2020-09-21  8:24 [PATCH -next] [SCSI] fnic: simplify the return expression of vnic_wq_copy_alloc Liu Shixin
@ 2020-10-08  2:34 ` Martin K. Petersen
  2020-10-13 22:42 ` Martin K. Petersen
  1 sibling, 0 replies; 3+ messages in thread
From: Martin K. Petersen @ 2020-10-08  2:34 UTC (permalink / raw)
  To: Liu Shixin
  Cc: Satish Kharat, Sesidhar Baddela, Karan Tilak Kumar,
	James E.J. Bottomley, Martin K. Petersen, linux-scsi,
	linux-kernel


Liu,

> Simplify the return expression.

Applied to 5.10/scsi-staging, thanks!

-- 
Martin K. Petersen	Oracle Linux Engineering

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

* Re: [PATCH -next] [SCSI] fnic: simplify the return expression of vnic_wq_copy_alloc
  2020-09-21  8:24 [PATCH -next] [SCSI] fnic: simplify the return expression of vnic_wq_copy_alloc Liu Shixin
  2020-10-08  2:34 ` Martin K. Petersen
@ 2020-10-13 22:42 ` Martin K. Petersen
  1 sibling, 0 replies; 3+ messages in thread
From: Martin K. Petersen @ 2020-10-13 22:42 UTC (permalink / raw)
  To: Liu Shixin, Sesidhar Baddela, Karan Tilak Kumar, Satish Kharat,
	James E.J. Bottomley
  Cc: Martin K . Petersen, linux-kernel, linux-scsi

On Mon, 21 Sep 2020 16:24:52 +0800, Liu Shixin wrote:

> Simplify the return expression.

Applied to 5.10/scsi-queue, thanks!

[1/1] scsi: fnic: Simplify the return expression of vnic_wq_copy_alloc()
      https://git.kernel.org/mkp/scsi/c/39d0c6e770c2

-- 
Martin K. Petersen	Oracle Linux Engineering

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

end of thread, other threads:[~2020-10-13 22:45 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-09-21  8:24 [PATCH -next] [SCSI] fnic: simplify the return expression of vnic_wq_copy_alloc Liu Shixin
2020-10-08  2:34 ` Martin K. Petersen
2020-10-13 22:42 ` 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).