From patchwork Sat Feb 16 03:36:18 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Yue Haibing X-Patchwork-Id: 10816127 X-Patchwork-Delegate: jgg@ziepe.ca Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 27307922 for ; Sat, 16 Feb 2019 03:22:37 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 0A7272FEA8 for ; Sat, 16 Feb 2019 03:22:37 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id F18AC2FEE1; Sat, 16 Feb 2019 03:22:36 +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=-7.9 required=2.0 tests=BAYES_00,MAILING_LIST_MULTI, RCVD_IN_DNSWL_HI 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 3AC062FEA8 for ; Sat, 16 Feb 2019 03:22:36 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727542AbfBPDWf (ORCPT ); Fri, 15 Feb 2019 22:22:35 -0500 Received: from szxga06-in.huawei.com ([45.249.212.32]:59268 "EHLO huawei.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1726263AbfBPDWf (ORCPT ); Fri, 15 Feb 2019 22:22:35 -0500 Received: from DGGEMS403-HUB.china.huawei.com (unknown [172.30.72.59]) by Forcepoint Email with ESMTP id 558BC702E1EE1AE8121D; Sat, 16 Feb 2019 11:22:31 +0800 (CST) Received: from localhost.localdomain.localdomain (10.175.113.25) by DGGEMS403-HUB.china.huawei.com (10.3.19.203) with Microsoft SMTP Server id 14.3.408.0; Sat, 16 Feb 2019 11:22:23 +0800 From: YueHaibing To: Dennis Dalessandro , Mike Marciniszyn , Doug Ledford , "Jason Gunthorpe" CC: YueHaibing , , Subject: [PATCH -next] IB/qib: Remove unused variable 'locked' Date: Sat, 16 Feb 2019 03:36:18 +0000 Message-ID: <20190216033618.116680-1-yuehaibing@huawei.com> X-Mailer: git-send-email 2.20.1 MIME-Version: 1.0 X-Originating-IP: [10.175.113.25] X-CFilter-Loop: Reflected 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 Fixes gcc '-Wunused-but-set-variable' warning: drivers/infiniband/hw/qib/qib_user_pages.c: In function 'qib_get_user_pages': drivers/infiniband/hw/qib/qib_user_pages.c:103:16: warning: variable 'locked' set but not used [-Wunused-but-set-variable] It's never used since introduction. Signed-off-by: YueHaibing Signed-off-by: Davidlohr Bueso --- drivers/infiniband/hw/qib/qib_user_pages.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/infiniband/hw/qib/qib_user_pages.c b/drivers/infiniband/hw/qib/qib_user_pages.c index ef8bcf366ddc..a5be36c07451 100644 --- a/drivers/infiniband/hw/qib/qib_user_pages.c +++ b/drivers/infiniband/hw/qib/qib_user_pages.c @@ -100,12 +100,12 @@ int qib_map_page(struct pci_dev *hwdev, struct page *page, dma_addr_t *daddr) int qib_get_user_pages(unsigned long start_page, size_t num_pages, struct page **p) { - unsigned long locked, lock_limit; + unsigned long lock_limit; size_t got; int ret; lock_limit = rlimit(RLIMIT_MEMLOCK) >> PAGE_SHIFT; - locked = atomic64_add_return(num_pages, ¤t->mm->pinned_vm); + atomic64_add_return(num_pages, ¤t->mm->pinned_vm); if (num_pages > lock_limit && !capable(CAP_IPC_LOCK)) { ret = -ENOMEM;