cxl: Fix emit of type resource_size_t argument for validate_region_offset()
Dave Jiang
maintainerPATCH 1/1 cxl: Fix emit of type resource_size_t argument for validate_region_offset()
0day reported warnings of:drivers/cxl/core/region.c:3664:25: warning: format '%llx' expects argument of type 'long long unsigned int', but argument 4 has type 'resource_size_t' {aka 'unsigned int'} [-Wformat=]
drivers/cxl/core/region.c:3671:37: warning: format '%llx' expects argument of type 'long long unsigned int', but argument 4 has type 'resource_size_t' {aka 'unsigned int'} [-Wformat=]
Replace %#llx with %pr to emit resource_size_t arguments.
--- drivers/cxl/core/region.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-)
drivers/cxl/core/region.c +4 -4
@@ -3660,15 +3660,15 @@ static int validate_region_offset(struct cxl_region *cxlr, u64 offset)if (offset < p->cache_size) {dev_err (&cxlr->dev, -"Offset %#llx is within extended linear cache %#llx\n" , - offset, p->cache_size); +"Offset %#llx is within extended linear cache %pr\n" , + offset, &p->cache_size);return -EINVAL ; } region_size =resource_size (p->res);if (offset >= region_size) { -dev_err (&cxlr->dev,"Offset %#llx exceeds region size %#llx\n" , - offset, region_size); +dev_err (&cxlr->dev,"Offset %#llx exceeds region size %pr\n" , + offset, ®ion_size);return -EINVAL ; }
base-commit: d9412f08e25a5b66f9021739c090cc9b8f1089b1
Signature · 1 line
2.50.1
Quoted 6 lines · Dave Jiang
0day reported warnings of:
drivers/cxl/core/region.c:3664:25: warning: format '%llx' expects argument of type 'long long unsigned int', but argument 4 has type 'resource_size_t' {aka 'unsigned int'} [-Wformat=]
drivers/cxl/core/region.c:3671:37: warning: format '%llx' expects argument of type 'long long unsigned int', but argument 4 has type 'resource_size_t' {aka 'unsigned int'} [-Wformat=]Replace %#llx with %pr to emit
resource_size_targuments.
Quoted 6 lines
Reported-by kernel test robot <[email protected]>Cc Alison Schofield <[email protected]>Signed-off-by Dave Jiang <[email protected]>---
Quoted 11 lines · Dave Jiang
0day reported warnings of:
drivers/cxl/core/region.c:3664:25: warning: format '%llx' expects argument of type 'long long unsigned int', but argument 4 has type 'resource_size_t' {aka 'unsigned int'} [-Wformat=]
drivers/cxl/core/region.c:3671:37: warning: format '%llx' expects argument of type 'long long unsigned int', but argument 4 has type 'resource_size_t' {aka 'unsigned int'} [-Wformat=]Replace %#llx with %pr to emit
resource_size_targuments.Reported-by kernel test robot <[email protected]>Cc Alison Schofield <[email protected]>Signed-off-by Dave Jiang <[email protected]>
Applied to nexte6a9530b3ee7407b70b60e4df70688db0d239e1a
Quoted 30 lines
--- drivers/cxl/core/region.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-)drivers/cxl/core/region.c +4
-4@@ -3660,15 +3660,15 @@ static int validate_region_offset(struct cxl_region *cxlr, u64 offset)if (offset < p->cache_size) {dev_err (&cxlr->dev, -"Offset %#llx is within extended linear cache %#llx\n" , - offset, p->cache_size); +"Offset %#llx is within extended linear cache %pr\n" , + offset, &p->cache_size);return -EINVAL ; } region_size =resource_size (p->res);if (offset >= region_size) { -dev_err (&cxlr->dev,"Offset %#llx exceeds region size %#llx\n" , - offset, region_size); +dev_err (&cxlr->dev,"Offset %#llx exceeds region size %pr\n" , + offset, ®ion_size);return -EINVAL ; }base-commit:
d9412f08e25a5b66f9021739c090cc9b8f1089b1