* [linux-next:master 4318/4736] arch/x86/mm/init.c:1057:15: warning: no previous prototype for 'arch_max_swapfile_size'
@ 2022-09-02 23:32 kernel test robot
2022-09-04 17:35 ` Peter Xu
0 siblings, 1 reply; 2+ messages in thread
From: kernel test robot @ 2022-09-02 23:32 UTC (permalink / raw)
To: Peter Xu
Cc: kbuild-all, Linux Memory Management List, Andrew Morton, Huang, Ying
tree: https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git master
head: e47eb90a0a9ae20b82635b9b99a8d0979b757ad8
commit: c21e4d92cbb920b50a809409bc56c6ca4f09e7bf [4318/4736] mm/swap: cache maximum swapfile size when init swap
config: x86_64-randconfig-a011 (https://download.01.org/0day-ci/archive/20220903/202209030759.1ODqXm2p-lkp@intel.com/config)
compiler: gcc-11 (Debian 11.3.0-5) 11.3.0
reproduce (this is a W=1 build):
# https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git/commit/?id=c21e4d92cbb920b50a809409bc56c6ca4f09e7bf
git remote add linux-next https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git
git fetch --no-tags linux-next master
git checkout c21e4d92cbb920b50a809409bc56c6ca4f09e7bf
# save the config file
mkdir build_dir && cp config build_dir/.config
make W=1 O=build_dir ARCH=x86_64 SHELL=/bin/bash arch/x86/mm/ mm/
If you fix the issue, kindly add following tag where applicable
Reported-by: kernel test robot <lkp@intel.com>
All warnings (new ones prefixed by >>):
>> arch/x86/mm/init.c:1057:15: warning: no previous prototype for 'arch_max_swapfile_size' [-Wmissing-prototypes]
1057 | unsigned long arch_max_swapfile_size(void)
| ^~~~~~~~~~~~~~~~~~~~~~
--
>> mm/swapfile.c:2820:22: warning: no previous prototype for 'arch_max_swapfile_size' [-Wmissing-prototypes]
2820 | __weak unsigned long arch_max_swapfile_size(void)
| ^~~~~~~~~~~~~~~~~~~~~~
vim +/arch_max_swapfile_size +1057 arch/x86/mm/init.c
1055
1056 #ifdef CONFIG_SWAP
> 1057 unsigned long arch_max_swapfile_size(void)
--
0-DAY CI Kernel Test Service
https://01.org/lkp
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [linux-next:master 4318/4736] arch/x86/mm/init.c:1057:15: warning: no previous prototype for 'arch_max_swapfile_size'
2022-09-02 23:32 [linux-next:master 4318/4736] arch/x86/mm/init.c:1057:15: warning: no previous prototype for 'arch_max_swapfile_size' kernel test robot
@ 2022-09-04 17:35 ` Peter Xu
0 siblings, 0 replies; 2+ messages in thread
From: Peter Xu @ 2022-09-04 17:35 UTC (permalink / raw)
To: kernel test robot, Andrew Morton
Cc: kbuild-all, Linux Memory Management List, Andrew Morton, Huang, Ying
[-- Attachment #1: Type: text/plain, Size: 2123 bytes --]
On Sat, Sep 03, 2022 at 07:32:02AM +0800, kernel test robot wrote:
> tree: https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git master
> head: e47eb90a0a9ae20b82635b9b99a8d0979b757ad8
> commit: c21e4d92cbb920b50a809409bc56c6ca4f09e7bf [4318/4736] mm/swap: cache maximum swapfile size when init swap
> config: x86_64-randconfig-a011 (https://download.01.org/0day-ci/archive/20220903/202209030759.1ODqXm2p-lkp@intel.com/config)
> compiler: gcc-11 (Debian 11.3.0-5) 11.3.0
> reproduce (this is a W=1 build):
> # https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git/commit/?id=c21e4d92cbb920b50a809409bc56c6ca4f09e7bf
> git remote add linux-next https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git
> git fetch --no-tags linux-next master
> git checkout c21e4d92cbb920b50a809409bc56c6ca4f09e7bf
> # save the config file
> mkdir build_dir && cp config build_dir/.config
> make W=1 O=build_dir ARCH=x86_64 SHELL=/bin/bash arch/x86/mm/ mm/
>
> If you fix the issue, kindly add following tag where applicable
> Reported-by: kernel test robot <lkp@intel.com>
>
> All warnings (new ones prefixed by >>):
>
> >> arch/x86/mm/init.c:1057:15: warning: no previous prototype for 'arch_max_swapfile_size' [-Wmissing-prototypes]
> 1057 | unsigned long arch_max_swapfile_size(void)
> | ^~~~~~~~~~~~~~~~~~~~~~
> --
> >> mm/swapfile.c:2820:22: warning: no previous prototype for 'arch_max_swapfile_size' [-Wmissing-prototypes]
> 2820 | __weak unsigned long arch_max_swapfile_size(void)
> | ^~~~~~~~~~~~~~~~~~~~~~
>
>
> vim +/arch_max_swapfile_size +1057 arch/x86/mm/init.c
>
> 1055
> 1056 #ifdef CONFIG_SWAP
> > 1057 unsigned long arch_max_swapfile_size(void)
>
> --
> 0-DAY CI Kernel Test Service
> https://01.org/lkp
Hi, Andrew,
The oneliner patch fixes the issue for me, which is attached. The patch to
squash in is within the subject after "fixup: " (ff516092aa69 ("mm/swap:
cache maximum swapfile size when init swap", 2022-09-02)).
Thanks,
--
Peter Xu
[-- Attachment #2: 0001-fixup-mm-swap-cache-maximum-swapfile-size-when-init-.patch --]
[-- Type: text/plain, Size: 970 bytes --]
From 99ce98e66d67ecadc6a73791aa425d76155a9f59 Mon Sep 17 00:00:00 2001
From: Peter Xu <peterx@redhat.com>
Date: Sun, 4 Sep 2022 13:31:38 -0400
Subject: [PATCH] fixup! mm/swap: cache maximum swapfile size when init swap
Content-type: text/plain
Signed-off-by: Peter Xu <peterx@redhat.com>
---
include/linux/swapfile.h | 1 +
1 file changed, 1 insertion(+)
diff --git a/include/linux/swapfile.h b/include/linux/swapfile.h
index 75fc069594a5..29182dfc0cc7 100644
--- a/include/linux/swapfile.h
+++ b/include/linux/swapfile.h
@@ -10,6 +10,7 @@ extern spinlock_t swap_lock;
extern struct plist_head swap_active_head;
extern struct swap_info_struct *swap_info[];
extern unsigned long generic_max_swapfile_size(void);
+extern unsigned long arch_max_swapfile_size(void);
/* Maximum swapfile size supported for the arch (not inclusive). */
extern unsigned long swapfile_maximum_size;
/* Whether swap migration entry supports storing A/D bits for the arch */
--
2.32.0
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2022-09-04 17:35 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-09-02 23:32 [linux-next:master 4318/4736] arch/x86/mm/init.c:1057:15: warning: no previous prototype for 'arch_max_swapfile_size' kernel test robot
2022-09-04 17:35 ` Peter Xu
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox