lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <20230928085311.938163-1-singhabhinav9051571833@gmail.com>
Date:   Thu, 28 Sep 2023 14:23:11 +0530
From:   Abhinav <singhabhinav9051571833@...il.com>
To:     akpm@...ux-foundation.org, david@...hat.com, rppt@...nel.org,
        hughd@...gle.com, Liam.Howlett@...cle.com, surenb@...gle.com,
        usama.anjum@...labora.com, wangkefeng.wang@...wei.com,
        ryan.roberts@....com, yuanchu@...gle.com
Cc:     linux-kernel@...r.kernel.org, linux-fsdevel@...r.kernel.org,
        skhan@...uxfoundation.org,
        Abhinav <singhabhinav9051571833@...il.com>
Subject: [PATCH] Fixed Kunit test warning message for 'fs' module

fs/proc/task_mmu : fix warning

All the caller of the function pagemap_scan_backout_range(...) are inside
ifdef preprocessor which is checking for the macro
'CONFIG_TRANSPARENT_HUGEPAGE' is set or not. When it is not set the
function doesn't have a caller and it generates a warning unused
function.

Putting the whole function inside the preprocessor fixes this warning.

Signed-off-by: Abhinav <singhabhinav9051571833@...il.com>
---
 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 27da6337d675..88b6b8847cf3 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;
 }
 
+#ifdef CONFIG_TRANSPARENT_HUGEPAGE
 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.34.1

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ