Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1595174 > unrolled thread

[PATCH 22/26] IB/ocrdma: Returning only value constants in ocrdma_resize_cq()

Started bySF Markus Elfring <elfring@users.sourceforge.net>
First post2017-03-08 14:30 +0100
Last post2017-03-09 13:10 +0100
Articles 3 — 3 participants

Back to article view | Back to linux.kernel

This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by below is the oldest one visible, not the original post.


Contents

  [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

#1595174 — [PATCH 22/26] IB/ocrdma: Returning only value constants in ocrdma_resize_cq()

FromSF Markus Elfring <elfring@users.sourceforge.net>
Date2017-03-08 14:30 +0100
Subject[PATCH 22/26] IB/ocrdma: Returning only value constants in ocrdma_resize_cq()
Message-ID<tiJPd-77d-43@gated-at.bofh.it>
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

[toc] | [next] | [standalone]


#1595247 — Re: [PATCH 22/26] IB/ocrdma: Returning only value constants in ocrdma_resize_cq()

FromDevesh Sharma <devesh.sharma@broadcom.com>
Date2017-03-08 16:20 +0100
SubjectRe: [PATCH 22/26] IB/ocrdma: Returning only value constants in ocrdma_resize_cq()
Message-ID<tiLxD-8ng-1@gated-at.bofh.it>
In reply to#1595174
Acked-By:Devesh Sharma <devesh.sharma@broadcom.com>

On Wed, Mar 8, 2017 at 6:56 PM, SF Markus Elfring
<elfring@users.sourceforge.net> wrote:
> 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
>

[toc] | [prev] | [next] | [standalone]


#1595995

FromYuval Shaia <yuval.shaia@oracle.com>
Date2017-03-09 13:10 +0100
Message-ID<tj53k-4XB-11@gated-at.bofh.it>
In reply to#1595174
On Wed, Mar 08, 2017 at 02:26:16PM +0100, SF Markus Elfring wrote:
> 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;

Reviewed-by: Yuval Shaia <yuval.shaia@oracle.com>

>  }
>  
>  static void ocrdma_flush_cq(struct ocrdma_cq *cq)
> -- 
> 2.12.0
> 
> --
> To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html

[toc] | [prev] | [standalone]


Back to top | Article view | linux.kernel


csiph-web