From patchwork Thu Jan 14 17:45:22 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: SF Markus Elfring X-Patchwork-Id: 8034771 Return-Path: X-Original-To: patchwork-linux-rdma@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork1.web.kernel.org (Postfix) with ESMTP id A4B9E9F3F6 for ; Thu, 14 Jan 2016 17:45:47 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id E2EE720497 for ; Thu, 14 Jan 2016 17:45:46 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 1BAC72045A for ; Thu, 14 Jan 2016 17:45:46 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755860AbcANRpo (ORCPT ); Thu, 14 Jan 2016 12:45:44 -0500 Received: from mout.web.de ([212.227.15.3]:58344 "EHLO mout.web.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755592AbcANRpn (ORCPT ); Thu, 14 Jan 2016 12:45:43 -0500 Received: from [192.168.1.3] ([77.182.186.104]) by smtp.web.de (mrweb002) with ESMTPSA (Nemesis) id 0LqlF4-1ZfT3r2kKI-00eImh; Thu, 14 Jan 2016 18:45:29 +0100 Subject: [PATCH v3 3/6] InfiniBand-ocrdma: Returning only value constants in ocrdma_qp_state_change() To: linux-rdma@vger.kernel.org, Devesh Sharma , Doug Ledford , Hal Rosenstock , Mitesh Ahuja , Sean Hefty , Selvin Xavier References: <566ABCD9.1060404@users.sourceforge.net> <567EDED5.4040201@users.sourceforge.net> <5697D865.5010507@users.sourceforge.net> Cc: LKML , kernel-janitors@vger.kernel.org, Julia Lawall From: SF Markus Elfring Message-ID: <5697DEB2.7000900@users.sourceforge.net> Date: Thu, 14 Jan 2016 18:45:22 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.5.1 MIME-Version: 1.0 In-Reply-To: <5697D865.5010507@users.sourceforge.net> X-Provags-ID: V03:K0:IvxtNQVslMcWmRFc7YPEfffqxf6Ud7RRPFYt2eXtauGCGJvYB9E yonuSuvyohGKdo4SuSHYmR/LPLM1FTTkkXyuaXX/Yw71zEdlDoL43vNbWJLn0qw77614Xbj XTX7FKTx1cvI1m84RmMbFuP8sO7/LOp6wOJcKdR3Kyn8xt3bM3sNBOIkVL9yAwH0yKFhUET INxNkgmhwXpN6yzurV+sg== X-UI-Out-Filterresults: notjunk:1; V01:K0:jFQOEb262TM=:TCbqJ3wLtZiQQL4RoROC8e vBLTxBYDnCGWjGglgzO7aPBc0Vhqorzwy5jN06WUOrMnPj6TyML7LVR/eRDcJIFxtWl34APtx GixbAo7IYfm4gPLtEia4mBEIElWnaxg4Vc9WcyawS0fhpexnxEEpMfk7Etz9MWp1iAwBto0Bm J3LZ8Lb3QYvG4eqDfA1eukzv3ulBZMtELbK+rOG6oynNxqn1TfnEJwpol6ndw2RQoF6A/3eIh JFqJBXn1rCGGLgxbu3SE+W6CFtGD94R+dYItXUfig3XUdM/6y0cg08orL30v0sRqQ5fBs/Xb2 fro43Fd83ofP3E9pYfCDKvdfIBS1qXstdqFAauAxk5+jFDNQ3z4AkhGuxD9/q/8DHaXxTpSA3 k5byheDK29KLP98b26JjnEjPHFLLxLEBiwnRECYg3FAI57sV6v/AO1/NK1RIVdaCePhu0nXYD hywA2eRx+5R46W6bMhpPv/UVlkKwutz7Ur/4Iadz3irfIZlp/7HluZJwqvKs8L+AyHrWorDj+ 52g//iJFuOMN8y1U926BLpJstPxTAxYnus7y37gubFXeu2vTS6zWfRBFB0BngjI/zHL5eLwbg DVk4TZGeKFBFvFoz10JUQzIv20nWsnM+OlUNyfRTK5M5S/lvkB9DBjwaTPYdiu2MjjbIcSXrP POYoJIa5Bvc8kdf8ooJoG+NlLfsL4t3O42ezycwung/gzVPDqXujxFpaPPDC/MlvtWKidSece YdtLxl9JZfEsi+Ci/U2rj1CCCl3Yicceee6TyFKJHFYGHYS8Sr/0VMNqKjYsS/40tjpiB5ejD tSDNDu+ Sender: linux-rdma-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-rdma@vger.kernel.org X-Spam-Status: No, score=-6.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=ham version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP From: Markus Elfring Date: Thu, 14 Jan 2016 17:54:45 +0100 Return zero at the end without using the local variable "status". Signed-off-by: Markus Elfring --- drivers/infiniband/hw/ocrdma/ocrdma_hw.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/infiniband/hw/ocrdma/ocrdma_hw.c b/drivers/infiniband/hw/ocrdma/ocrdma_hw.c index 159b1d5..3766927 100644 --- a/drivers/infiniband/hw/ocrdma/ocrdma_hw.c +++ b/drivers/infiniband/hw/ocrdma/ocrdma_hw.c @@ -2138,7 +2138,6 @@ int ocrdma_qp_state_change(struct ocrdma_qp *qp, enum ib_qp_state new_ib_state, enum ib_qp_state *old_ib_state) { unsigned long flags; - int status = 0; enum ocrdma_qp_state new_state; new_state = get_ocrdma_qp_state(new_ib_state); @@ -2163,7 +2162,7 @@ int ocrdma_qp_state_change(struct ocrdma_qp *qp, enum ib_qp_state new_ib_state, qp->state = new_state; spin_unlock_irqrestore(&qp->q_lock, flags); - return status; + return 0; } static u32 ocrdma_set_create_qp_mbx_access_flags(struct ocrdma_qp *qp)