2017-12-02 10:27:25

by Nishanth Menon

[permalink] [raw]
Subject: [PATCH] mailbox: ti-msgmgr: Use %zu for size_t print format

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

Signed-off-by: Nishanth Menon <[email protected]>
---
drivers/mailbox/ti-msgmgr.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/mailbox/ti-msgmgr.c b/drivers/mailbox/ti-msgmgr.c
index c8f34d69f03c..78753a87ba4d 100644
--- a/drivers/mailbox/ti-msgmgr.c
+++ b/drivers/mailbox/ti-msgmgr.c
@@ -283,7 +283,7 @@ static int ti_msgmgr_send_data(struct mbox_chan *chan, void *data)
desc = inst->desc;

if (desc->max_message_size < message->len) {
- dev_err(dev, "Queue %s message length %d > max %d\n",
+ dev_err(dev, "Queue %s message length %zu > max %d\n",
qinst->name, message->len, desc->max_message_size);
return -EINVAL;
}
--
2.14.1


2017-12-13 08:01:47

by Lokesh Vutla

[permalink] [raw]
Subject: Re: mailbox: ti-msgmgr: Use %zu for size_t print format



On Saturday 02 December 2017 03:57 PM, Nishanth Menon wrote:
> message->len is of type size_t and %d is incorrect format usage.
> Instead use %zu for handling size_t correctly.
>
> Signed-off-by: Nishanth Menon <[email protected]>

Reviewed-by: Lokesh Vutla <[email protected]>

Thanks and regards,
Lokesh

2017-12-16 21:50:09

by Nishanth Menon

[permalink] [raw]
Subject: Re: mailbox: ti-msgmgr: Use %zu for size_t print format

On 08:01-20171213, Lokesh Vutla wrote:
>
>
> On Saturday 02 December 2017 03:57 PM, Nishanth Menon wrote:
> > message->len is of type size_t and %d is incorrect format usage.
> > Instead use %zu for handling size_t correctly.
> >
> > Signed-off-by: Nishanth Menon <[email protected]>
>
> Reviewed-by: Lokesh Vutla <[email protected]>

Hi Jassi,
Gentle ping.
--
Regards,
Nishanth Menon