Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1595174
| From | SF Markus Elfring <elfring@users.sourceforge.net> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | [PATCH 22/26] IB/ocrdma: Returning only value constants in ocrdma_resize_cq() |
| Date | 2017-03-08 14:30 +0100 |
| Message-ID | <tiJPd-77d-43@gated-at.bofh.it> (permalink) |
| References | <tiJct-6C3-9@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
From: Markus Elfring <elfring@users.sourceforge.net>
Date: Wed, 8 Mar 2017 10:48:24 +0100
Return constant integer values without storing them in the local
variable "status".
Signed-off-by: Markus Elfring <elfring@users.sourceforge.net>
---
drivers/infiniband/hw/ocrdma/ocrdma_verbs.c | 9 +++------
1 file changed, 3 insertions(+), 6 deletions(-)
diff --git a/drivers/infiniband/hw/ocrdma/ocrdma_verbs.c b/drivers/infiniband/hw/ocrdma/ocrdma_verbs.c
index bedc229be89d..1d25512416f5 100644
--- a/drivers/infiniband/hw/ocrdma/ocrdma_verbs.c
+++ b/drivers/infiniband/hw/ocrdma/ocrdma_verbs.c
@@ -1123,15 +1123,12 @@ struct ib_cq *ocrdma_create_cq(struct ib_device *ibdev,
int ocrdma_resize_cq(struct ib_cq *ibcq, int new_cnt,
struct ib_udata *udata)
{
- int status = 0;
struct ocrdma_cq *cq = get_ocrdma_cq(ibcq);
- if (new_cnt < 1 || new_cnt > cq->max_hw_cqe) {
- status = -EINVAL;
- return status;
- }
+ if (new_cnt < 1 || new_cnt > cq->max_hw_cqe)
+ return -EINVAL;
ibcq->cqe = new_cnt;
- return status;
+ return 0;
}
static void ocrdma_flush_cq(struct ocrdma_cq *cq)
--
2.12.0
Back to linux.kernel | Previous | Next — Next in thread | Find similar | Unroll thread
[PATCH 22/26] IB/ocrdma: Returning only value constants in ocrdma_resize_cq() SF Markus Elfring <elfring@users.sourceforge.net> - 2017-03-08 14:30 +0100 Re: [PATCH 22/26] IB/ocrdma: Returning only value constants in ocrdma_resize_cq() Devesh Sharma <devesh.sharma@broadcom.com> - 2017-03-08 16:20 +0100 Re: [PATCH 22/26] IB/ocrdma: Returning only value constants in ocrdma_resize_cq() Yuval Shaia <yuval.shaia@oracle.com> - 2017-03-09 13:10 +0100
csiph-web