Re: [PATCH v4] mm: Create the new vm_fault_t type

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

 



Hi Souptick,

Thank you for the patch! Perhaps something to improve:

[auto build test WARNING on linus/master]
[also build test WARNING on v5.0-rc1 next-20190109]
[if your patch is applied to the wrong git tree, please drop us a note to help improve the system]

url:    https://github.com/0day-ci/linux/commits/Souptick-Joarder/mm-Create-the-new-vm_fault_t-type/20190109-154216
config: x86_64-allmodconfig (attached as .config)
compiler: gcc-7 (Debian 7.3.0-1) 7.3.0
reproduce:
        # save the attached .config to linux build tree
        make ARCH=x86_64 

All warnings (new ones prefixed by >>):

>> kernel/memremap.c:46:34: warning: incorrect type in return expression (different base types)
   kernel/memremap.c:46:34:    expected restricted vm_fault_t
   kernel/memremap.c:46:34:    got int

vim +46 kernel/memremap.c

9476df7d Dan Williams     2016-01-15  19  
5042db43 Jérôme Glisse    2017-09-08  20  #if IS_ENABLED(CONFIG_DEVICE_PRIVATE)
2b740303 Souptick Joarder 2018-08-23  21  vm_fault_t device_private_entry_fault(struct vm_area_struct *vma,
5042db43 Jérôme Glisse    2017-09-08  22  		       unsigned long addr,
5042db43 Jérôme Glisse    2017-09-08  23  		       swp_entry_t entry,
5042db43 Jérôme Glisse    2017-09-08  24  		       unsigned int flags,
5042db43 Jérôme Glisse    2017-09-08  25  		       pmd_t *pmdp)
5042db43 Jérôme Glisse    2017-09-08  26  {
5042db43 Jérôme Glisse    2017-09-08  27  	struct page *page = device_private_entry_to_page(entry);
063a7d1d Dan Williams     2018-12-28  28  	struct hmm_devmem *devmem;
063a7d1d Dan Williams     2018-12-28  29  
063a7d1d Dan Williams     2018-12-28  30  	devmem = container_of(page->pgmap, typeof(*devmem), pagemap);
5042db43 Jérôme Glisse    2017-09-08  31  
5042db43 Jérôme Glisse    2017-09-08  32  	/*
5042db43 Jérôme Glisse    2017-09-08  33  	 * The page_fault() callback must migrate page back to system memory
5042db43 Jérôme Glisse    2017-09-08  34  	 * so that CPU can access it. This might fail for various reasons
5042db43 Jérôme Glisse    2017-09-08  35  	 * (device issue, device was unsafely unplugged, ...). When such
5042db43 Jérôme Glisse    2017-09-08  36  	 * error conditions happen, the callback must return VM_FAULT_SIGBUS.
5042db43 Jérôme Glisse    2017-09-08  37  	 *
5042db43 Jérôme Glisse    2017-09-08  38  	 * Note that because memory cgroup charges are accounted to the device
5042db43 Jérôme Glisse    2017-09-08  39  	 * memory, this should never fail because of memory restrictions (but
5042db43 Jérôme Glisse    2017-09-08  40  	 * allocation of regular system page might still fail because we are
5042db43 Jérôme Glisse    2017-09-08  41  	 * out of memory).
5042db43 Jérôme Glisse    2017-09-08  42  	 *
5042db43 Jérôme Glisse    2017-09-08  43  	 * There is a more in-depth description of what that callback can and
5042db43 Jérôme Glisse    2017-09-08  44  	 * cannot do, in include/linux/memremap.h
5042db43 Jérôme Glisse    2017-09-08  45  	 */
063a7d1d Dan Williams     2018-12-28 @46  	return devmem->page_fault(vma, addr, page, flags, pmdp);
5042db43 Jérôme Glisse    2017-09-08  47  }
5042db43 Jérôme Glisse    2017-09-08  48  EXPORT_SYMBOL(device_private_entry_fault);
5042db43 Jérôme Glisse    2017-09-08  49  #endif /* CONFIG_DEVICE_PRIVATE */
5042db43 Jérôme Glisse    2017-09-08  50  

:::::: The code at line 46 was first introduced by commit
:::::: 063a7d1d3623db31ca5d2309cab6030ebf93b72f mm/hmm: fix memremap.h, move dev_page_fault_t callback to hmm

:::::: TO: Dan Williams <dan.j.williams@xxxxxxxxx>
:::::: 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: application/gzip


[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Bugtraq]     [Linux OMAP]     [Linux MIPS]     [eCos]     [Asterisk Internet PBX]     [Linux API]

  Powered by Linux