* [akpm-mm:mm-unstable 264/269] fs/proc/task_mmu.c:2018:13: warning: 'pagemap_scan_backout_range' defined but not used
@ 2023-09-26 1:32 kernel test robot
2023-09-26 21:23 ` Andrew Morton
0 siblings, 1 reply; 2+ messages in thread
From: kernel test robot @ 2023-09-26 1:32 UTC (permalink / raw)
To: Muhammad Usama Anjum
Cc: oe-kbuild-all, Andrew Morton, Linux Memory Management List,
Michał Mirosław, Andrei Vagin
tree: https://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm.git mm-unstable
head: 81fd55e0d6b6bd11a50070f7639c996a0e3aeea8
commit: 93538f467c0f64ef3fda61cd862115dca782faa4 [264/269] fs/proc/task_mmu: implement IOCTL to get and optionally clear info about PTEs
config: alpha-allyesconfig (https://download.01.org/0day-ci/archive/20230926/202309260903.qzpqNFz3-lkp@intel.com/config)
compiler: alpha-linux-gcc (GCC) 13.2.0
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20230926/202309260903.qzpqNFz3-lkp@intel.com/reproduce)
If you fix the issue in a separate patch/commit (i.e. not just a new version of
the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <lkp@intel.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202309260903.qzpqNFz3-lkp@intel.com/
All warnings (new ones prefixed by >>):
>> fs/proc/task_mmu.c:2018:13: warning: 'pagemap_scan_backout_range' defined but not used [-Wunused-function]
2018 | static void pagemap_scan_backout_range(struct pagemap_scan_private *p,
| ^~~~~~~~~~~~~~~~~~~~~~~~~~
vim +/pagemap_scan_backout_range +2018 fs/proc/task_mmu.c
2017
> 2018 static void pagemap_scan_backout_range(struct pagemap_scan_private *p,
2019 unsigned long addr, unsigned long end)
2020 {
2021 struct page_region *cur_buf = &p->vec_buf[p->vec_buf_index];
2022
2023 if (cur_buf->start != addr)
2024 cur_buf->end = addr;
2025 else
2026 cur_buf->start = cur_buf->end = 0;
2027
2028 p->found_pages -= (end - addr) / PAGE_SIZE;
2029 }
2030
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [akpm-mm:mm-unstable 264/269] fs/proc/task_mmu.c:2018:13: warning: 'pagemap_scan_backout_range' defined but not used
2023-09-26 1:32 [akpm-mm:mm-unstable 264/269] fs/proc/task_mmu.c:2018:13: warning: 'pagemap_scan_backout_range' defined but not used kernel test robot
@ 2023-09-26 21:23 ` Andrew Morton
0 siblings, 0 replies; 2+ messages in thread
From: Andrew Morton @ 2023-09-26 21:23 UTC (permalink / raw)
To: kernel test robot
Cc: Muhammad Usama Anjum, oe-kbuild-all,
Linux Memory Management List, Michał Mirosław,
Andrei Vagin
On Tue, 26 Sep 2023 09:32:34 +0800 kernel test robot <lkp@intel.com> wrote:
> tree: https://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm.git mm-unstable
> head: 81fd55e0d6b6bd11a50070f7639c996a0e3aeea8
> commit: 93538f467c0f64ef3fda61cd862115dca782faa4 [264/269] fs/proc/task_mmu: implement IOCTL to get and optionally clear info about PTEs
> config: alpha-allyesconfig (https://download.01.org/0day-ci/archive/20230926/202309260903.qzpqNFz3-lkp@intel.com/config)
> compiler: alpha-linux-gcc (GCC) 13.2.0
> reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20230926/202309260903.qzpqNFz3-lkp@intel.com/reproduce)
>
> If you fix the issue in a separate patch/commit (i.e. not just a new version of
> the same patch/commit), kindly add following tags
> | Reported-by: kernel test robot <lkp@intel.com>
> | Closes: https://lore.kernel.org/oe-kbuild-all/202309260903.qzpqNFz3-lkp@intel.com/
>
> All warnings (new ones prefixed by >>):
>
> >> fs/proc/task_mmu.c:2018:13: warning: 'pagemap_scan_backout_range' defined but not used [-Wunused-function]
> 2018 | static void pagemap_scan_backout_range(struct pagemap_scan_private *p,
> | ^~~~~~~~~~~~~~~~~~~~~~~~~~
>
>
Thanks. I guess moving the definition inside CONFIG_HUGETLB_PAGE will
suffice,
--- a/fs/proc/task_mmu.c~fs-proc-task_mmu-implement-ioctl-to-get-and-optionally-clear-info-about-ptes-fix-fix-fix
+++ a/fs/proc/task_mmu.c
@@ -1940,6 +1940,19 @@ static void make_uffd_wp_huge_pte(struct
set_huge_pte_at(vma->vm_mm, addr, ptep,
make_pte_marker(PTE_MARKER_UFFD_WP), psize);
}
+
+static void pagemap_scan_backout_range(struct pagemap_scan_private *p,
+ unsigned long addr, unsigned long end)
+{
+ struct page_region *cur_buf = &p->vec_buf[p->vec_buf_index];
+
+ if (cur_buf->start != addr)
+ cur_buf->end = addr;
+ else
+ cur_buf->start = cur_buf->end = 0;
+
+ p->found_pages -= (end - addr) / PAGE_SIZE;
+}
#endif /* CONFIG_HUGETLB_PAGE */
static bool pagemap_scan_is_interesting_page(unsigned long categories,
@@ -2019,19 +2032,6 @@ static bool pagemap_scan_push_range(unsi
return true;
}
-static void pagemap_scan_backout_range(struct pagemap_scan_private *p,
- unsigned long addr, unsigned long end)
-{
- struct page_region *cur_buf = &p->vec_buf[p->vec_buf_index];
-
- if (cur_buf->start != addr)
- cur_buf->end = addr;
- else
- cur_buf->start = cur_buf->end = 0;
-
- p->found_pages -= (end - addr) / PAGE_SIZE;
-}
-
static int pagemap_scan_output(unsigned long categories,
struct pagemap_scan_private *p,
unsigned long addr, unsigned long *end)
_
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2023-09-26 21:23 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-09-26 1:32 [akpm-mm:mm-unstable 264/269] fs/proc/task_mmu.c:2018:13: warning: 'pagemap_scan_backout_range' defined but not used kernel test robot
2023-09-26 21:23 ` Andrew Morton
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox