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]
Message-ID: <CAGb2v65iVRZkrgGrQGnfcYp0wbdquOw5eHqyYaV_WrfHObTQ4Q@mail.gmail.com>
Date:   Fri, 22 Mar 2019 16:41:07 +0800
From:   Chen-Yu Tsai <wens@...e.org>
To:     "Gustavo A. R. Silva" <gustavo@...eddedor.com>
Cc:     Liam Girdwood <lgirdwood@...il.com>,
        Mark Brown <broonie@...nel.org>,
        linux-kernel <linux-kernel@...r.kernel.org>,
        Kees Cook <keescook@...omium.org>
Subject: Re: [PATCH] regulator: axp20x: Mark expected switch fall-throughs

On Thu, Mar 21, 2019 at 12:57 AM Gustavo A. R. Silva
<gustavo@...eddedor.com> wrote:
>
> In preparation to enabling -Wimplicit-fallthrough, mark switch
> cases where we are expecting to fall through.
>
> This patch fixes the following warnings:
>
> drivers/regulator/axp20x-regulator.c: In function ‘axp20x_set_dcdc_freq’:
> drivers/regulator/axp20x-regulator.c:1023:7: warning: this statement may fall through [-Wimplicit-fallthrough=]
>    reg = AXP803_DCDC_FREQ_CTRL;
> drivers/regulator/axp20x-regulator.c:1025:2: note: here
>   case AXP806_ID:
>   ^~~~
> drivers/regulator/axp20x-regulator.c: In function ‘axp20x_set_dcdc_workmode’:
> drivers/regulator/axp20x-regulator.c:1115:7: warning: this statement may fall through [-Wimplicit-fallthrough=]
>    reg = AXP806_DCDC_MODE_CTRL2;
> drivers/regulator/axp20x-regulator.c:1121:2: note: here
>   case AXP221_ID:
>   ^~~~
>
> Notice that in this particular case, I moved the whole comment
> "Fall through to the check below.", which contains the "Fall through"
> comment, at the bottom of the case, which is what GCC is expecting
> to find.
>
> Warning level 3 was used: -Wimplicit-fallthrough=3
>
> This patch is part of the ongoing efforts to enable
> -Wimplicit-fallthrough.
>
> Signed-off-by: Gustavo A. R. Silva <gustavo@...eddedor.com>

Acked-by: Chen-Yu Tsai

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ