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: <20230403111255.141623-1-steven.price@arm.com>
Date:   Mon,  3 Apr 2023 12:12:55 +0100
From:   Steven Price <steven.price@....com>
To:     Andrew Morton <akpm@...ux-foundation.org>
Cc:     Steven Price <steven.price@....com>, linux-fsdevel@...r.kernel.org,
        linux-kernel@...r.kernel.org, Jason Gunthorpe <jgg@...pe.ca>,
        Thomas Hellstrom <thellstrom@...are.com>,
        Christoph Hellwig <hch@....de>,
        kernel test robot <lkp@...el.com>
Subject: [PATCH] smaps: Fix defined but not used smaps_shmem_walk_ops

When !CONFIG_SHMEM smaps_shmem_walk_ops is defined but not used,
triggering a compiler warning. Surround the definition with an #ifdef to
keep the compiler happy.

Fixes: 7b86ac3371b7 ("pagewalk: separate function pointers from iterator data")
Reported-by: kernel test robot <lkp@...el.com>
Link: https://lore.kernel.org/oe-kbuild-all/202304031749.UiyJpxzF-lkp@intel.com/
Signed-off-by: Steven Price <steven.price@....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 6a96e1713fd5..3d4f8859dac1 100644
--- a/fs/proc/task_mmu.c
+++ b/fs/proc/task_mmu.c
@@ -761,11 +761,13 @@ static const struct mm_walk_ops smaps_walk_ops = {
 	.hugetlb_entry		= smaps_hugetlb_range,
 };
 
+#ifdef CONFIG_SHMEM
 static const struct mm_walk_ops smaps_shmem_walk_ops = {
 	.pmd_entry		= smaps_pte_range,
 	.hugetlb_entry		= smaps_hugetlb_range,
 	.pte_hole		= smaps_pte_hole,
 };
+#endif
 
 /*
  * Gather mem stats from @vma with the indicated beginning
-- 
2.34.1

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ