Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1336246

Re: [char-misc-next] mei: fix format string in debug prints

From Joe Perches <joe@perches.com>
Newsgroups linux.kernel
Subject Re: [char-misc-next] mei: fix format string in debug prints
Date 2016-02-17 11:50 +0100
Message-ID <r37Qe-59r-35@gated-at.bofh.it> (permalink)
References <r37wS-51u-29@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


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

Back to linux.kernel | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

[char-misc-next] mei: fix format string in debug prints Tomas Winkler <tomas.winkler@intel.com> - 2016-02-17 11:30 +0100
  Re: [char-misc-next] mei: fix format string in debug prints Joe Perches <joe@perches.com> - 2016-02-17 11:50 +0100
    RE: [char-misc-next] mei: fix format string in debug prints "Winkler, Tomas" <tomas.winkler@intel.com> - 2016-02-17 13:10 +0100

csiph-web