public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Joe Perches <joe@perches.com>
To: Tomas Winkler <tomas.winkler@intel.com>,
	Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: Alexander Usyskin <alexander.usyskin@intel.com>,
	linux-kernel@vger.kernel.org
Subject: Re: [char-misc-next] mei: fix format string in debug prints
Date: Wed, 17 Feb 2016 02:45:06 -0800	[thread overview]
Message-ID: <1455705906.4745.13.camel@perches.com> (raw)
In-Reply-To: <1455704877-32066-1-git-send-email-tomas.winkler@intel.com>

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

  reply	other threads:[~2016-02-17 10:45 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-02-17 10:27 [char-misc-next] mei: fix format string in debug prints Tomas Winkler
2016-02-17 10:45 ` Joe Perches [this message]
2016-02-17 12:01   ` Winkler, Tomas

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1455705906.4745.13.camel@perches.com \
    --to=joe@perches.com \
    --cc=alexander.usyskin@intel.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=tomas.winkler@intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox