mail archive of the barebox mailing list
 help / color / mirror / Atom feed
From: "Ulrich Ölmann" <u.oelmann@pengutronix.de>
To: Barebox List <barebox@lists.infradead.org>
Subject: [PATCH 1/7] common: state: fix compiler warnings about wrong type conversion in messages
Date: Fri,  8 Feb 2019 08:15:20 +0100	[thread overview]
Message-ID: <20190208071526.19150-2-u.oelmann@pengutronix.de> (raw)
In-Reply-To: <20190208071526.19150-1-u.oelmann@pengutronix.de>

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>
---
 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@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

  reply	other threads:[~2019-02-08  7:15 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-02-08  7:15 [PATCH 0/7] Harmonize barebox' and dt-utils' state code Ulrich Ölmann
2019-02-08  7:15 ` Ulrich Ölmann [this message]
2019-02-08  7:15 ` [PATCH 2/7] common: state: fix formatting of "off_t" variables Ulrich Ölmann
2019-02-08  7:15 ` [PATCH 3/7] common: state: fix formatting of "uint32_t" variables Ulrich Ölmann
2019-02-08  7:15 ` [PATCH 4/7] common: state: harmonize code with dt-utils Ulrich Ölmann
2019-02-08  7:15 ` [PATCH 5/7] " Ulrich Ölmann
2019-02-08  7:15 ` [PATCH 6/7] " Ulrich Ölmann
2019-02-08  7:15 ` [PATCH 7/7] " Ulrich Ölmann
2019-02-11  8:12 ` [PATCH 0/7] Harmonize barebox' and dt-utils' state code Sascha Hauer

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20190208071526.19150-2-u.oelmann@pengutronix.de \
    --to=u.oelmann@pengutronix.de \
    --cc=barebox@lists.infradead.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox