From patchwork Thu Jul 15 04:26:58 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andrew Morton X-Patchwork-Id: 12378651 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-15.8 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER, INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 82F8FC1B08C for ; Thu, 15 Jul 2021 04:27:01 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 3397E6128C for ; Thu, 15 Jul 2021 04:27:01 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 3397E6128C Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=linux-foundation.org Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id 87EB66B014F; Thu, 15 Jul 2021 00:27:01 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 855FC8D0049; Thu, 15 Jul 2021 00:27:01 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 71DE68D0048; Thu, 15 Jul 2021 00:27:01 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0224.hostedemail.com [216.40.44.224]) by kanga.kvack.org (Postfix) with ESMTP id 4EF876B014F for ; Thu, 15 Jul 2021 00:27:01 -0400 (EDT) Received: from smtpin38.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay05.hostedemail.com (Postfix) with ESMTP id 3DE95184B3553 for ; Thu, 15 Jul 2021 04:27:00 +0000 (UTC) X-FDA: 78363537000.38.30E7B36 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by imf27.hostedemail.com (Postfix) with ESMTP id E7AF070000A9 for ; Thu, 15 Jul 2021 04:26:59 +0000 (UTC) Received: by mail.kernel.org (Postfix) with ESMTPSA id E204C61360; Thu, 15 Jul 2021 04:26:58 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linux-foundation.org; s=korg; t=1626323219; bh=ISLOowqcXFi7D/AecfCO5p2bdmuAJjYUwY8N6CDHt1c=; h=Date:From:To:Subject:In-Reply-To:From; b=tZsgM3blwJDRydnOBuqbwUx6MQqj9d3U690Ff9YPSKxtmMQVgrlWMF0oyxIkwuJkE wI9UB2M5kqjbayPMClFRX/1elgqMBbMdy2Q1xODKv6mVRRyvCVVhQ+ER/9r+/C87fH vxXKGiVJB2qlz5o+9D6t1JUCM+DUhC4iEpFmQMkk= Date: Wed, 14 Jul 2021 21:26:58 -0700 From: Andrew Morton To: akpm@linux-foundation.org, apopple@nvidia.com, hulkci@huawei.com, jrdr.linux@gmail.com, linux-mm@kvack.org, mm-commits@vger.kernel.org, oliver.sang@intel.com, torvalds@linux-foundation.org, yangyingliang@huawei.com Subject: [patch 09/13] lib/test_hmm: remove set but unused page variable Message-ID: <20210715042658.PXuvewt1u%akpm@linux-foundation.org> In-Reply-To: <20210714212609.fad116e584ba1194981a6294@linux-foundation.org> User-Agent: s-nail v14.8.16 Authentication-Results: imf27.hostedemail.com; dkim=pass header.d=linux-foundation.org header.s=korg header.b=tZsgM3bl; spf=pass (imf27.hostedemail.com: domain of akpm@linux-foundation.org designates 198.145.29.99 as permitted sender) smtp.mailfrom=akpm@linux-foundation.org; dmarc=none X-Stat-Signature: 4hfysxbjpx5ummrne9gpusayxawzg4n1 X-Rspamd-Queue-Id: E7AF070000A9 X-Rspamd-Server: rspam01 X-HE-Tag: 1626323219-303411 X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: From: Alistair Popple Subject: lib/test_hmm: remove set but unused page variable The HMM selftests use atomic_check_access() to check atomic access to a page has been revoked. It doesn't matter if the page mapping has been removed from the mirrored page tables as that also implies atomic access has been revoked. Therefore remove the unused page variable to fix this compiler warning: lib/test_hmm.c:631:16: warning: variable `page' set but not used [-Wunused-but-set-variable] Link: https://lkml.kernel.org/r/20210706025603.4059-1-apopple@nvidia.com Fixes: b659baea7546 ("mm: selftests for exclusive device memory") Signed-off-by: Alistair Popple Reported-by: Hulk Robot Reported-by: kernel test robot Reported-by: Yang Yingliang Acked-by: Souptick Joarder Signed-off-by: Andrew Morton --- lib/test_hmm.c | 2 -- 1 file changed, 2 deletions(-) --- a/lib/test_hmm.c~lib-test_hmm-remove-set-but-unused-page-variable +++ a/lib/test_hmm.c @@ -628,10 +628,8 @@ static int dmirror_check_atomic(struct d for (pfn = start >> PAGE_SHIFT; pfn < (end >> PAGE_SHIFT); pfn++) { void *entry; - struct page *page; entry = xa_load(&dmirror->pt, pfn); - page = xa_untag_pointer(entry); if (xa_pointer_tag(entry) == DPT_XA_TAG_ATOMIC) return -EPERM; }