[PATCH 1/7] common: state: fix compiler warnings about wrong type conversion in messages

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxxxxxx>
| 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@xxxxxxxxxxxxx>
|     Signed-off-by: Sascha Hauer <s.hauer@xxxxxxxxxxxxxx>

Signed-off-by: Ulrich Ölmann <u.oelmann@xxxxxxxxxxxxxx>
---
 common/state/backend_bucket_circular.c | 14 +++++++-------
 1 file changed, 7 insertions(+), 7 deletions(-)

diff --git a/common/state/backend_bucket_circular.c b/common/state/backend_bucket_circular.c
index 4b71d8751da6..5a85650f4004 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:
-- 
2.20.1


_______________________________________________
barebox mailing list
barebox@xxxxxxxxxxxxxxxxxxx
http://lists.infradead.org/mailman/listinfo/barebox




[Index of Archives]     [Linux Embedded]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux