Received: by 2002:a25:6193:0:0:0:0:0 with SMTP id v141csp3053063ybb; Sun, 12 Apr 2020 22:45:39 -0700 (PDT) X-Google-Smtp-Source: APiQypJKzQ8nxZ2+FF48drRzwhT+4tBvfSlih9X/Sea+iG3c4y9DfPDJIvRp07ROsB7BFRUTaKpi X-Received: by 2002:a37:9b0f:: with SMTP id d15mr3771812qke.62.1586756739862; Sun, 12 Apr 2020 22:45:39 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1586756739; cv=none; d=google.com; s=arc-20160816; b=fU/ZHAi6XFI+4trnxt713pwhYw1VsKCbpbmnE9R6zF3ba59EpHTgatgc9HytfX1gYB Zd6sTXrBL0dVbXBwhGV8HhKJyZPc9pe4othzgwLS0sr8o7M2oH8x2OoRX+2o47JsaG9f NfJ9sGS3uh2/01ivKZTc6SmlShisAN34mU6wgb5M6jDRxq9+HxcUN/qMVtqf0klXIKsp tuRaegVVTSCEWypKj+D5vG2fYZBxkEiyDBeV8t4cNSo/7LRpA4N00VwC/ufhGXYfHRhq 3rUBmaiJ9ZfNimveZhxOhaQAfTa/w2vkf0/uKz/l+MFo+JgvoD9V0IoovYE3ThYbseiR TQ/w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:message-id:date:subject:cc :to:from; bh=ey5bGs+Bg5f7gW2V+ZO9IvtM7RcS9GA7dV8Nq28S5CU=; b=xv7U8PRNc+NmqaOEl3GlquOPQb0n7Xvp7ZIyS8DOp7Io5OSBD6S+gwQNlzSdda+Ag5 3nYPY/VgXb1stDSdpo6idBw7zMZR4+U7fYcQqj3KfcQ98vSFlpjg4yvC92QqKI3fbV7u pp4g/e9ZGgIuHG+Bej43orQr0RkYdCcDQGxoKUUQDlltLxF3MNSK5v+A+l/J1RITnfuX lXqa3nrIvmpYm9p+mK/wzdhHBveh1VVP+TMuc5c//70+yGCmMC/E+He/msNOjcwRZFr1 lCt6sISwCyE+EvkQIW+IenssrXe4SbufkWQKRSGfHHMdEZEQjtbF1mHdL8Cx8w24eAZD Yiyw== ARC-Authentication-Results: i=1; mx.google.com; spf=neutral (google.com: 209.132.180.67 is neither permitted nor denied by best guess record for domain of linux-kernel-owner@vger.kernel.org) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org ([209.132.180.67]) by mx.google.com with ESMTP id 145si5556882qkl.261.2020.04.12.22.45.25; Sun, 12 Apr 2020 22:45:39 -0700 (PDT) Received-SPF: neutral (google.com: 209.132.180.67 is neither permitted nor denied by best guess record for domain of linux-kernel-owner@vger.kernel.org) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=neutral (google.com: 209.132.180.67 is neither permitted nor denied by best guess record for domain of linux-kernel-owner@vger.kernel.org) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728138AbgDMCfy (ORCPT + 99 others); Sun, 12 Apr 2020 22:35:54 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.18]:41632 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727520AbgDMCfx (ORCPT ); Sun, 12 Apr 2020 22:35:53 -0400 Received: from huawei.com (szxga05-in.huawei.com [45.249.212.191]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 108A7C0A3BE0; Sun, 12 Apr 2020 19:35:54 -0700 (PDT) Received: from DGGEMS413-HUB.china.huawei.com (unknown [172.30.72.60]) by Forcepoint Email with ESMTP id 1F5E2A423606824BB29A; Mon, 13 Apr 2020 10:35:51 +0800 (CST) Received: from linux-lmwb.huawei.com (10.175.103.112) by DGGEMS413-HUB.china.huawei.com (10.3.19.213) with Microsoft SMTP Server id 14.3.487.0; Mon, 13 Apr 2020 10:35:41 +0800 From: Zou Wei To: , , , , , CC: Zou Wei Subject: [PATCH -next] IB/qib: remove unused variable ret Date: Mon, 13 Apr 2020 10:42:04 +0800 Message-ID: <1586745724-107477-1-git-send-email-zou_wei@huawei.com> X-Mailer: git-send-email 2.6.2 MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [10.175.103.112] X-CFilter-Loop: Reflected Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org This patch fixes below warnings reported by coccicheck drivers/infiniband/hw/qib/qib_iba7322.c:6878:8-11: Unneeded variable: "ret". Return "0" on line 6907 drivers/infiniband/hw/qib/qib_iba7322.c:2378:5-8: Unneeded variable: "ret". Return "0" on line 2513 Reported-by: Hulk Robot Signed-off-by: Zou Wei --- drivers/infiniband/hw/qib/qib_iba7322.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/drivers/infiniband/hw/qib/qib_iba7322.c b/drivers/infiniband/hw/qib/qib_iba7322.c index 91d64dd..8bcbc88 100644 --- a/drivers/infiniband/hw/qib/qib_iba7322.c +++ b/drivers/infiniband/hw/qib/qib_iba7322.c @@ -2375,7 +2375,6 @@ static int qib_7322_bringup_serdes(struct qib_pportdata *ppd) struct qib_devdata *dd = ppd->dd; u64 val, guid, ibc; unsigned long flags; - int ret = 0; /* * SerDes model not in Pd, but still need to @@ -2510,7 +2509,7 @@ static int qib_7322_bringup_serdes(struct qib_pportdata *ppd) val | ERR_MASK_N(IBStatusChanged)); /* Always zero until we start messing with SerDes for real */ - return ret; + return 0; } /** @@ -6875,7 +6874,7 @@ static int init_sdma_7322_regs(struct qib_pportdata *ppd) struct qib_devdata *dd = ppd->dd; unsigned lastbuf, erstbuf; u64 senddmabufmask[3] = { 0 }; - int n, ret = 0; + int n; qib_write_kreg_port(ppd, krp_senddmabase, ppd->sdma_descq_phys); qib_sdma_7322_setlengen(ppd); @@ -6904,7 +6903,7 @@ static int init_sdma_7322_regs(struct qib_pportdata *ppd) qib_write_kreg_port(ppd, krp_senddmabufmask0, senddmabufmask[0]); qib_write_kreg_port(ppd, krp_senddmabufmask1, senddmabufmask[1]); qib_write_kreg_port(ppd, krp_senddmabufmask2, senddmabufmask[2]); - return ret; + return 0; } /* sdma_lock must be held */ -- 2.6.2