mail archive of the barebox mailing list
 help / color / mirror / Atom feed
* [PATCH 1/2] rsa: fix print format specifiers in debug()
@ 2020-09-21  7:13 Ahmad Fatoum
  2020-09-21  7:13 ` [PATCH 2/2] USB: musb: host: fix mismatched format specifier in dev_dbg() Ahmad Fatoum
  2020-09-28  8:27 ` [PATCH 1/2] rsa: fix print format specifiers in debug() Sascha Hauer
  0 siblings, 2 replies; 3+ messages in thread
From: Ahmad Fatoum @ 2020-09-21  7:13 UTC (permalink / raw)
  To: barebox

The arguments after the format string are of type uint32_t and size_t.
Use the correct format specifiers.

Signed-off-by: Ahmad Fatoum <ahmad@a3f.at>
---
 crypto/rsa.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/crypto/rsa.c b/crypto/rsa.c
index 64241854c854..1aea738e5237 100644
--- a/crypto/rsa.c
+++ b/crypto/rsa.c
@@ -317,7 +317,7 @@ int rsa_verify(const struct rsa_public_key *key, const uint8_t *sig,
 		return -EOPNOTSUPP;
 
 	if (sig_len != (key->len * sizeof(uint32_t))) {
-		debug("Signature is of incorrect length %d, should be %d\n", sig_len,
+		debug("Signature is of incorrect length %u, should be %zu\n", sig_len,
 				key->len * sizeof(uint32_t));
 		ret = -EINVAL;
 		goto out_free_digest;
-- 
2.28.0


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

^ permalink raw reply	[flat|nested] 3+ messages in thread

* [PATCH 2/2] USB: musb: host: fix mismatched format specifier in dev_dbg()
  2020-09-21  7:13 [PATCH 1/2] rsa: fix print format specifiers in debug() Ahmad Fatoum
@ 2020-09-21  7:13 ` Ahmad Fatoum
  2020-09-28  8:27 ` [PATCH 1/2] rsa: fix print format specifiers in debug() Sascha Hauer
  1 sibling, 0 replies; 3+ messages in thread
From: Ahmad Fatoum @ 2020-09-21  7:13 UTC (permalink / raw)
  To: barebox

Unadorned 0 is an int, but is printed used %zu. As it's just an interger
literal, just hardcode it into the string.

Signed-off-by: Ahmad Fatoum <ahmad@a3f.at>
---
 drivers/usb/musb/musb_host.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/usb/musb/musb_host.c b/drivers/usb/musb/musb_host.c
index 68d819af2cc8..be9651b04960 100644
--- a/drivers/usb/musb/musb_host.c
+++ b/drivers/usb/musb/musb_host.c
@@ -1189,8 +1189,8 @@ void musb_host_rx(struct musb *musb, u8 epnum)
 
 	pipe = urb->pipe;
 
-	dev_dbg(musb->controller, "<== hw %d rxcsr %04x, urb actual %d (+dma %zu)\n",
-		epnum, rx_csr, urb->actual_length, 0);
+	dev_dbg(musb->controller, "<== hw %d rxcsr %04x, urb actual %d (+dma 0)\n",
+		epnum, rx_csr, urb->actual_length);
 
 	/* check for errors, concurrent stall & unlink is not really
 	 * handled yet! */
-- 
2.28.0


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

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH 1/2] rsa: fix print format specifiers in debug()
  2020-09-21  7:13 [PATCH 1/2] rsa: fix print format specifiers in debug() Ahmad Fatoum
  2020-09-21  7:13 ` [PATCH 2/2] USB: musb: host: fix mismatched format specifier in dev_dbg() Ahmad Fatoum
@ 2020-09-28  8:27 ` Sascha Hauer
  1 sibling, 0 replies; 3+ messages in thread
From: Sascha Hauer @ 2020-09-28  8:27 UTC (permalink / raw)
  To: Ahmad Fatoum; +Cc: barebox

On Mon, Sep 21, 2020 at 09:13:00AM +0200, Ahmad Fatoum wrote:
> The arguments after the format string are of type uint32_t and size_t.
> Use the correct format specifiers.
> 
> Signed-off-by: Ahmad Fatoum <ahmad@a3f.at>
> ---
>  crypto/rsa.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)

Applied, thanks

Sascha

-- 
Pengutronix e.K.                           |                             |
Steuerwalder Str. 21                       | http://www.pengutronix.de/  |
31137 Hildesheim, Germany                  | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |

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

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2020-09-28  8:27 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-09-21  7:13 [PATCH 1/2] rsa: fix print format specifiers in debug() Ahmad Fatoum
2020-09-21  7:13 ` [PATCH 2/2] USB: musb: host: fix mismatched format specifier in dev_dbg() Ahmad Fatoum
2020-09-28  8:27 ` [PATCH 1/2] rsa: fix print format specifiers in debug() Sascha Hauer

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox