Linux CXL
 help / color / mirror / Atom feed
* [PATCH vv2] cxl: Fix warning from emitting resource_size_t as long long int on 32bit systems
@ 2025-02-28 20:47 Dave Jiang
  2025-02-28 20:58 ` Alison Schofield
  2025-02-28 21:43 ` Dave Jiang
  0 siblings, 2 replies; 3+ messages in thread
From: Dave Jiang @ 2025-02-28 20:47 UTC (permalink / raw)
  To: linux-cxl; +Cc: kernel test robot

Reported by kernel test bot from an ARM build:
drivers/cxl/core/region.c:3263:26: warning: format '%lld' expects argument of type 'long long int', but argument 3 has type 'resource_size_t' {aka 'unsigned int'} [-Wformat=]

On a 32bit system, resource_size_t is defined as 32bit long vs on a 64bit
system it is defined as 64bit long. Use %pa format to deal with resource_size_t.

Reported-by: kernel test robot <lkp@intel.com>
Closes: https://lore.kernel.org/oe-kbuild-all/202503010252.mIDhZ5kY-lkp@intel.com/
Fixes: 0ec9849b6333 ("acpi/hmat / cxl: Add extended linear cache support for CXL")
Signed-off-by: Dave Jiang <dave.jiang@intel.com>
---
v2:
- Fix commit log spelling errors. (Alison)
- Use %pa to deal with type resource_size_t. (Alison)
---
 drivers/cxl/core/region.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/cxl/core/region.c b/drivers/cxl/core/region.c
index a83301f24fa2..8537b6a9ca18 100644
--- a/drivers/cxl/core/region.c
+++ b/drivers/cxl/core/region.c
@@ -3251,8 +3251,8 @@ static int cxl_extended_linear_cache_resize(struct cxl_region *cxlr,
 
 	if (size != cache_size) {
 		dev_warn(&cxlr->dev,
-			 "Extended Linear Cache size %lld != CXL size %lld. No Support!",
-			 cache_size, size);
+			 "Extended Linear Cache size %pa != CXL size %pa. No Support!",
+			 &cache_size, &size);
 		return -EOPNOTSUPP;
 	}
 
-- 
2.48.1


^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2025-02-28 21:43 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-02-28 20:47 [PATCH vv2] cxl: Fix warning from emitting resource_size_t as long long int on 32bit systems Dave Jiang
2025-02-28 20:58 ` Alison Schofield
2025-02-28 21:43 ` Dave Jiang

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox