Skip to contentSkip to conversation

platform/x86/intel/pmt: fix format string in unit test

PATCH New Arnd Bergmann 1 participant 1 message Jul 9, 2025

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 platform/x86/intel/pmt: fix format string in unit test

From: Arnd Bergmann <[email protected]>

Another warning about incorrect format strings shows up in the unit test

In file included from include/kunit/assert.h:13,
from include/kunit/test.h:12,
from drivers/platform/x86/intel/pmt/discovery-kunit.c:9:
drivers/platform/x86/intel/pmt/discovery-kunit.c: In function 'validate_pmt_regions':
include/linux/kern_levels.h:5:25: error: format '%lu' expects argument of type 'long unsigned int', but argument 4 has type 'size_t' {aka 'unsigned int'} [-Werror=format=]

Fixes b9707d46a959 ("platform/x86/intel/pmt: KUNIT test for PMT Enhanced Discovery API")
---
 drivers/platform/x86/intel/pmt/discovery-kunit.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/platform/x86/intel/pmt/discovery-kunit.c +1 -1
index b4493fb96738..f44eb41d58f6 100644
@@ -32,7 +32,7 @@ validate_pmt_regions(struct kunit *test, struct pmt_feature_group *feature_group
 		kunit_info(test, "\t\tbus=%u, device=%u, function=%u, guid=0x%x,",
 			   region->plat_info.bus_number, region->plat_info.device_number,
 			   region->plat_info.function_number, region->guid);
-		kunit_info(test, "\t\taddr=%p, size=%lu, num_rmids=%u", region->addr, region->size,
+		kunit_info(test, "\t\taddr=%p, size=%zu, num_rmids=%u", region->addr, region->size,
 			   region->num_rmids);
 
 
Signature · 1 line
2.39.5