From ed86bd67ef9bda914c99c6ee939de836eff1dc10 Mon Sep 17 00:00:00 2001 From: Ulrich Ölmann Date: Fri, 8 Feb 2019 08:15:22 +0100 Subject: common: state: fix formatting of "uint32_t" variables MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit To harmonize the common codebase this ports the following dt-utils commit: | commit 5588a6c32d54bc4a1ef0b9f72807c46dd00bc20e | Author: Ulrich Ölmann | Date: Sun Feb 3 22:48:07 2019 +0100 | | state: fix formatting of "uint32_t" variables | | The format specifier "%zd" is for "size_t" typed variables and produces a | warning with gcc, so use "%u" instead. | | Signed-off-by: Ulrich Ölmann | Signed-off-by: Roland Hieber Signed-off-by: Ulrich Ölmann Signed-off-by: Sascha Hauer --- common/state/backend_bucket_circular.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'common/state') diff --git a/common/state/backend_bucket_circular.c b/common/state/backend_bucket_circular.c index ae15fa2529..059a531aa4 100644 --- a/common/state/backend_bucket_circular.c +++ b/common/state/backend_bucket_circular.c @@ -298,7 +298,7 @@ static int state_backend_bucket_circular_write(struct state_backend_storage_buck void *write_buf; if (written_length > circ->max_size) { - dev_err(circ->dev, "Error, state data too big to be written, to write: %d, writesize: %zd, length: %zd, available: %zd\n", + dev_err(circ->dev, "Error, state data too big to be written, to write: %u, writesize: %zd, length: %zd, available: %zd\n", written_length, circ->writesize, len, circ->max_size); return -E2BIG; } @@ -345,12 +345,12 @@ static int state_backend_bucket_circular_write(struct state_backend_storage_buck ret = state_mtd_peb_write(circ, write_buf, offset, written_length); if (ret < 0 && ret != -EUCLEAN) { - dev_err(circ->dev, "Failed to write circular to %lld length %d, %d\n", + dev_err(circ->dev, "Failed to write circular to %lld length %u, %d\n", (long long) offset, written_length, ret); goto out_free; } - dev_dbg(circ->dev, "Written state to PEB %u offset %lld length %d data length %zd\n", + dev_dbg(circ->dev, "Written state to PEB %u offset %lld length %u data length %zd\n", circ->eraseblock, (long long) offset, written_length, len); out_free: -- cgit v1.2.3