From patchwork Tue Jul 6 02:56:03 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Alistair Popple X-Patchwork-Id: 12359713 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=-16.6 required=3.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_GIT autolearn=ham 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 CD118C07E99 for ; Tue, 6 Jul 2021 02:56:41 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 3824861466 for ; Tue, 6 Jul 2021 02:56:41 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 3824861466 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=nvidia.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id DBCE36B005D; Mon, 5 Jul 2021 22:56:40 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id D6B306B006C; Mon, 5 Jul 2021 22:56:40 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id BE4F56B0070; Mon, 5 Jul 2021 22:56:40 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0190.hostedemail.com [216.40.44.190]) by kanga.kvack.org (Postfix) with ESMTP id 9BD1A6B005D for ; Mon, 5 Jul 2021 22:56:40 -0400 (EDT) Received: from smtpin12.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay05.hostedemail.com (Postfix) with ESMTP id 18809181D553B for ; Tue, 6 Jul 2021 02:56:40 +0000 (UTC) X-FDA: 78330650160.12.551591C Received: from NAM12-DM6-obe.outbound.protection.outlook.com (mail-dm6nam12on2051.outbound.protection.outlook.com [40.107.243.51]) by imf18.hostedemail.com (Postfix) with ESMTP id B52E2400208A for ; Tue, 6 Jul 2021 02:56:39 +0000 (UTC) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=DYBLtoo6rW57qFbz3MnyTx8qXGpEJq15vU3MJSWmIOi9abyYY9F5xbJuPm6K78N8tHbMHRncurHGUHcx0Nybsw7RAKyuKyIKeriFlD27ifsbg39BsZCL9D849aXEzbkpdau73IU0k/Hv+bCEo18S8wWrn1lc0EulKQue7ZwTA2TqkdPluYjQHkECgxeQwFsi+8ZNpmHXIrp86c8WE6x98i5cFcBVkHYPK48+x/uDG+CXqq4gJUN02lttkpsvgTm4rrTVTlwHhF5Al/GLOeIC9Q43cjL9o0iPrInoWV9s2B7Ne0XomNbWXnKOunHpk4jKv6mJyrkN84Hz+nsrpZOVLA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=tOJTuRm2ls+TGgsrzYabgpKHVWqrdEkXKMHMs3gPEC8=; b=Pybf9kIxF8KXPR/XBNLRSqCUm/S+ykJAq3SxMGng2U5FvqCEdv9NlzPiPrTPE5tMBqsaulbCDtJYj44YD2ol77QKetaX5GmZ+f9IOhdNkCrdk73OoiwhbPrj7zPfRrSdZUtGUlcL2Y5tmmoHFm56Ux5NeEdHpQKjMEAzlBRjNS3FS5H/fvMBDLmLhyGcVPWgSBzL8dRiLj3Z/x4rWlj61/4zfipEBEvmQFwN03cgRaBuTqwJH2Z7w5GBb6h4swg7bKkoYA0YBPR7yyVhElabL3DNJTYl/nneurpuFzIjO8HzNB/ca+lLXJM6DIYuwlnVI3znkJr+o3UmvT3sFErmjQ== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 216.228.112.34) smtp.rcpttodomain=intel.com smtp.mailfrom=nvidia.com; dmarc=pass (p=none sp=none pct=100) action=none header.from=nvidia.com; dkim=none (message not signed); arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=Nvidia.com; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=tOJTuRm2ls+TGgsrzYabgpKHVWqrdEkXKMHMs3gPEC8=; b=LAy/frKX0x/yQHl4Kps0OOm528WEAunC667h1W2tDnDR6IzS4l3OatOcyYT7DnZV/rUP32XG2imbW6HSKPSjvJZJcvsPiN/Vep1QGABM7wZ4apxeujX3Su082b2IhjUh0v0chsqEMzKco1B0gKEJfP33okSrs8Quw9nQRyqmIrl1NKcH2s9LqnicDlNsnGQ0vEWhr++wjNISPLHGlo+0t6jtDM+dckJ5eSBqQGAk7aG/a7egS2KdxwpItXWEW5E0Scu1dvb3OTku5gt8Y/umE5QmISdHj3wLXSMg1EBQYlw/GsMhx/giQRjz0z8au+64V5t0BLd4E3MALr9PPEwPlQ== Received: from MWHPR13CA0028.namprd13.prod.outlook.com (2603:10b6:300:95::14) by DM6PR12MB3002.namprd12.prod.outlook.com (2603:10b6:5:117::15) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4287.26; Tue, 6 Jul 2021 02:56:37 +0000 Received: from CO1NAM11FT041.eop-nam11.prod.protection.outlook.com (2603:10b6:300:95:cafe::1f) by MWHPR13CA0028.outlook.office365.com (2603:10b6:300:95::14) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4308.8 via Frontend Transport; Tue, 6 Jul 2021 02:56:37 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 216.228.112.34) smtp.mailfrom=nvidia.com; intel.com; dkim=none (message not signed) header.d=none;intel.com; dmarc=pass action=none header.from=nvidia.com; Received-SPF: Pass (protection.outlook.com: domain of nvidia.com designates 216.228.112.34 as permitted sender) receiver=protection.outlook.com; client-ip=216.228.112.34; helo=mail.nvidia.com; Received: from mail.nvidia.com (216.228.112.34) by CO1NAM11FT041.mail.protection.outlook.com (10.13.174.217) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384) id 15.20.4287.22 via Frontend Transport; Tue, 6 Jul 2021 02:56:37 +0000 Received: from localhost (172.20.187.6) by HQMAIL107.nvidia.com (172.20.187.13) with Microsoft SMTP Server (TLS) id 15.0.1497.2; Tue, 6 Jul 2021 02:56:35 +0000 From: Alistair Popple To: , CC: , Alistair Popple , Hulk Robot , kernel test robot , "Yang Yingliang" Subject: [PATCH] lib/test_hmm: Remove set but unused page variable Date: Tue, 6 Jul 2021 12:56:03 +1000 Message-ID: <20210706025603.4059-1-apopple@nvidia.com> X-Mailer: git-send-email 2.20.1 MIME-Version: 1.0 X-Originating-IP: [172.20.187.6] X-ClientProxiedBy: HQMAIL105.nvidia.com (172.20.187.12) To HQMAIL107.nvidia.com (172.20.187.13) X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 306fa531-3e2a-45e8-3ded-08d94029ac04 X-MS-TrafficTypeDiagnostic: DM6PR12MB3002: X-Microsoft-Antispam-PRVS: X-MS-Exchange-Transport-Forked: True X-MS-Oob-TLC-OOBClassifiers: OLM:8273; X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: opGFxmXqaynRj3C5u+8cBMKxjdvITr0wnsHYJdM51GVY0k7sxsIz24kF+rPutUAL2iTMGzPsmu5cVX602KRHBz+6kkDCpmXIfiqyUTgwGBYc+hkQj/0a2xuGjQJojFK/t0+9elLSmkEocU3P9WKcD3m9sdqo0x8F6qs+CAMUgv+yvQQhJmUWmpEsRK6CBGv+1HgQPOnyb05Ne+p63gHfCY0CbJTyFd9IY3aJ8pOG9CbGbODHYvGjHsNylm3KB2DABghPSv1TDT2Kj1O8sLxqn0R5qQUYEiF11KHaZ4/21qY0GdbYmxLxD9Ic8BgW2VRAW5l0+rourF8kt8qZxVFSfnccIqb2lgKYaqZSt4D5XNKqr5c+yx/S6E6+98twRuaDjQYdVly3slYNuqHvPl6i22091u5ZxYp9gb7Ms9SP1Xd08cD/P/VKsu7rsm3/uUibFlzaVYWXUB2KL2IV3EjxyI2SmQ1ZIEDEpiNfoFpjOGG+iWNOS7pWb1vFaqFtZyHjYUtR7Xr0d5vfgPq6NurJM7yeAn0dpWV98CpR972vGsxC0M7YuvBjLBYR4+jka8DQX331v1Vvkl8W+5imf7XRA/8mDZf52Yhfxv0v9I+vMR4j3AYEqVGRoFMBY5n0LrP5GhDaeJ+oNiMIwQe6fMIZn+KhpXKYGzYM6N7ZVI0lwXkr2/cMMsobSiOiAtpLKI+4ZlH4JYx0SrmtpGm+YhV0TQ== X-Forefront-Antispam-Report: CIP:216.228.112.34;CTRY:US;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:mail.nvidia.com;PTR:schybrid03.nvidia.com;CAT:NONE;SFS:(4636009)(376002)(346002)(136003)(39860400002)(396003)(36840700001)(46966006)(4326008)(82740400003)(316002)(110136005)(2906002)(426003)(5660300002)(8936002)(70206006)(2616005)(36906005)(336012)(478600001)(8676002)(54906003)(1076003)(86362001)(70586007)(186003)(16526019)(26005)(356005)(82310400003)(36860700001)(7636003)(36756003)(6666004)(83380400001)(47076005);DIR:OUT;SFP:1101; X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 06 Jul 2021 02:56:37.2422 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 306fa531-3e2a-45e8-3ded-08d94029ac04 X-MS-Exchange-CrossTenant-Id: 43083d15-7273-40c1-b7db-39efd9ccc17a X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=43083d15-7273-40c1-b7db-39efd9ccc17a;Ip=[216.228.112.34];Helo=[mail.nvidia.com] X-MS-Exchange-CrossTenant-AuthSource: CO1NAM11FT041.eop-nam11.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM6PR12MB3002 X-Rspamd-Server: rspam05 X-Rspamd-Queue-Id: B52E2400208A X-Stat-Signature: msukmku89bw5sfzsm1oaqr3mzabhndxm Authentication-Results: imf18.hostedemail.com; dkim=pass header.d=Nvidia.com header.s=selector2 header.b="LAy/frKX"; dmarc=pass (policy=none) header.from=nvidia.com; spf=none (imf18.hostedemail.com: domain of apopple@nvidia.com has no SPF policy when checking 40.107.243.51) smtp.mailfrom=apopple@nvidia.com X-HE-Tag: 1625540199-835454 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: 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] Fixes: b659baea7546 ("mm: selftests for exclusive device memory") Reported-by: Hulk Robot Reported-by: kernel test robot Reported-by: Yang Yingliang Signed-off-by: Alistair Popple Acked-by: Souptick Joarder --- lib/test_hmm.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/lib/test_hmm.c b/lib/test_hmm.c index 8c55c4723692..c259842f6d44 100644 --- a/lib/test_hmm.c +++ b/lib/test_hmm.c @@ -628,10 +628,8 @@ static int dmirror_check_atomic(struct dmirror *dmirror, unsigned long start, 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; }