From mboxrd@z Thu Jan 1 00:00:00 1970 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=-14.6 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH,MAILING_LIST_MULTI,SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS, 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 9C9C9C433E2 for ; Mon, 14 Sep 2020 21:38:08 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 29F3C20759 for ; Mon, 14 Sep 2020 21:38:07 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=nvidia.com header.i=@nvidia.com header.b="BNGhvkUh" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 29F3C20759 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 5C45A900006; Mon, 14 Sep 2020 17:38:07 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 54D9B8E0001; Mon, 14 Sep 2020 17:38:07 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 4147F900006; Mon, 14 Sep 2020 17:38:07 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0046.hostedemail.com [216.40.44.46]) by kanga.kvack.org (Postfix) with ESMTP id 289BC8E0001 for ; Mon, 14 Sep 2020 17:38:07 -0400 (EDT) Received: from smtpin15.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay01.hostedemail.com (Postfix) with ESMTP id E2768180AD804 for ; Mon, 14 Sep 2020 21:38:06 +0000 (UTC) X-FDA: 77262980172.15.move17_5b064762710b Received: from filter.hostedemail.com (10.5.16.251.rfc1918.com [10.5.16.251]) by smtpin15.hostedemail.com (Postfix) with ESMTP id B03601814B0C1 for ; Mon, 14 Sep 2020 21:38:06 +0000 (UTC) X-HE-Tag: move17_5b064762710b X-Filterd-Recvd-Size: 4176 Received: from hqnvemgate24.nvidia.com (hqnvemgate24.nvidia.com [216.228.121.143]) by imf20.hostedemail.com (Postfix) with ESMTP for ; Mon, 14 Sep 2020 21:38:05 +0000 (UTC) Received: from hqpgpgate101.nvidia.com (Not Verified[216.228.121.13]) by hqnvemgate24.nvidia.com (using TLS: TLSv1.2, DES-CBC3-SHA) id ; Mon, 14 Sep 2020 14:35:44 -0700 Received: from hqmail.nvidia.com ([172.20.161.6]) by hqpgpgate101.nvidia.com (PGP Universal service); Mon, 14 Sep 2020 14:38:04 -0700 X-PGP-Universal: processed; by hqpgpgate101.nvidia.com on Mon, 14 Sep 2020 14:38:04 -0700 Received: from HQMAIL111.nvidia.com (172.20.187.18) by HQMAIL107.nvidia.com (172.20.187.13) with Microsoft SMTP Server (TLS) id 15.0.1473.3; Mon, 14 Sep 2020 21:38:04 +0000 Received: from hqnvemgw03.nvidia.com (10.124.88.68) by HQMAIL111.nvidia.com (172.20.187.18) with Microsoft SMTP Server (TLS) id 15.0.1473.3 via Frontend Transport; Mon, 14 Sep 2020 21:38:04 +0000 Received: from rcampbell-dev.nvidia.com (Not Verified[10.110.48.66]) by hqnvemgw03.nvidia.com with Trustwave SEG (v7,5,8,10121) id ; Mon, 14 Sep 2020 14:38:04 -0700 From: Ralph Campbell To: , CC: Jerome Glisse , Andrew Morton , Ralph Campbell Subject: [PATCH] hmm/test: remove unused dmirror_zero_page Date: Mon, 14 Sep 2020 14:38:01 -0700 Message-ID: <20200914213801.16520-1-rcampbell@nvidia.com> X-Mailer: git-send-email 2.20.1 MIME-Version: 1.0 X-NVConfidentiality: public Content-Transfer-Encoding: quoted-printable Content-Type: text/plain DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nvidia.com; s=n1; t=1600119344; bh=/ehxgyAd0to++qcy0nw+lw74+CJwaK3eELXvYHOH04U=; h=X-PGP-Universal:From:To:CC:Subject:Date:Message-ID:X-Mailer: MIME-Version:X-NVConfidentiality:Content-Transfer-Encoding: Content-Type; b=BNGhvkUhGaPzR2Su8Yf85FP0WTC4Ex3+dP1SQBuUhsLIlziIr7iW6XmP7QQAaV33C OVeibN5Dc2drX1yhsalabrjJhDd9R5EiriPw5QnueLqqGQm+b+KZ19LycAdNhNbMm6 eLyzD6uFxQSLToXH2zIqn5EIUrQ6HAJDPwicKbQR6GC5rnBwgx+4aos7f9+G2yJ5nI DKJrJjZKt0nkyvNne0INe3ZI3vdnJffT/tWkrHhgb7pqDsOozWCDSRaRvN5ll5hI3v VELlwhMC6y9A3iOyHdI8XcEXUDpPwjY9N01v6Ju/6f4OY/ejtFbpWmPYq+Rqxee+dy OOdt1cfd6+tww== X-Rspamd-Queue-Id: B03601814B0C1 X-Spamd-Result: default: False [0.00 / 100.00] X-Rspamd-Server: rspam03 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 variable dmirror_zero_page is unused in the HMM self test driver which was probably intended to demonstrate how a driver could use migrate_vma_setup() to share a single read-only device private zero page similar to how the CPU does. However, this isn't needed for the self tests so remove it. Signed-off-by: Ralph Campbell --- This applies to linux-mm and is intended for Andrew Morton's git tree. lib/test_hmm.c | 14 -------------- 1 file changed, 14 deletions(-) diff --git a/lib/test_hmm.c b/lib/test_hmm.c index e3065d6123f0..c8133f50160b 100644 --- a/lib/test_hmm.c +++ b/lib/test_hmm.c @@ -36,7 +36,6 @@ static const struct dev_pagemap_ops dmirror_devmem_ops; static const struct mmu_interval_notifier_ops dmirror_min_ops; static dev_t dmirror_dev; -static struct page *dmirror_zero_page; =20 struct dmirror_device; =20 @@ -1127,17 +1126,6 @@ static int __init hmm_dmirror_init(void) goto err_chrdev; } =20 - /* - * Allocate a zero page to simulate a reserved page of device private - * memory which is always zero. The zero_pfn page isn't used just to - * make the code here simpler (i.e., we need a struct page for it). - */ - dmirror_zero_page =3D alloc_page(GFP_HIGHUSER | __GFP_ZERO); - if (!dmirror_zero_page) { - ret =3D -ENOMEM; - goto err_chrdev; - } - pr_info("HMM test module loaded. This is only for testing HMM.\n"); return 0; =20 @@ -1153,8 +1141,6 @@ static void __exit hmm_dmirror_exit(void) { int id; =20 - if (dmirror_zero_page) - __free_page(dmirror_zero_page); for (id =3D 0; id < DMIRROR_NDEVICES; id++) dmirror_device_remove(dmirror_devices + id); unregister_chrdev_region(dmirror_dev, DMIRROR_NDEVICES); --=20 2.20.1