From: Nicolas Iooss <nicolas.iooss_linux@m4x.org>
To: Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com>,
Jiri Kosina <jikos@kernel.org>,
Benjamin Tissoires <benjamin.tissoires@redhat.com>
Cc: linux-input@vger.kernel.org, linux-kernel@vger.kernel.org,
Nicolas Iooss <nicolas.iooss_linux@m4x.org>
Subject: [PATCH 2/2] HID: intel-ish-hid: format 32-bit integers with %X
Date: Thu, 22 Dec 2016 11:09:10 +0100 [thread overview]
Message-ID: <20161222100910.6179-2-nicolas.iooss_linux@m4x.org> (raw)
In-Reply-To: <20161222100910.6179-1-nicolas.iooss_linux@m4x.org>
In ishtp_hid_probe(), use %04X instead of %04hX to format __u32 values,
in order to silent a format error reported by clang:
drivers/hid/intel-ish-hid/ishtp-hid.c:212:3: error: format specifies
type 'unsigned short' but the argument has type '__u32' (aka
'unsigned int') [-Werror,-Wformat]
hid->vendor, hid->product);
^~~~~~~~~~~
drivers/hid/intel-ish-hid/ishtp-hid.c:212:16: error: format
specifies type 'unsigned short' but the argument has type '__u32'
(aka 'unsigned int') [-Werror,-Wformat]
hid->vendor, hid->product);
^~~~~~~~~~~~
Signed-off-by: Nicolas Iooss <nicolas.iooss_linux@m4x.org>
---
drivers/hid/intel-ish-hid/ishtp-hid.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/hid/intel-ish-hid/ishtp-hid.c b/drivers/hid/intel-ish-hid/ishtp-hid.c
index 277983aa1d90..cd23903ddcf1 100644
--- a/drivers/hid/intel-ish-hid/ishtp-hid.c
+++ b/drivers/hid/intel-ish-hid/ishtp-hid.c
@@ -208,7 +208,7 @@ int ishtp_hid_probe(unsigned int cur_hid_dev,
hid->version = le16_to_cpu(ISH_HID_VERSION);
hid->vendor = le16_to_cpu(ISH_HID_VENDOR);
hid->product = le16_to_cpu(ISH_HID_PRODUCT);
- snprintf(hid->name, sizeof(hid->name), "%s %04hX:%04hX", "hid-ishtp",
+ snprintf(hid->name, sizeof(hid->name), "%s %04X:%04X", "hid-ishtp",
hid->vendor, hid->product);
rv = hid_add_device(hid);
--
2.11.0
next prev parent reply other threads:[~2016-12-22 10:10 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-12-22 10:09 [PATCH 1/2] HID: intel-ish-hid: add printf attribute to print_log() Nicolas Iooss
2016-12-22 10:09 ` Nicolas Iooss [this message]
2016-12-22 17:12 ` [PATCH 2/2] HID: intel-ish-hid: format 32-bit integers with %X Srinivas Pandruvada
2016-12-22 17:11 ` [PATCH 1/2] HID: intel-ish-hid: add printf attribute to print_log() Srinivas Pandruvada
2017-01-02 12:17 ` 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=20161222100910.6179-2-nicolas.iooss_linux@m4x.org \
--to=nicolas.iooss_linux@m4x.org \
--cc=benjamin.tissoires@redhat.com \
--cc=jikos@kernel.org \
--cc=linux-input@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=srinivas.pandruvada@linux.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
Powered by JetHome