From patchwork Tue Feb 26 23:48:53 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Louis Taylor X-Patchwork-Id: 10830941 X-Patchwork-Delegate: jikos@jikos.cz Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 933861669 for ; Tue, 26 Feb 2019 23:50:27 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 7E0F32D7D5 for ; Tue, 26 Feb 2019 23:50:27 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 7C1302D83E; Tue, 26 Feb 2019 23:50:27 +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=-8.0 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,MAILING_LIST_MULTI,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 06DF02D7D5 for ; Tue, 26 Feb 2019 23:50:26 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729364AbfBZXu0 (ORCPT ); Tue, 26 Feb 2019 18:50:26 -0500 Received: from mail-wm1-f67.google.com ([209.85.128.67]:34913 "EHLO mail-wm1-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726801AbfBZXuZ (ORCPT ); Tue, 26 Feb 2019 18:50:25 -0500 Received: by mail-wm1-f67.google.com with SMTP id y15so3909862wma.0 for ; Tue, 26 Feb 2019 15:50:24 -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:mime-version :content-transfer-encoding; bh=BM8nxqePtW8yUbGgVleoRab2+GDxVKfZwcAD9uD2/qU=; b=npY8QLr40tS7ci9LDD5MbViS5SwM6ZFX8AybilEXA0gEK08huNHyE22Qegw1T6tkd6 0uB9rBy+fn5CXlwgf4v5HKYr2PGbos/GuyRxNuMY0oSwKRB6gDUBKPDfgfxEsmdo1CiL m8dLS8u4UDiFYTN00NRtAwVPUMK8VGqXprwNI= 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:mime-version :content-transfer-encoding; bh=BM8nxqePtW8yUbGgVleoRab2+GDxVKfZwcAD9uD2/qU=; b=X5xV1102OtKwKTKUrT9hvmcAGilQQhZWc0zuuMy0ShFjoFacvKpRl6zkNVt9sYE0V4 G/63aeYAImLLc+kryZL2DJo/5fVrSWGkVbvuPUBg/nsf2eDNlM3iMGIJ4/IGq/XlIkT+ lFXkMCaT2nLfob2wAQHW13p4ifkEEbxI9uf6HZWWz6W+fLv9QIaVFEmK8dOZqZ5xfOyN imLf5m/0uuNKmI3YU1XOgW0fIumyum5hhyNdlm7D7qGGZ3DWomqbAoGoyi/wrw2Pm3Rh nlzoV92of3XegRUdn/d94G/gODpq8nCljces4gRnUGWKuiFrglxnRdi8qoP0luaXRfSF sa1g== X-Gm-Message-State: APjAAAX+60wnzG+5PpvLHn98KU8yENq4lqeIbpH1+TwnOmzayDc35s9e s1DIKQ/GMQdm+OeKPlcSX7JeYXevFC8ADA== X-Google-Smtp-Source: AHgI3IYM14uGxbzlEGY4NUyTSvwEw+BuZqbr1paXQ5AD/t32ScEIy8pAkws+28YU/WGbG2/ObnrPug== X-Received: by 2002:a7b:c017:: with SMTP id c23mr347234wmb.50.1551225023288; Tue, 26 Feb 2019 15:50:23 -0800 (PST) Received: from localhost.localdomain ([95.149.160.3]) by smtp.gmail.com with ESMTPSA id s3sm19044303wrt.81.2019.02.26.15.50.22 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 26 Feb 2019 15:50:22 -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] HID: quirks: use correct format chars in dbg_hid Date: Tue, 26 Feb 2019 23:48:53 +0000 Message-Id: <20190226234853.20441-1-louis@kragniz.eu> X-Mailer: git-send-email 2.20.1 MIME-Version: 1.0 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 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 Reviewed-by: Nick Desaulniers --- 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..b4e49e1b6f4a 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%x:0x%x\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%x:0x%x\n", quirks, hdev->vendor, hdev->product); return quirks; }