From: kernel test robot <lkp@intel.com>
To: Alexander Graf <graf@amazon.com>
Cc: llvm@lists.linux.dev, oe-kbuild-all@lists.linux.dev,
kvm-ppc@vger.kernel.org
Subject: [agraf-2.6:kexec-cma 2/2] kernel/kexec_file.c:661:45: warning: format specifies type 'int' but the argument has type 'unsigned long'
Date: Sat, 10 May 2025 21:59:14 +0800 [thread overview]
Message-ID: <202505102142.kLGAquhf-lkp@intel.com> (raw)
tree: https://github.com/agraf/linux-2.6.git kexec-cma
head: 752619bbe38c535612b1a9e5b47ea7d962c63449
commit: 752619bbe38c535612b1a9e5b47ea7d962c63449 [2/2] XXX
config: x86_64-buildonly-randconfig-001-20250510 (https://download.01.org/0day-ci/archive/20250510/202505102142.kLGAquhf-lkp@intel.com/config)
compiler: clang version 20.1.2 (https://github.com/llvm/llvm-project 58df0ef89dd64126512e4ee27b4ac3fd8ddf6247)
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20250510/202505102142.kLGAquhf-lkp@intel.com/reproduce)
If you fix the issue in a separate patch/commit (i.e. not just a new version of
the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <lkp@intel.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202505102142.kLGAquhf-lkp@intel.com/
All warnings (new ones prefixed by >>):
>> kernel/kexec_file.c:661:45: warning: format specifies type 'int' but the argument has type 'unsigned long' [-Wformat]
661 | pr_warn("Allocated %d pages DMA memory\n", kbuf->memsz >> PAGE_SHIFT);
| ~~ ^~~~~~~~~~~~~~~~~~~~~~~~~
| %lu
include/linux/printk.h:560:37: note: expanded from macro 'pr_warn'
560 | printk(KERN_WARNING pr_fmt(fmt), ##__VA_ARGS__)
| ~~~ ^~~~~~~~~~~
include/linux/printk.h:507:60: note: expanded from macro 'printk'
507 | #define printk(fmt, ...) printk_index_wrap(_printk, fmt, ##__VA_ARGS__)
| ~~~ ^~~~~~~~~~~
include/linux/printk.h:479:19: note: expanded from macro 'printk_index_wrap'
479 | _p_func(_fmt, ##__VA_ARGS__); \
| ~~~~ ^~~~~~~~~~~
1 warning generated.
vim +661 kernel/kexec_file.c
635
636 static int kexec_alloc_contig(struct kexec_buf *kbuf)
637 {
638 struct page *p;
639 unsigned long mem;
640 u32 i;
641
642 p = dma_alloc_from_contiguous(NULL, kbuf->memsz >> PAGE_SHIFT,
643 get_order(kbuf->buf_align), true);
644
645 if (!p)
646 return -EADDRNOTAVAIL;
647
648 /* Add the relevant pages to our dest_pages list so we find them later */
649 for (i = 0; i < kbuf->memsz >> PAGE_SHIFT; i++)
650 list_add(&p[i].lru, &kbuf->image->dest_pages);
651
652 mem = page_to_boot_pfn(p) << PAGE_SHIFT;
653
654 if (kimage_is_destination_range(kbuf->image, mem, mem + kbuf->memsz)) {
655 /* Our region is already in use by a statically defined one. Bail out. */
656 pr_warn("kexec: CMA overlaps existing mem: 0x%lx+0x%lx\n", mem, kbuf->memsz);
657 return -EADDRNOTAVAIL;
658 }
659
660 kbuf->mem = page_to_boot_pfn(p) << PAGE_SHIFT;
> 661 pr_warn("Allocated %d pages DMA memory\n", kbuf->memsz >> PAGE_SHIFT);
662
663 return 0;
664 }
665
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
reply other threads:[~2025-05-10 13:59 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=202505102142.kLGAquhf-lkp@intel.com \
--to=lkp@intel.com \
--cc=graf@amazon.com \
--cc=kvm-ppc@vger.kernel.org \
--cc=llvm@lists.linux.dev \
--cc=oe-kbuild-all@lists.linux.dev \
/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