From patchwork Thu Dec 22 10:09:10 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Nicolas Iooss X-Patchwork-Id: 9484629 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 5FCA7601D2 for ; Thu, 22 Dec 2016 10:10:29 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 3295B27DE0 for ; Thu, 22 Dec 2016 10:10:29 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 2476528174; Thu, 22 Dec 2016 10:10:29 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.9 required=2.0 tests=BAYES_00,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id C87D527DE0 for ; Thu, 22 Dec 2016 10:10:28 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1765223AbcLVKJ6 (ORCPT ); Thu, 22 Dec 2016 05:09:58 -0500 Received: from mx1.polytechnique.org ([129.104.30.34]:44598 "EHLO mx1.polytechnique.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754027AbcLVKJ5 (ORCPT ); Thu, 22 Dec 2016 05:09:57 -0500 Received: from localhost.localdomain (32.206.133.77.rev.sfr.net [77.133.206.32]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by ssl.polytechnique.org (Postfix) with ESMTPSA id 72A3A5600B9; Thu, 22 Dec 2016 11:09:55 +0100 (CET) From: Nicolas Iooss To: Srinivas Pandruvada , Jiri Kosina , Benjamin Tissoires Cc: linux-input@vger.kernel.org, linux-kernel@vger.kernel.org, Nicolas Iooss Subject: [PATCH 2/2] HID: intel-ish-hid: format 32-bit integers with %X Date: Thu, 22 Dec 2016 11:09:10 +0100 Message-Id: <20161222100910.6179-2-nicolas.iooss_linux@m4x.org> X-Mailer: git-send-email 2.11.0 In-Reply-To: <20161222100910.6179-1-nicolas.iooss_linux@m4x.org> References: <20161222100910.6179-1-nicolas.iooss_linux@m4x.org> X-AV-Checked: ClamAV using ClamSMTP at svoboda.polytechnique.org (Thu Dec 22 11:09:55 2016 +0100 (CET)) Sender: linux-input-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-input@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP 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 Acked-by: Srinivas Pandruvada --- 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);