From: kernel test robot <lkp@intel.com>
To: Alison Schofield <alison.schofield@intel.com>
Cc: oe-kbuild-all@lists.linux.dev,
Linux Memory Management List <linux-mm@kvack.org>,
Dan Williams <dan.j.williams@intel.com>,
Dave Jiang <dave.jiang@intel.com>,
Vishal Verma <vishal.l.verma@intel.com>,
Fan Ni <fan.ni@samsung.com>
Subject: [linux-next:master 10859/12059] drivers/cxl/core/region.c:556:25: warning: format '%llx' expects argument of type 'long long unsigned int', but argument 5 has type 'resource_size_t' {aka 'unsigned int'}
Date: Tue, 2 Jan 2024 22:56:32 +0800 [thread overview]
Message-ID: <202401022246.En9oIBzU-lkp@intel.com> (raw)
tree: https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git master
head: ab0b3e6ef50d305278b1971891cf1d82ab050b35
commit: 7984d22f1315bf30433e11e5010e4ce09ca22037 [10859/12059] cxl/region: Add dev_dbg() detail on failure to allocate HPA space
config: riscv-randconfig-r022-20221204 (https://download.01.org/0day-ci/archive/20240102/202401022246.En9oIBzU-lkp@intel.com/config)
compiler: riscv32-linux-gcc (GCC) 13.2.0
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20240102/202401022246.En9oIBzU-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/202401022246.En9oIBzU-lkp@intel.com/
All warnings (new ones prefixed by >>):
In file included from include/linux/printk.h:564,
from include/asm-generic/bug.h:22,
from arch/riscv/include/asm/bug.h:83,
from include/linux/bug.h:5,
from include/linux/memregion.h:7,
from drivers/cxl/core/region.c:3:
drivers/cxl/core/region.c: In function 'alloc_hpa':
>> drivers/cxl/core/region.c:556:25: warning: format '%llx' expects argument of type 'long long unsigned int', but argument 5 has type 'resource_size_t' {aka 'unsigned int'} [-Wformat=]
556 | "HPA allocation error (%ld) for size:%#llx in %s %pr\n",
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
include/linux/dynamic_debug.h:224:29: note: in definition of macro '__dynamic_func_call_cls'
224 | func(&id, ##__VA_ARGS__); \
| ^~~~~~~~~~~
include/linux/dynamic_debug.h:250:9: note: in expansion of macro '_dynamic_func_call_cls'
250 | _dynamic_func_call_cls(_DPRINTK_CLASS_DFLT, fmt, func, ##__VA_ARGS__)
| ^~~~~~~~~~~~~~~~~~~~~~
include/linux/dynamic_debug.h:273:9: note: in expansion of macro '_dynamic_func_call'
273 | _dynamic_func_call(fmt, __dynamic_dev_dbg, \
| ^~~~~~~~~~~~~~~~~~
include/linux/dev_printk.h:155:9: note: in expansion of macro 'dynamic_dev_dbg'
155 | dynamic_dev_dbg(dev, dev_fmt(fmt), ##__VA_ARGS__)
| ^~~~~~~~~~~~~~~
include/linux/dev_printk.h:155:30: note: in expansion of macro 'dev_fmt'
155 | dynamic_dev_dbg(dev, dev_fmt(fmt), ##__VA_ARGS__)
| ^~~~~~~
drivers/cxl/core/region.c:555:17: note: in expansion of macro 'dev_dbg'
555 | dev_dbg(&cxlr->dev,
| ^~~~~~~
drivers/cxl/core/region.c:556:66: note: format string is defined here
556 | "HPA allocation error (%ld) for size:%#llx in %s %pr\n",
| ~~~~^
| |
| long long unsigned int
| %#x
vim +556 drivers/cxl/core/region.c
522
523 static int alloc_hpa(struct cxl_region *cxlr, resource_size_t size)
524 {
525 struct cxl_root_decoder *cxlrd = to_cxl_root_decoder(cxlr->dev.parent);
526 struct cxl_region_params *p = &cxlr->params;
527 struct resource *res;
528 u32 remainder = 0;
529
530 lockdep_assert_held_write(&cxl_region_rwsem);
531
532 /* Nothing to do... */
533 if (p->res && resource_size(p->res) == size)
534 return 0;
535
536 /* To change size the old size must be freed first */
537 if (p->res)
538 return -EBUSY;
539
540 if (p->state >= CXL_CONFIG_INTERLEAVE_ACTIVE)
541 return -EBUSY;
542
543 /* ways, granularity and uuid (if PMEM) need to be set before HPA */
544 if (!p->interleave_ways || !p->interleave_granularity ||
545 (cxlr->mode == CXL_DECODER_PMEM && uuid_is_null(&p->uuid)))
546 return -ENXIO;
547
548 div_u64_rem(size, SZ_256M * p->interleave_ways, &remainder);
549 if (remainder)
550 return -EINVAL;
551
552 res = alloc_free_mem_region(cxlrd->res, size, SZ_256M,
553 dev_name(&cxlr->dev));
554 if (IS_ERR(res)) {
555 dev_dbg(&cxlr->dev,
> 556 "HPA allocation error (%ld) for size:%#llx in %s %pr\n",
557 PTR_ERR(res), size, cxlrd->res->name, cxlrd->res);
558 return PTR_ERR(res);
559 }
560
561 p->res = res;
562 p->state = CXL_CONFIG_INTERLEAVE_ACTIVE;
563
564 return 0;
565 }
566
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
reply other threads:[~2024-01-02 14:57 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=202401022246.En9oIBzU-lkp@intel.com \
--to=lkp@intel.com \
--cc=alison.schofield@intel.com \
--cc=dan.j.williams@intel.com \
--cc=dave.jiang@intel.com \
--cc=fan.ni@samsung.com \
--cc=linux-mm@kvack.org \
--cc=oe-kbuild-all@lists.linux.dev \
--cc=vishal.l.verma@intel.com \
/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