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:   Mon, 18 Jul 2022 11:53:10 +0000 (UTC)
From:   Kalle Valo <>
To:     Justin Stitt <>
Cc:     Jakub Kicinski <>,
        "David S . Miller" <>,
        Eric Dumazet <>,
        Paolo Abeni <>,
        Matthias Brugger <>,
        Nathan Chancellor <>,
        Nick Desaulniers <>,
        Tom Rix <>,,,,,,, Justin Stitt <>
Subject: Re: wifi: mt7601u: eeprom: fix clang -Wformat warning

Justin Stitt <> wrote:

> When building with Clang we encounter the following warning:
> | drivers/net/wireless/mediatek/mt7601u/eeprom.c:193:5: error: format
> | specifies type 'char' but the argument has type 'int' [-Werror,-Wformat]
> | chan_bounds[idx].start + chan_bounds[idx].num - 1);
> Variadic functions (printf-like) undergo default argument promotion.
> Documentation/core-api/printk-formats.rst specifically recommends using
> the promoted-to-type's format flag.
> Moreover, C11 states:
> ( `If an int
> can represent all values of the original type ..., the value is
> converted to an int; otherwise, it is converted to an unsigned int.
> These are called the integer promotions.`
> With this information in hand, we really should stop using `%hh[dxu]` or
> `%h[dxu]` as they usually prompt Clang -Wformat warnings as well as go
> against documented standard recommendations.
> Link:
> Signed-off-by: Justin Stitt <>

Patch applied to wireless-next.git, thanks.

07db88f11e63 wifi: mt7601u: eeprom: fix clang -Wformat warning


Powered by blists - more mailing lists