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:   Mon, 12 Nov 2018 23:17:33 +0100
From:   Alexandre Belloni <alexandre.belloni@...tlin.com>
To:     Nathan Chancellor <natechancellor@...il.com>
Cc:     Alessandro Zummo <a.zummo@...ertech.it>, linux-rtc@...r.kernel.org,
        linux-kernel@...r.kernel.org,
        Nick Desaulniers <ndesaulniers@...gle.com>
Subject: Re: [PATCH] rtc: omap: Use define directive for
 PIN_CONFIG_ACTIVE_HIGH

On 31/10/2018 17:55:02-0700, Nathan Chancellor wrote:
> Clang warns when one enumerated type is implicitly converted to another:
> 
> drivers/rtc/rtc-omap.c:574:21: warning: implicit conversion from
> enumeration type 'enum rtc_pin_config_param' to different enumeration
> type 'enum pin_config_param' [-Wenum-conversion]
>         {"ti,active-high", PIN_CONFIG_ACTIVE_HIGH, 0},
>         ~                  ^~~~~~~~~~~~~~~~~~~~~~
> drivers/rtc/rtc-omap.c:579:12: warning: implicit conversion from
> enumeration type 'enum rtc_pin_config_param' to different enumeration
> type 'enum pin_config_param' [-Wenum-conversion]
>         PCONFDUMP(PIN_CONFIG_ACTIVE_HIGH, "input active high", NULL, false),
>         ~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> ./include/linux/pinctrl/pinconf-generic.h:163:11: note: expanded from
> macro 'PCONFDUMP'
>         .param = a, .display = b, .format = c, .has_arg = d     \
>                  ^
> 2 warnings generated.
> 
> It is expected that pinctrl drivers can extend pin_config_param because
> of the gap between PIN_CONFIG_END and PIN_CONFIG_MAX so this conversion
> isn't an issue. Most drivers that take advantage of this define the
> PIN_CONFIG variables as constants, rather than enumerated values. Do the
> same thing here so that Clang no longer warns.
> 
> Link: https://github.com/ClangBuiltLinux/linux/issues/144
> Signed-off-by: Nathan Chancellor <natechancellor@...il.com>
> ---
>  drivers/rtc/rtc-omap.c | 4 +---
>  1 file changed, 1 insertion(+), 3 deletions(-)
> 
Applied, thanks.

-- 
Alexandre Belloni, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ