From: Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com>
To: Arnd Bergmann <arnd@arndb.de>, Jiri Kosina <jikos@kernel.org>
Cc: linux-input@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH v2 4/5] HID: intel_ish-hid: fix format string for size_t
Date: Fri, 26 May 2017 13:58:47 -0700 [thread overview]
Message-ID: <1495832327.79527.5.camel@linux.intel.com> (raw)
In-Reply-To: <20170518202144.3482304-5-arnd@arndb.de>
On Thu, 2017-05-18 at 22:21 +0200, Arnd Bergmann wrote:
> When building for 32-bit architectures, we get a harmless warning:
>
> intel-ish-hid/ishtp-hid-client.c: In function 'process_recv':
> intel-ish-hid/ishtp-hid-client.c:139:7: error: format '%lu' expects
> argument of type 'long unsigned int', but argument 3 has type
> 'unsigned int' [-Werror=format=]
>
> This changes the format string to print size_t variables using %zu
> instead.
>
> Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Acked-by: Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com>
> ---
> drivers/hid/intel-ish-hid/ishtp-hid-client.c | 5 ++---
> 1 file changed, 2 insertions(+), 3 deletions(-)
>
> diff --git a/drivers/hid/intel-ish-hid/ishtp-hid-client.c
> b/drivers/hid/intel-ish-hid/ishtp-hid-client.c
> index 5c643d7a07b2..157b44aacdff 100644
> --- a/drivers/hid/intel-ish-hid/ishtp-hid-client.c
> +++ b/drivers/hid/intel-ish-hid/ishtp-hid-client.c
> @@ -136,10 +136,9 @@ static void process_recv(struct ishtp_cl
> *hid_ishtp_cl, void *recv_buf,
> if (1 + sizeof(struct device_info) *
> i >=
> payload_len) {
> dev_err(&client_data-
> >cl_device->dev,
> - "[hid-ish]:
> [ENUM_DEVICES]: content size %lu is bigger than payload_len %u\n",
> + "[hid-ish]:
> [ENUM_DEVICES]: content size %zu is bigger than payload_len %zu\n",
> 1 + sizeof(struct
> device_info)
> - * i,
> - (unsigned
> int)payload_len);
> + * i, payload_len);
> }
>
> if (1 + sizeof(struct device_info) *
> i >=
next prev parent reply other threads:[~2017-05-27 1:16 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-05-18 20:21 HID: intel_ish-hid: various cleanups Arnd Bergmann
2017-05-18 20:21 ` [PATCH v2 1/5] HID: intel_ish-hid: fix potential uninitialized data usage Arnd Bergmann
2017-05-22 19:17 ` Srinivas Pandruvada
2017-05-22 21:33 ` Arnd Bergmann
2017-05-23 22:24 ` Srinivas Pandruvada
2017-05-24 8:29 ` Arnd Bergmann
2017-05-26 20:58 ` Srinivas Pandruvada
2017-05-18 20:21 ` [PATCH v2 2/5] HID: intel_ish-hid: clarify locking in client code Arnd Bergmann
2017-05-26 20:58 ` Srinivas Pandruvada
2017-05-18 20:21 ` [PATCH v2 3/5] HID: intel_ish-hid: convert timespec to ktime_t Arnd Bergmann
2017-05-26 20:58 ` Srinivas Pandruvada
2017-05-18 20:21 ` [PATCH v2 4/5] HID: intel_ish-hid: fix format string for size_t Arnd Bergmann
2017-05-22 23:46 ` Srinivas Pandruvada
2017-05-23 8:35 ` Arnd Bergmann
2017-05-26 20:58 ` Srinivas Pandruvada [this message]
2017-05-18 20:21 ` [PATCH v2 5/5] HID: intel_ish-hid: enable compile testing Arnd Bergmann
2017-05-26 20:59 ` Srinivas Pandruvada
2017-05-26 20:57 ` HID: intel_ish-hid: various cleanups Srinivas Pandruvada
2017-05-30 12:13 ` Jiri Kosina
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=1495832327.79527.5.camel@linux.intel.com \
--to=srinivas.pandruvada@linux.intel.com \
--cc=arnd@arndb.de \
--cc=jikos@kernel.org \
--cc=linux-input@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
/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;
as well as URLs for NNTP newsgroup(s).