From d83b0684e15113d6053ba2dfdcac903d7038f707 Mon Sep 17 00:00:00 2001 From: Carlos Llamas Date: Thu, 15 Apr 2021 01:09:02 +0000 Subject: [PATCH] ANDROID: Incremental fs: fix minor printk format warning MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Use the correct printk specifier [%zu] for size_t variable. This fixes the following warning: fs/incfs/format.c: In function ‘incfs_read_next_metadata_record’: ./include/linux/kern_levels.h:5:18: warning: format ‘%ld’ expects argument of type ‘long int’, but argument 2 has type ‘size_t’ {aka ‘unsigned int’} [-Wformat=] fs/incfs/format.c:669:3: note: in expansion of macro ‘pr_warn’ 669 | pr_warn("incfs: The record is too large. Size: %ld", | ^~~~~~~ Bug: 183339614 Fixes: c6819dd77861 (ANDROID: Initial commit of Incremental FS) Reported-by: kernelci.org bot Signed-off-by: Carlos Llamas Change-Id: Ia784a9ced9fb6bc76e2f1baa495b3ccf568e3b1d --- fs/incfs/format.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fs/incfs/format.c b/fs/incfs/format.c index ebd7f343a27b..6ffcf334f105 100644 --- a/fs/incfs/format.c +++ b/fs/incfs/format.c @@ -666,7 +666,7 @@ int incfs_read_next_metadata_record(struct backing_file_context *bfc, md_record_size = le16_to_cpu(md_hdr->h_record_size); if (md_record_size > max_md_size) { - pr_warn("incfs: The record is too large. Size: %ld", + pr_warn("incfs: The record is too large. Size: %zu", md_record_size); return -EBADMSG; }