lkml.org 
[lkml]   [2016]   [Feb]   [17]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [char-misc-next] mei: fix format string in debug prints
From
Date
On Wed, 2016-02-17 at 12:27 +0200, Tomas Winkler wrote:
[]
> buf_idx type was changed to size_t, and few places
> missed out to change the print format from %ld to %zd.

trivia:

> diff --git a/drivers/misc/mei/interrupt.c b/drivers/misc/mei/interrupt.c
[]
> @@ -128,7 +128,7 @@ int mei_cl_irq_read_msg(struct mei_cl *cl,
>   buf_sz = mei_hdr->length + cb->buf_idx;
>   /* catch for integer overflow */
>   if (buf_sz < cb->buf_idx) {
> - cl_err(dev, cl, "message is too big len %d idx %ld\n",
> + cl_err(dev, cl, "message is too big len %d idx %zd\n",
>          mei_hdr->length, cb->buf_idx);

[etc...]

buf_idx is size_t and it should probably use %zu

ssize_t -> %zd
size_t -> %zu

\
 
 \ /
  Last update: 2016-02-17 12:01    [W:0.074 / U:0.024 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site