Received: by 2002:ac0:8845:0:0:0:0:0 with SMTP id g63csp1653398img; Wed, 27 Feb 2019 03:11:10 -0800 (PST) X-Google-Smtp-Source: AHgI3IazJKWejI8zou6g50prxkvWMyynMP0WkREl5GaGJC0UtZzs5dBIYVBjXyOZCa1dC7eAcWtA X-Received: by 2002:a62:1c94:: with SMTP id c142mr1139048pfc.54.1551265870483; Wed, 27 Feb 2019 03:11:10 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1551265870; cv=none; d=google.com; s=arc-20160816; b=t1Ht6LBFDEWwV6Qj68iVHs9lCvthY9qAHDUesb+yeQ2zBSq6fgjAMmy8wis5ALVYd2 UwSgtZLWVvSJP/sked/5WexN/uHr8h2ocsYTkKfDf1hHzsH3kUNV/bfT2VsZOmkR45MA pxVQr8W0fLKfreYbs5Nt4pwsrros/9aSq3HTKqSFjEY3GEbtifkydSnVt8J4DQaa1Eqk XQ0f4OGciZZcbGY9N+/6U+RuM53ed94ELzNJnHIUfacPGwIsPnEhr3zOcg54njAkrlar GesSY4wtRB/WkKM4L6U28QuU9Mc7j0EQ3M3haNywWrBZK50AjJW8rqR988NweWCwlGmg 6Tgw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=xVgaF+6RCsy76G62m4+uEGC9wcs64CsqkQWHMsa431Q=; b=Z2avUuXaDef2sNDHHLTgOMniX1gckdpjqraAaR6+t7RLkdhQwDD6F+Qi35GpvF27V1 XRNkz6QH6ndSe/SgpEO1oQ/yl1AvjxgJDfbLvpN+4fhr8WW8C1Uz6UlfILQUSok9PS99 6+Oy4tT/nsQNu/HyMctrrIakYiYetidVDX/9lRWMFo93W8xTROoL70Y9kVXCUWthuDpu bOj30yn30823YV/DAF4Aqbs08h9qPfbOVKc0Ns0CiodlH3llwLdfNA3qx4yKhnjfuaNo J5Zrw17kJfv5tZsXyA8wmuhrSei+S+MMsCkSdlwcqMjLFx64hLciNAOup4MMpt8rGLvk rCiA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kragniz.eu header.s=google header.b=iMup3Hxv; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id cn17si15842592plb.139.2019.02.27.03.10.41; Wed, 27 Feb 2019 03:11:10 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@kragniz.eu header.s=google header.b=iMup3Hxv; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726944AbfB0LI2 (ORCPT + 99 others); Wed, 27 Feb 2019 06:08:28 -0500 Received: from mail-wr1-f65.google.com ([209.85.221.65]:41366 "EHLO mail-wr1-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725927AbfB0LI2 (ORCPT ); Wed, 27 Feb 2019 06:08:28 -0500 Received: by mail-wr1-f65.google.com with SMTP id n2so17431396wrw.8 for ; Wed, 27 Feb 2019 03:08:27 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kragniz.eu; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=xVgaF+6RCsy76G62m4+uEGC9wcs64CsqkQWHMsa431Q=; b=iMup3HxvT8clgaIFE2CxprbdkRG2pdDGVrQx067aKuQiQ4A0ey688XFpdHh/2tL/QM i85zru5+xjngwSMz1F83WUQSayeXV498Ks8+UVO1prQ8PT915qLd7UcTOZOCtREdM5V5 o75vM/JHplHW223ZSJEE28WX6Jn1es36eUI4I= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=xVgaF+6RCsy76G62m4+uEGC9wcs64CsqkQWHMsa431Q=; b=mWjaJciVsgI/FxDTR2m0/0D3DJzZWfkRkaNnXBCuQQCJp71T6XDN933LtPJdByFFHp X7hCXiSKgVEKabvskRrvoCOqlBs6aqD9l1hZ9PSAf8VH74GxZszhkbSNqZNuCwW/hbXr KLdU5rxmtCY0i6dn7sfEEUxyRojPqDwwWTL9SrHBI9OdG9+gNuhzHQQk+8A1Y/ql5f/6 30tnEV3uiogjOuy3mWXrZWplzftu1L1UWZvYi3YuOAwuu5zqNo48AoAUGc5zro8L6S67 6qFEVgJqWxIG2CyaShfwvMKRwP9RT2kE8qMf6EymbJ7pPog2hDHNAir5RM/6CdpEWFBk vpCA== X-Gm-Message-State: APjAAAWphSHiPs9XEm/gT6cwAAyLPPaWyY5hzRMoIkXo7DI0ThEYxSmZ T+WsL3rntD9zBLF0EkIHJ33GWg== X-Received: by 2002:adf:b741:: with SMTP id n1mr1861847wre.287.1551265706023; Wed, 27 Feb 2019 03:08:26 -0800 (PST) Received: from localhost.localdomain ([5.148.119.11]) by smtp.gmail.com with ESMTPSA id a20sm996194wmb.17.2019.02.27.03.08.24 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 27 Feb 2019 03:08:25 -0800 (PST) From: Louis Taylor To: jikos@kernel.org Cc: benjamin.tissoires@redhat.com, linux-input@vger.kernel.org, linux-kernel@vger.kernel.org, clang-built-linux@googlegroups.com, ndesaulniers@google.com, Louis Taylor Subject: [PATCH v2] HID: quirks: use correct format chars in dbg_hid Date: Wed, 27 Feb 2019 11:07:20 +0000 Message-Id: <20190227110720.27329-1-louis@kragniz.eu> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20190226234853.20441-1-louis@kragniz.eu> References: <20190226234853.20441-1-louis@kragniz.eu> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org When building with -Wformat, clang warns: drivers/hid/hid-quirks.c:1075:27: warning: format specifies type 'unsigned short' but the argument has type '__u32' (aka 'unsigned int') [-Wformat] bl_entry->driver_data, bl_entry->vendor, ^~~~~~~~~~~~~~~~ ./include/linux/hid.h:1170:48: note: expanded from macro 'dbg_hid' printk(KERN_DEBUG "%s: " format, __FILE__, ##arg); \ ~~~~~~ ^~~ drivers/hid/hid-quirks.c:1076:4: warning: format specifies type 'unsigned short' but the argument has type '__u32' (aka 'unsigned int') [-Wformat] bl_entry->product); ^~~~~~~~~~~~~~~~~ ./include/linux/hid.h:1170:48: note: expanded from macro 'dbg_hid' printk(KERN_DEBUG "%s: " format, __FILE__, ##arg); \ ~~~~~~ ^~~ drivers/hid/hid-quirks.c:1242:12: warning: format specifies type 'unsigned short' but the argument has type '__u32' (aka 'unsigned int') [-Wformat] quirks, hdev->vendor, hdev->product); ^~~~~~~~~~~~ ./include/linux/hid.h:1170:48: note: expanded from macro 'dbg_hid' printk(KERN_DEBUG "%s: " format, __FILE__, ##arg); \ ~~~~~~ ^~~ drivers/hid/hid-quirks.c:1242:26: warning: format specifies type 'unsigned short' but the argument has type '__u32' (aka 'unsigned int') [-Wformat] quirks, hdev->vendor, hdev->product); ^~~~~~~~~~~~~ ./include/linux/hid.h:1170:48: note: expanded from macro 'dbg_hid' printk(KERN_DEBUG "%s: " format, __FILE__, ##arg); \ ~~~~~~ ^~~ 4 warnings generated. This patch fixes the format strings to use the correct format type for unsigned ints. Link: https://github.com/ClangBuiltLinux/linux/issues/378 Signed-off-by: Louis Taylor --- v2: change format string to use %04x instead of %x drivers/hid/hid-quirks.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/hid/hid-quirks.c b/drivers/hid/hid-quirks.c index 94088c0ed68a..b608a57b7908 100644 --- a/drivers/hid/hid-quirks.c +++ b/drivers/hid/hid-quirks.c @@ -1071,7 +1071,7 @@ static struct hid_device_id *hid_exists_dquirk(const struct hid_device *hdev) } if (bl_entry != NULL) - dbg_hid("Found dynamic quirk 0x%lx for HID device 0x%hx:0x%hx\n", + dbg_hid("Found dynamic quirk 0x%lx for HID device 0x%04x:0x%04x\n", bl_entry->driver_data, bl_entry->vendor, bl_entry->product); @@ -1238,7 +1238,7 @@ static unsigned long hid_gets_squirk(const struct hid_device *hdev) quirks |= bl_entry->driver_data; if (quirks) - dbg_hid("Found squirk 0x%lx for HID device 0x%hx:0x%hx\n", + dbg_hid("Found squirk 0x%lx for HID device 0x%04x:0x%04x\n", quirks, hdev->vendor, hdev->product); return quirks; } -- 2.20.1