summaryrefslogtreecommitdiffstats
path: root/common
diff options
context:
space:
mode:
authorUlrich Ölmann <u.oelmann@pengutronix.de>2019-02-08 08:15:20 +0100
committerSascha Hauer <s.hauer@pengutronix.de>2019-02-11 09:12:36 +0100
commitb34b27edaea649b22d17c9be8d8d9f0b0b077471 (patch)
tree7a1a1cc26f1abeb5bb8e54fc551dfde38f82e16d /common
parent6e3b4ec9480c6dc375846a4caa1cd18a99a9d29e (diff)
downloadbarebox-b34b27edaea649b22d17c9be8d8d9f0b0b077471.tar.gz
common: state: fix compiler warnings about wrong type conversion in messages
To harmonize the common codebase this ports the remaining hunks of the following dt-utils commit, as the residual hunks have independently already been done before in barebox commit 1afbf6b5680e ("state: fix compile warnings for dev_err expansion"): | commit 9f1db73234b40f4ea071421e8179065df16211ec | Author: Philipp Rosenberger <p.rosenberger@linutronix.de> | Date: Thu Oct 18 09:17:23 2018 +0200 | | Fix compiler warnings about wrong type conversion in messages. | | These warning were observed with gcc-6.3 on x86-64. | | Signed-off-by: Philipp Rosenberger <p.rosenberger@linutronix.de> | Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de> Signed-off-by: Ulrich Ölmann <u.oelmann@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Diffstat (limited to 'common')
-rw-r--r--common/state/backend_bucket_circular.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/common/state/backend_bucket_circular.c b/common/state/backend_bucket_circular.c
index 4b71d87..5a85650 100644
--- a/common/state/backend_bucket_circular.c
+++ b/common/state/backend_bucket_circular.c
@@ -165,13 +165,13 @@ static int state_mtd_peb_read(struct state_backend_storage_bucket_circular *circ
return ret;
}
- dev_dbg(circ->dev, "Read state from %ld length %zd\n", offset,
+ dev_dbg(circ->dev, "Read state from %ld length %d\n", offset,
len);
ret = read_full(circ->fd, buf, len);
if (ret < 0) {
- dev_err(circ->dev, "Failed to read circular storage len %zd, %d\n",
+ dev_err(circ->dev, "Failed to read circular storage len %d, %d\n",
len, ret);
free(buf);
}
@@ -196,7 +196,7 @@ static int state_mtd_peb_write(struct state_backend_storage_bucket_circular *cir
ret = write_full(circ->fd, buf, len);
if (ret < 0) {
- dev_err(circ->dev, "Failed to write circular to %ld length %zd, %d\n",
+ dev_err(circ->dev, "Failed to write circular to %ld length %d, %d\n",
offset, len, ret);
return ret;
}
@@ -207,7 +207,7 @@ static int state_mtd_peb_write(struct state_backend_storage_bucket_circular *cir
*/
flush(circ->fd);
- dev_dbg(circ->dev, "Written state to offset %ld length %zd data length %zd\n",
+ dev_dbg(circ->dev, "Written state to offset %ld length %d data length %d\n",
offset, len, len);
return 0;
@@ -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: %zd, writesize: %zd, length: %zd, available: %zd\n",
+ dev_err(circ->dev, "Error, state data too big to be written, to write: %d, 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 %ld length %zd, %d\n",
+ dev_err(circ->dev, "Failed to write circular to %ld length %d, %d\n",
offset, written_length, ret);
goto out_free;
}
- dev_dbg(circ->dev, "Written state to PEB %u offset %ld length %zd data length %zd\n",
+ dev_dbg(circ->dev, "Written state to PEB %u offset %ld length %d data length %zd\n",
circ->eraseblock, offset, written_length, len);
out_free: