Skip to contentSkip to conversation

media: atomisp: fix compiler warning

PATCH New Tong Zhang 1 participant 1 message Feb 10, 2021

Subsystems (4)
lore
Share & tools
lore

Tong Zhang

author
#0 lore raw

PATCH 1/1 media: atomisp: fix compiler warning

should use %zu for size_t type, otherwise compiler will complain
drivers/staging/media/atomisp/pci/hmm/hmm.c:272:3: warning: format ‘%ld’ expects argument of type ‘long int’, but argument 6 has type ‘size_t’ {aka ‘unsigned int’} [-Wformat=]

  272 |   "%s: pages: 0x%08x (%ld bytes), type: %d from highmem %d, user ptr %p, cached %d\n",
      |   ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
---
 drivers/staging/media/atomisp/pci/hmm/hmm.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/staging/media/atomisp/pci/hmm/hmm.c +1 -1
index e0eaff0f8a22..6a5ee4607089 100644
@@ -269,7 +269,7 @@ ia_css_ptr hmm_alloc(size_t bytes, enum hmm_bo_type type,
 		hmm_set(bo->start, 0, bytes);
 
 	dev_dbg(atomisp_dev,
-		"%s: pages: 0x%08x (%ld bytes), type: %d from highmem %d, user ptr %p, cached %d\n",
+		"%s: pages: 0x%08x (%zu bytes), type: %d from highmem %d, user ptr %p, cached %d\n",
 		__func__, bo->start, bytes, type, from_highmem, userptr, cached);
 
 	return bo->start;
Signature · 1 line
2.25.1