From: kernel test robot <lkp@intel.com>
To: Dan Williams <dan.j.williams@intel.com>
Cc: kbuild-all@lists.01.org, linux-kernel@vger.kernel.org
Subject: [djbw-nvdimm:libnvdimm-pending 12/16] drivers/dax/mapping.c:345:15: warning: assignment to 'struct dev_pagemap *' from 'int' makes pointer from integer without a cast
Date: Sat, 3 Sep 2022 08:12:48 +0800 [thread overview]
Message-ID: <202209030805.hxvdDbvK-lkp@intel.com> (raw)
Hi Dan,
FYI, the error/warning was bisected to this commit, please ignore it if it's irrelevant.
tree: https://git.kernel.org/pub/scm/linux/kernel/git/djbw/nvdimm.git libnvdimm-pending
head: ac9d6b3ba0a537b67bdc8e525308dc371da91e1b
commit: fd2e18c05d353b59283b4cb5508bafecd766b304 [12/16] devdax: Move address_space helpers to the DAX core
config: s390-allyesconfig (https://download.01.org/0day-ci/archive/20220903/202209030805.hxvdDbvK-lkp@intel.com/config)
compiler: s390-linux-gcc (GCC) 12.1.0
reproduce (this is a W=1 build):
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# https://git.kernel.org/pub/scm/linux/kernel/git/djbw/nvdimm.git/commit/?id=fd2e18c05d353b59283b4cb5508bafecd766b304
git remote add djbw-nvdimm https://git.kernel.org/pub/scm/linux/kernel/git/djbw/nvdimm.git
git fetch --no-tags djbw-nvdimm libnvdimm-pending
git checkout fd2e18c05d353b59283b4cb5508bafecd766b304
# save the config file
mkdir build_dir && cp config build_dir/.config
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-12.1.0 make.cross W=1 O=build_dir ARCH=s390 SHELL=/bin/bash drivers/dax/
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 >>):
drivers/dax/mapping.c: In function 'dax_associate_entry':
drivers/dax/mapping.c:345:17: error: implicit declaration of function 'get_dev_pagemap_many'; did you mean 'put_dev_pagemap_many'? [-Werror=implicit-function-declaration]
345 | pgmap = get_dev_pagemap_many(pfn, NULL, PHYS_PFN(size));
| ^~~~~~~~~~~~~~~~~~~~
| put_dev_pagemap_many
>> drivers/dax/mapping.c:345:15: warning: assignment to 'struct dev_pagemap *' from 'int' makes pointer from integer without a cast [-Wint-conversion]
345 | pgmap = get_dev_pagemap_many(pfn, NULL, PHYS_PFN(size));
| ^
cc1: some warnings being treated as errors
vim +345 drivers/dax/mapping.c
324
325 /*
326 * When it is called in dax_insert_entry(), the cow flag will indicate that
327 * whether this entry is shared by multiple files. If so, set the page->mapping
328 * FS_DAX_MAPPING_COW, and use page->index as refcount.
329 */
330 static vm_fault_t dax_associate_entry(void *entry,
331 struct address_space *mapping,
332 struct vm_fault *vmf, unsigned long flags)
333 {
334 unsigned long size = dax_entry_size(entry), pfn, index;
335 struct dev_pagemap *pgmap;
336 int i = 0;
337
338 if (IS_ENABLED(CONFIG_FS_DAX_LIMITED))
339 return 0;
340
341 if (!size)
342 return 0;
343
344 pfn = dax_to_pfn(entry);
> 345 pgmap = get_dev_pagemap_many(pfn, NULL, PHYS_PFN(size));
346 if (!pgmap)
347 return VM_FAULT_SIGBUS;
348
349 index = linear_page_index(vmf->vma, ALIGN(vmf->address, size));
350 for_each_mapped_pfn(entry, pfn) {
351 struct page *page = pfn_to_page(pfn);
352
353 if (flags & DAX_COW) {
354 dax_mapping_set_cow(page);
355 } else {
356 WARN_ON_ONCE(page->mapping);
357 page->mapping = mapping;
358 page->index = index + i++;
359 }
360 }
361
362 return 0;
363 }
364
--
0-DAY CI Kernel Test Service
https://01.org/lkp
reply other threads:[~2022-09-03 0:14 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=202209030805.hxvdDbvK-lkp@intel.com \
--to=lkp@intel.com \
--cc=dan.j.williams@intel.com \
--cc=kbuild-all@lists.01.org \
--cc=linux-kernel@vger.kernel.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox