Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751894AbdCHPRs (ORCPT ); Wed, 8 Mar 2017 10:17:48 -0500 Received: from mail-wm0-f48.google.com ([74.125.82.48]:35035 "EHLO mail-wm0-f48.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750742AbdCHPRn (ORCPT ); Wed, 8 Mar 2017 10:17:43 -0500 MIME-Version: 1.0 In-Reply-To: References: From: Devesh Sharma Date: Wed, 8 Mar 2017 20:46:03 +0530 Message-ID: Subject: Re: [PATCH 22/26] IB/ocrdma: Returning only value constants in ocrdma_resize_cq() To: SF Markus Elfring Cc: linux-rdma , Devesh Sharma , Doug Ledford , Hal Rosenstock , Sean Hefty , Selvin Xavier , LKML , kernel-janitors@vger.kernel.org Content-Type: text/plain; charset=UTF-8 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1415 Lines: 41 Acked-By:Devesh Sharma On Wed, Mar 8, 2017 at 6:56 PM, SF Markus Elfring wrote: > From: Markus Elfring > 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 > --- > 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 >