Received: by 2002:a05:7412:2a8c:b0:e2:908c:2ebd with SMTP id u12csp2355976rdh; Tue, 26 Sep 2023 23:12:18 -0700 (PDT) X-Google-Smtp-Source: AGHT+IHXTTfBJoJLW5nW6Ufa3oQpYzbBt0XOOQ9t/iSlzcOqvsJ9Am158C2HBi+jNokQapQl7nC5 X-Received: by 2002:a05:6358:789:b0:132:ce36:ee31 with SMTP id n9-20020a056358078900b00132ce36ee31mr1721633rwj.6.1695795137902; Tue, 26 Sep 2023 23:12:17 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1695795137; cv=none; d=google.com; s=arc-20160816; b=o1O5Vv/8I77mhSGi5nh3JUYPC3GcjSsIFsSkt6E90USuZwXKHJRXLY1YA4wu40FYLg EfaInykvPRJtf1qD0CUyf4FC6142gl4uPP7O1IjdsZMKO0jXKlnQt7mbh7nk82ZyzSQO QXZ4nJFxpQ/dA6u0JJ8afp6Aqfx1NQb1coVpwOJ21oH/z9rtP+lydSo9IcWDJGJwh02W duerd2ZLBegZ8l5DflcdUFDc25WGMwQMVteBgTXsv6ePOobw6fpibT3tlNQnmkNjKqsB AoBt4m6AJ+aidZlUEgMfGxtgT4u2tO9ypkym7JSlxMxVFvOs/XoHYXYZ+W/fyU7VM9qU fSQw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from:dkim-signature; bh=JjwXKZ5brJo876cD7Rghmo7KAVIp1qtJejNs4y7Wk0c=; fh=vqnwJASZJI0W20W6r52KCx85VaiEOGcLvas0mYjeZdU=; b=sCFo6v0tkii1vyl1zrwRxVzU+C4frZoKX1xN77p+oxykvcEFH1rseLnt2SiaeotHfJ cXZ1boUinvIn45l/0rDFxjdH1Zkp5i61Os5OS9MGEw/QExr/Db7Ffpjo4jdXXfYUlwZg Wl/wCUF4CLean4ocFJJDmz2DR3v3VBTHMCWNOPosGfa6YBF4YU0s6hWdviGsjavC7xnu ElK+nwxmQtd1gGc7jinv7L44TENX66hKldSmzjMHYelLyph7nXV7z7hk56Y0BATNHVH9 FLhg33AzE+QLtB1Uc24aCilk2rh2Ek8wYJfVVm2IqqG1IwAkZXWEj0YHu3CkZFcExUK5 71cA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=bOTINPwq; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:7 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from snail.vger.email (snail.vger.email. [2620:137:e000::3:7]) by mx.google.com with ESMTPS id v10-20020a63610a000000b0057c7341d562si12838876pgb.70.2023.09.26.23.12.17 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 26 Sep 2023 23:12:17 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:7 as permitted sender) client-ip=2620:137:e000::3:7; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=bOTINPwq; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:7 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by snail.vger.email (Postfix) with ESMTP id 54A1F801C191; Tue, 26 Sep 2023 23:04:12 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at snail.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229679AbjI0GEI (ORCPT + 99 others); Wed, 27 Sep 2023 02:04:08 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:58362 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229677AbjI0GDg (ORCPT ); Wed, 27 Sep 2023 02:03:36 -0400 Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 7A27019F; Tue, 26 Sep 2023 23:03:03 -0700 (PDT) Received: by smtp.kernel.org (Postfix) with ESMTPSA id B1657C433C8; Wed, 27 Sep 2023 06:03:00 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1695794583; bh=01fluBx6Of2K/eByxUSW3CGmW9JZOv7Q2Sa2ea4VCTQ=; h=From:To:Cc:Subject:Date:From; b=bOTINPwqBFbxA86JbXopC7VwtUeZoBv2BDvOoR4G9bkSlczSxu7GtkCIEXi7UQQdJ Yh19cYWPAEtdmDrgqnyAuQxLXNDElCoNmE8r4fTDNvf4P1oQyYDlBrQ5ZR8AZ/okWi dgZP+gB71akdEEQA8rIe8E0556tvCSggxO0aqc6skpXrsJBIYZE9OORmthqvYZS90p PInHLs6psi/qkoCF1rs4vZmzVsAkgmmYvzc3QVzQ2FnwevNCve4MfzeeByUmBbgr9J G00Rh3/u+UtxBR5zzj1UDF3XU5WOjnBCp3y0g4z0GuPuADkvoA5q/vJJ6KEYJFo0g5 I3Bo/S11+YPHA== From: Arnd Bergmann To: =?UTF-8?q?Micha=C5=82=20Miros=C5=82aw?= , Muhammad Usama Anjum , Andrei Vagin , Andrew Morton Cc: Arnd Bergmann , David Hildenbrand , "Mike Rapoport (IBM)" , "Liam R. Howlett" , Hugh Dickins , linux-kernel@vger.kernel.org, linux-fsdevel@vger.kernel.org Subject: [PATCH] fs/proc/task_mmu: hide unused pagemap_scan_backout_range() function Date: Wed, 27 Sep 2023 08:02:23 +0200 Message-Id: <20230927060257.2975412-1-arnd@kernel.org> X-Mailer: git-send-email 2.39.2 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF, RCVD_IN_DNSWL_BLOCKED,SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (snail.vger.email [0.0.0.0]); Tue, 26 Sep 2023 23:04:12 -0700 (PDT) From: Arnd Bergmann This function has two callers, each of which are hidden behind an #ifdef: fs/proc/task_mmu.c:2022:13: error: 'pagemap_scan_backout_range' defined but not used [-Werror=unused-function] Add another conditional to check for both options to avoid the unused-function warning. Fixes: 93538f467c0f6 ("fs/proc/task_mmu: implement IOCTL to get and optionally clear info about PTEs") Signed-off-by: Arnd Bergmann --- A different fix "fs-proc-task_mmu-implement-ioctl-to-get-and-optionally-clear-info-about-ptes-fix-2" was applied already but is wrong and introduces a worse result: fs/proc/task_mmu.c:2105:17: error: implicit declaration of function 'pagemap_scan_backout_range'; did you mean 'pagemap_scan_push_range'? [-Werror=implicit-function-declaration] Please use this one instead if no other fix has been merged in the meantime. --- fs/proc/task_mmu.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/fs/proc/task_mmu.c b/fs/proc/task_mmu.c index 27da6337d6754..f5d3f2b8fa944 100644 --- a/fs/proc/task_mmu.c +++ b/fs/proc/task_mmu.c @@ -2019,6 +2019,7 @@ static bool pagemap_scan_push_range(unsigned long categories, return true; } +#if defined(CONFIG_TRANSPARENT_HUGEPAGE) || defined(CONFIG_HUGETLB_PAGE) static void pagemap_scan_backout_range(struct pagemap_scan_private *p, unsigned long addr, unsigned long end) { @@ -2031,6 +2032,7 @@ static void pagemap_scan_backout_range(struct pagemap_scan_private *p, p->found_pages -= (end - addr) / PAGE_SIZE; } +#endif static int pagemap_scan_output(unsigned long categories, struct pagemap_scan_private *p, -- 2.39.2