[vfs:test.pages 49/51] mm/page_alloc.c:3505:26: warning: passing argument 1 of 'make_alloc_exact' makes pointer from integer without a cast

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



tree:   https://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs.git test.pages
head:   573a06a07d2b19f7a173fcd0de179eba85795a58
commit: d7d4dc2a44e366267afa353037d767b15e2b83e0 [49/51] get rid of casts in alloc_exact stuff
config: i386-randconfig-s1-201551 (attached as .config)
reproduce:
        git checkout d7d4dc2a44e366267afa353037d767b15e2b83e0
        # save the attached .config to linux build tree
        make ARCH=i386 

All warnings (new ones prefixed by >>):

   mm/page_alloc.c: In function 'alloc_pages_exact_nid':
>> mm/page_alloc.c:3505:26: warning: passing argument 1 of 'make_alloc_exact' makes pointer from integer without a cast [-Wint-conversion]
     return make_alloc_exact((unsigned long)page_address(p), order, size);
                             ^
   mm/page_alloc.c:3452:14: note: expected 'void *' but argument is of type 'long unsigned int'
    static void *make_alloc_exact(void *addr, unsigned int order,
                 ^

vim +/make_alloc_exact +3505 mm/page_alloc.c

ee85c2e14 Andi Kleen         2011-05-11  3489  /**
ee85c2e14 Andi Kleen         2011-05-11  3490   * alloc_pages_exact_nid - allocate an exact number of physically-contiguous
ee85c2e14 Andi Kleen         2011-05-11  3491   *			   pages on a node.
b5e6ab589 Randy Dunlap       2011-05-16  3492   * @nid: the preferred node ID where memory should be allocated
ee85c2e14 Andi Kleen         2011-05-11  3493   * @size: the number of bytes to allocate
ee85c2e14 Andi Kleen         2011-05-11  3494   * @gfp_mask: GFP flags for the allocation
ee85c2e14 Andi Kleen         2011-05-11  3495   *
ee85c2e14 Andi Kleen         2011-05-11  3496   * Like alloc_pages_exact(), but try to allocate on node nid first before falling
ee85c2e14 Andi Kleen         2011-05-11  3497   * back.
ee85c2e14 Andi Kleen         2011-05-11  3498   */
e19318116 Fabian Frederick   2014-08-06  3499  void * __meminit alloc_pages_exact_nid(int nid, size_t size, gfp_t gfp_mask)
ee85c2e14 Andi Kleen         2011-05-11  3500  {
d00181b96 Kirill A. Shutemov 2015-11-06  3501  	unsigned int order = get_order(size);
ee85c2e14 Andi Kleen         2011-05-11  3502  	struct page *p = alloc_pages_node(nid, gfp_mask, order);
ee85c2e14 Andi Kleen         2011-05-11  3503  	if (!p)
ee85c2e14 Andi Kleen         2011-05-11  3504  		return NULL;
ee85c2e14 Andi Kleen         2011-05-11 @3505  	return make_alloc_exact((unsigned long)page_address(p), order, size);
2be0ffe2b Timur Tabi         2008-07-23  3506  }
2be0ffe2b Timur Tabi         2008-07-23  3507  
2be0ffe2b Timur Tabi         2008-07-23  3508  /**
2be0ffe2b Timur Tabi         2008-07-23  3509   * free_pages_exact - release memory allocated via alloc_pages_exact()
2be0ffe2b Timur Tabi         2008-07-23  3510   * @virt: the value returned by alloc_pages_exact.
2be0ffe2b Timur Tabi         2008-07-23  3511   * @size: size of allocation, same value as passed to alloc_pages_exact().
2be0ffe2b Timur Tabi         2008-07-23  3512   *
2be0ffe2b Timur Tabi         2008-07-23  3513   * Release the memory allocated by a previous call to alloc_pages_exact.

:::::: The code at line 3505 was first introduced by commit
:::::: ee85c2e1454603ebb9f8d87223ac79dcdc87fa32 mm: add alloc_pages_exact_nid()

:::::: TO: Andi Kleen <ak@xxxxxxxxxxxxxxx>
:::::: CC: Linus Torvalds <torvalds@xxxxxxxxxxxxxxxxxxxx>

---
0-DAY kernel test infrastructure                Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all                   Intel Corporation

Attachment: .config.gz
Description: Binary data


[Index of Archives]     [Linux Ext4 Filesystem]     [Union Filesystem]     [Filesystem Testing]     [Ceph Users]     [Ecryptfs]     [AutoFS]     [Kernel Newbies]     [Share Photos]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux Cachefs]     [Reiser Filesystem]     [Linux RAID]     [Samba]     [Device Mapper]     [CEPH Development]
  Powered by Linux