From patchwork Sun Mar 18 02:21:31 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Zhu Yanjun X-Patchwork-Id: 10291025 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 5D6C460385 for ; Sun, 18 Mar 2018 02:18:12 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 4C45028C66 for ; Sun, 18 Mar 2018 02:18:12 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 4106128C6F; Sun, 18 Mar 2018 02:18:12 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.8 required=2.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_HI, T_DKIM_INVALID, UNPARSEABLE_RELAY autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id B758C28C68 for ; Sun, 18 Mar 2018 02:18:10 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752708AbeCRCSJ (ORCPT ); Sat, 17 Mar 2018 22:18:09 -0400 Received: from aserp2120.oracle.com ([141.146.126.78]:40892 "EHLO aserp2120.oracle.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752548AbeCRCSI (ORCPT ); Sat, 17 Mar 2018 22:18:08 -0400 Received: from pps.filterd (aserp2120.oracle.com [127.0.0.1]) by aserp2120.oracle.com (8.16.0.22/8.16.0.22) with SMTP id w2I2F717088276; Sun, 18 Mar 2018 02:18:03 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.com; h=from : to : subject : date : message-id : in-reply-to : references; s=corp-2017-10-26; bh=wPiIGE+IgAUkNFpFTrFEuGuYZrqSxByIM0HHFU9zKXc=; b=D/ouioKpPBKpjPTde3TxqGsoq8Z/54TIyt61v0e+qj37nnQc2Tx5bphGN+msR6BmpZzG /XxrHnJEnmsbrX4VZ7khU8DsTDI00Kk2XZIySgMJnyo25cHpo9Kz22c7FxIK2ThK9Ebo nWbCs8nx5fgBhiQzKoJYMEBE3SznES8WrT0aR/k+s524IB0kcwHhvwrb2BZB0ZPzMW5x +VkzkIBSuspfcT5jBwgmmW/s7zWoerkAqO//BDgnWnazgA9jy7ufx/946iDAxoB547c1 mu6yypjtF2ySQYcrHZDy79nHBBoWDM9IKfg8P0BeVWxOor+7PRTeBDH+qpF03rlnFHtx SQ== Received: from aserv0022.oracle.com (aserv0022.oracle.com [141.146.126.234]) by aserp2120.oracle.com with ESMTP id 2gsf4xr04b-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Sun, 18 Mar 2018 02:18:03 +0000 Received: from userv0121.oracle.com (userv0121.oracle.com [156.151.31.72]) by aserv0022.oracle.com (8.14.4/8.14.4) with ESMTP id w2I2I21E030072 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Sun, 18 Mar 2018 02:18:03 GMT Received: from abhmp0008.oracle.com (abhmp0008.oracle.com [141.146.116.14]) by userv0121.oracle.com (8.14.4/8.13.8) with ESMTP id w2I2I2xu017731; Sun, 18 Mar 2018 02:18:02 GMT Received: from office-bj2017.cn.oracle.com (/10.182.69.78) by default (Oracle Beehive Gateway v4.0) with ESMTP ; Sat, 17 Mar 2018 19:18:01 -0700 From: Zhu Yanjun To: monis@mellanox.com, dledford@redhat.com, jgg@ziepe.ca, linux-rdma@vger.kernel.org Subject: [PATCH 2/2] IB/rxe: remove unnecessary initialization Date: Sat, 17 Mar 2018 22:21:31 -0400 Message-Id: <1521339691-27879-2-git-send-email-yanjun.zhu@oracle.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1521339691-27879-1-git-send-email-yanjun.zhu@oracle.com> References: <1521339691-27879-1-git-send-email-yanjun.zhu@oracle.com> X-Proofpoint-Virus-Version: vendor=nai engine=5900 definitions=8835 signatures=668693 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 suspectscore=0 malwarescore=0 phishscore=0 bulkscore=0 spamscore=0 mlxscore=0 mlxlogscore=832 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1711220000 definitions=main-1803180006 Sender: linux-rdma-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-rdma@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP The variable rc is assigned beforce it is used. So it is not necessary to initialize it. CC: Srinivas Eeda CC: Junxiao Bi Signed-off-by: Zhu Yanjun --- drivers/infiniband/sw/rxe/rxe_verbs.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/infiniband/sw/rxe/rxe_verbs.c b/drivers/infiniband/sw/rxe/rxe_verbs.c index f4bab2c..316be50 100644 --- a/drivers/infiniband/sw/rxe/rxe_verbs.c +++ b/drivers/infiniband/sw/rxe/rxe_verbs.c @@ -56,7 +56,7 @@ static int rxe_query_port(struct ib_device *dev, { struct rxe_dev *rxe = to_rdev(dev); struct rxe_port *port; - int rc = -EINVAL; + int rc; if (unlikely(port_num != 1)) { pr_warn("invalid port_number %d\n", port_num);