From: kernel test robot <lkp@intel.com>
To: kbuild-all@lists.01.org
Subject: [rppt-memblock:memblock_free-cleanup/v0 3/3] arch/um/kernel/mem.c:50:16: warning: passing argument 1 of 'memblock_free' makes pointer from integer without a cast
Date: Sat, 18 Sep 2021 07:19:53 +0800 [thread overview]
Message-ID: <202109180746.Jfaql6wt-lkp@intel.com> (raw)
[-- Attachment #1: Type: text/plain, Size: 3016 bytes --]
tree: git://git.kernel.org/pub/scm/linux/kernel/git/rppt/memblock.git memblock_free-cleanup/v0
head: 78a79c62f5f7e1099880e2d6caa2759747bcfded
commit: 78a79c62f5f7e1099880e2d6caa2759747bcfded [3/3] memblock: cleanup memblock_free interface
config: um-x86_64_defconfig (attached as .config)
compiler: gcc-9 (Debian 9.3.0-22) 9.3.0
reproduce (this is a W=1 build):
# https://git.kernel.org/pub/scm/linux/kernel/git/rppt/memblock.git/commit/?id=78a79c62f5f7e1099880e2d6caa2759747bcfded
git remote add rppt-memblock git://git.kernel.org/pub/scm/linux/kernel/git/rppt/memblock.git
git fetch --no-tags rppt-memblock memblock_free-cleanup/v0
git checkout 78a79c62f5f7e1099880e2d6caa2759747bcfded
# save the attached .config to linux build tree
make W=1 ARCH=um SUBARCH=x86_64
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>
All warnings (new ones prefixed by >>):
arch/um/kernel/mem.c: In function 'mem_init':
>> arch/um/kernel/mem.c:50:16: warning: passing argument 1 of 'memblock_free' makes pointer from integer without a cast [-Wint-conversion]
50 | memblock_free(brk_end, uml_reserved - brk_end);
| ^~~~~~~
| |
| long unsigned int
In file included from arch/um/kernel/mem.c:8:
include/linux/memblock.h:120:26: note: expected 'void *' but argument is of type 'long unsigned int'
120 | void memblock_free(void *ptr, size_t size);
| ~~~~~~^~~
arch/um/kernel/mem.c: At top level:
arch/um/kernel/mem.c:184:8: warning: no previous prototype for 'pgd_alloc' [-Wmissing-prototypes]
184 | pgd_t *pgd_alloc(struct mm_struct *mm)
| ^~~~~~~~~
arch/um/kernel/mem.c:197:7: warning: no previous prototype for 'uml_kmalloc' [-Wmissing-prototypes]
197 | void *uml_kmalloc(int size, int flags)
| ^~~~~~~~~~~
--
>> mm/memblock.c:821: warning: expecting prototype for memblock_free_phys(). Prototype was for memblock_phys_free() instead
vim +/memblock_free +50 arch/um/kernel/mem.c
39
40 void __init mem_init(void)
41 {
42 /* clear the zero-page */
43 memset(empty_zero_page, 0, PAGE_SIZE);
44
45 /* Map in the area just after the brk now that kmalloc is about
46 * to be turned on.
47 */
48 brk_end = (unsigned long) UML_ROUND_UP(sbrk(0));
49 map_memory(brk_end, __pa(brk_end), uml_reserved - brk_end, 1, 1, 0);
> 50 memblock_free(brk_end, uml_reserved - brk_end);
51 uml_reserved = brk_end;
52
53 /* this will put all low memory onto the freelists */
54 memblock_free_all();
55 max_low_pfn = totalram_pages();
56 max_pfn = max_low_pfn;
57 kmalloc_ok = 1;
58 }
59
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all(a)lists.01.org
[-- Attachment #2: config.gz --]
[-- Type: application/gzip, Size: 9645 bytes --]
WARNING: multiple messages have this Message-ID (diff)
From: kernel test robot <lkp@intel.com>
To: Mike Rapoport <rppt@linux.ibm.com>
Cc: kbuild-all@lists.01.org, Mike Rapoport <rppt@kernel.org>,
linux-kernel@vger.kernel.org
Subject: [rppt-memblock:memblock_free-cleanup/v0 3/3] arch/um/kernel/mem.c:50:16: warning: passing argument 1 of 'memblock_free' makes pointer from integer without a cast
Date: Sat, 18 Sep 2021 07:19:53 +0800 [thread overview]
Message-ID: <202109180746.Jfaql6wt-lkp@intel.com> (raw)
[-- Attachment #1: Type: text/plain, Size: 2948 bytes --]
tree: git://git.kernel.org/pub/scm/linux/kernel/git/rppt/memblock.git memblock_free-cleanup/v0
head: 78a79c62f5f7e1099880e2d6caa2759747bcfded
commit: 78a79c62f5f7e1099880e2d6caa2759747bcfded [3/3] memblock: cleanup memblock_free interface
config: um-x86_64_defconfig (attached as .config)
compiler: gcc-9 (Debian 9.3.0-22) 9.3.0
reproduce (this is a W=1 build):
# https://git.kernel.org/pub/scm/linux/kernel/git/rppt/memblock.git/commit/?id=78a79c62f5f7e1099880e2d6caa2759747bcfded
git remote add rppt-memblock git://git.kernel.org/pub/scm/linux/kernel/git/rppt/memblock.git
git fetch --no-tags rppt-memblock memblock_free-cleanup/v0
git checkout 78a79c62f5f7e1099880e2d6caa2759747bcfded
# save the attached .config to linux build tree
make W=1 ARCH=um SUBARCH=x86_64
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>
All warnings (new ones prefixed by >>):
arch/um/kernel/mem.c: In function 'mem_init':
>> arch/um/kernel/mem.c:50:16: warning: passing argument 1 of 'memblock_free' makes pointer from integer without a cast [-Wint-conversion]
50 | memblock_free(brk_end, uml_reserved - brk_end);
| ^~~~~~~
| |
| long unsigned int
In file included from arch/um/kernel/mem.c:8:
include/linux/memblock.h:120:26: note: expected 'void *' but argument is of type 'long unsigned int'
120 | void memblock_free(void *ptr, size_t size);
| ~~~~~~^~~
arch/um/kernel/mem.c: At top level:
arch/um/kernel/mem.c:184:8: warning: no previous prototype for 'pgd_alloc' [-Wmissing-prototypes]
184 | pgd_t *pgd_alloc(struct mm_struct *mm)
| ^~~~~~~~~
arch/um/kernel/mem.c:197:7: warning: no previous prototype for 'uml_kmalloc' [-Wmissing-prototypes]
197 | void *uml_kmalloc(int size, int flags)
| ^~~~~~~~~~~
--
>> mm/memblock.c:821: warning: expecting prototype for memblock_free_phys(). Prototype was for memblock_phys_free() instead
vim +/memblock_free +50 arch/um/kernel/mem.c
39
40 void __init mem_init(void)
41 {
42 /* clear the zero-page */
43 memset(empty_zero_page, 0, PAGE_SIZE);
44
45 /* Map in the area just after the brk now that kmalloc is about
46 * to be turned on.
47 */
48 brk_end = (unsigned long) UML_ROUND_UP(sbrk(0));
49 map_memory(brk_end, __pa(brk_end), uml_reserved - brk_end, 1, 1, 0);
> 50 memblock_free(brk_end, uml_reserved - brk_end);
51 uml_reserved = brk_end;
52
53 /* this will put all low memory onto the freelists */
54 memblock_free_all();
55 max_low_pfn = totalram_pages();
56 max_pfn = max_low_pfn;
57 kmalloc_ok = 1;
58 }
59
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
[-- Attachment #2: .config.gz --]
[-- Type: application/gzip, Size: 9645 bytes --]
next reply other threads:[~2021-09-17 23:19 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-09-17 23:19 kernel test robot [this message]
2021-09-17 23:19 ` [rppt-memblock:memblock_free-cleanup/v0 3/3] arch/um/kernel/mem.c:50:16: warning: passing argument 1 of 'memblock_free' makes pointer from integer without a cast kernel test robot
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=202109180746.Jfaql6wt-lkp@intel.com \
--to=lkp@intel.com \
--cc=kbuild-all@lists.01.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.