lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Date:   Wed, 26 May 2021 12:49:00 +0200 (CEST)
From:   Jiri Kosina <jikos@...nel.org>
To:     Arnd Bergmann <arnd@...nel.org>
cc:     Benjamin Tissoires <benjamin.tissoires@...hat.com>,
        Nathan Chancellor <nathan@...nel.org>,
        Nick Desaulniers <ndesaulniers@...gle.com>,
        Julian Sax <jsbc@....de>, Arnd Bergmann <arnd@...db.de>,
        Hans de Goede <hdegoede@...hat.com>,
        Douglas Anderson <dianders@...omium.org>,
        Kai-Heng Feng <kai.heng.feng@...onical.com>,
        Xiaofei Tan <tanxiaofei@...wei.com>,
        Coiby Xu <coiby.xu@...il.com>, linux-input@...r.kernel.org,
        linux-kernel@...r.kernel.org, clang-built-linux@...glegroups.com
Subject: Re: [PATCH] HID: i2c-hid: fix format string mismatch

On Fri, 14 May 2021, Arnd Bergmann wrote:

> From: Arnd Bergmann <arnd@...db.de>
> 
> clang doesn't like printing a 32-bit integer using %hX format string:
> 
> drivers/hid/i2c-hid/i2c-hid-core.c:994:18: error: format specifies type 'unsigned short' but the argument has type '__u32' (aka 'unsigned int') [-Werror,-Wformat]
>                  client->name, hid->vendor, hid->product);
>                                ^~~~~~~~~~~
> drivers/hid/i2c-hid/i2c-hid-core.c:994:31: error: format specifies type 'unsigned short' but the argument has type '__u32' (aka 'unsigned int') [-Werror,-Wformat]
>                  client->name, hid->vendor, hid->product);
>                                             ^~~~~~~~~~~~
> 
> Use an explicit cast to truncate it to the low 16 bits instead.
> 
> Fixes: 9ee3e06610fd ("HID: i2c-hid: override HID descriptors for certain devices")
> Signed-off-by: Arnd Bergmann <arnd@...db.de>

Applied, thanks Arnd.

-- 
Jiri Kosina
SUSE Labs

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ