Skip to contentSkip to conversation

firmware: ti_sci: Use %zu for size_t print format

PATCH Applied Nishanth Menon 3 participants 3 messages Dec 2, 2017 – Dec 16, 2017 Texas instruments' system control interface (TISCI) protocol driver

lore
Share & tools
lore

Nishanth Menon

author maintainer
#0 lore raw

PATCH 1/1 firmware: ti_sci: Use %zu for size_t print format

mbox_msg->len is of type size_t and %d is incorrect format. Instead use %zu for handling size_t correctly.

---
 drivers/firmware/ti_sci.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/firmware/ti_sci.c +2 -2
index 23b12d99ddfe..5229036dcfbf 100644
@@ -287,13 +287,13 @@ static void ti_sci_rx_callback(struct mbox_client *cl, void *m)
 
 	/* Is the message of valid length? */
 	if (mbox_msg->len > info->desc->max_msg_size) {
-		dev_err(dev, "Unable to handle %d xfer(max %d)\n",
+		dev_err(dev, "Unable to handle %zu xfer(max %d)\n",
 			mbox_msg->len, info->desc->max_msg_size);
 		ti_sci_dump_header_dbg(dev, hdr);
 		return;
 	}
 	if (mbox_msg->len < xfer->rx_len) {
-		dev_err(dev, "Recv xfer %d < expected %d length\n",
+		dev_err(dev, "Recv xfer %zu < expected %d length\n",
 			mbox_msg->len, xfer->rx_len);
 		ti_sci_dump_header_dbg(dev, hdr);
 		return;
Signature · 1 line
2.14.1