* [PATCH][next] kgdb: Fix fall-through warning for Clang
@ 2021-05-28 20:02 Gustavo A. R. Silva
2021-06-01 19:20 ` Kees Cook
2021-06-17 10:10 ` Daniel Thompson
0 siblings, 2 replies; 4+ messages in thread
From: Gustavo A. R. Silva @ 2021-05-28 20:02 UTC (permalink / raw)
To: Jason Wessel, Daniel Thompson, Douglas Anderson
Cc: kgdb-bugreport, linux-kernel, Gustavo A. R. Silva, linux-hardening
In preparation to enable -Wimplicit-fallthrough for Clang, fix a
fall-through warning by explicitly adding a goto statement instead
of letting the code fall through to the next case.
Link: https://github.com/KSPP/linux/issues/115
Signed-off-by: Gustavo A. R. Silva <gustavoars@kernel.org>
---
JFYI: We had thousands of these sorts of warnings and now we are down
to just 25 in linux-next. This is one of those last remaining
warnings.
kernel/debug/debug_core.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/kernel/debug/debug_core.c b/kernel/debug/debug_core.c
index 4708aec492df..431749dd9ab6 100644
--- a/kernel/debug/debug_core.c
+++ b/kernel/debug/debug_core.c
@@ -1038,6 +1038,7 @@ dbg_notify_reboot(struct notifier_block *this, unsigned long code, void *x)
switch (kgdbreboot) {
case 1:
kgdb_breakpoint();
+ goto done;
case -1:
goto done;
}
--
2.27.0
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH][next] kgdb: Fix fall-through warning for Clang
2021-05-28 20:02 [PATCH][next] kgdb: Fix fall-through warning for Clang Gustavo A. R. Silva
@ 2021-06-01 19:20 ` Kees Cook
2021-06-01 22:13 ` Gustavo A. R. Silva
2021-06-17 10:10 ` Daniel Thompson
1 sibling, 1 reply; 4+ messages in thread
From: Kees Cook @ 2021-06-01 19:20 UTC (permalink / raw)
To: Gustavo A. R. Silva
Cc: Jason Wessel, Daniel Thompson, Douglas Anderson, kgdb-bugreport,
linux-kernel, linux-hardening
On Fri, May 28, 2021 at 03:02:22PM -0500, Gustavo A. R. Silva wrote:
> In preparation to enable -Wimplicit-fallthrough for Clang, fix a
> fall-through warning by explicitly adding a goto statement instead
> of letting the code fall through to the next case.
>
> Link: https://github.com/KSPP/linux/issues/115
> Signed-off-by: Gustavo A. R. Silva <gustavoars@kernel.org>
> ---
> JFYI: We had thousands of these sorts of warnings and now we are down
> to just 25 in linux-next. This is one of those last remaining
> warnings.
So close! :)
Reviewed-by: Kees Cook <keescook@chromium.org>
-Kees
>
> kernel/debug/debug_core.c | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/kernel/debug/debug_core.c b/kernel/debug/debug_core.c
> index 4708aec492df..431749dd9ab6 100644
> --- a/kernel/debug/debug_core.c
> +++ b/kernel/debug/debug_core.c
> @@ -1038,6 +1038,7 @@ dbg_notify_reboot(struct notifier_block *this, unsigned long code, void *x)
> switch (kgdbreboot) {
> case 1:
> kgdb_breakpoint();
> + goto done;
> case -1:
> goto done;
> }
> --
> 2.27.0
>
--
Kees Cook
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH][next] kgdb: Fix fall-through warning for Clang
2021-06-01 19:20 ` Kees Cook
@ 2021-06-01 22:13 ` Gustavo A. R. Silva
0 siblings, 0 replies; 4+ messages in thread
From: Gustavo A. R. Silva @ 2021-06-01 22:13 UTC (permalink / raw)
To: Kees Cook, Gustavo A. R. Silva
Cc: Jason Wessel, Daniel Thompson, Douglas Anderson, kgdb-bugreport,
linux-kernel, linux-hardening
On 6/1/21 14:20, Kees Cook wrote:
> On Fri, May 28, 2021 at 03:02:22PM -0500, Gustavo A. R. Silva wrote:
>> In preparation to enable -Wimplicit-fallthrough for Clang, fix a
>> fall-through warning by explicitly adding a goto statement instead
>> of letting the code fall through to the next case.
>>
>> Link: https://github.com/KSPP/linux/issues/115
>> Signed-off-by: Gustavo A. R. Silva <gustavoars@kernel.org>
>> ---
>> JFYI: We had thousands of these sorts of warnings and now we are down
>> to just 25 in linux-next. This is one of those last remaining
>> warnings.
>
> So close! :)
Almost there!
> Reviewed-by: Kees Cook <keescook@chromium.org>
Thanks
--
Gustavo
>
> -Kees
>
>>
>> kernel/debug/debug_core.c | 1 +
>> 1 file changed, 1 insertion(+)
>>
>> diff --git a/kernel/debug/debug_core.c b/kernel/debug/debug_core.c
>> index 4708aec492df..431749dd9ab6 100644
>> --- a/kernel/debug/debug_core.c
>> +++ b/kernel/debug/debug_core.c
>> @@ -1038,6 +1038,7 @@ dbg_notify_reboot(struct notifier_block *this, unsigned long code, void *x)
>> switch (kgdbreboot) {
>> case 1:
>> kgdb_breakpoint();
>> + goto done;
>> case -1:
>> goto done;
>> }
>> --
>> 2.27.0
>>
>
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH][next] kgdb: Fix fall-through warning for Clang
2021-05-28 20:02 [PATCH][next] kgdb: Fix fall-through warning for Clang Gustavo A. R. Silva
2021-06-01 19:20 ` Kees Cook
@ 2021-06-17 10:10 ` Daniel Thompson
1 sibling, 0 replies; 4+ messages in thread
From: Daniel Thompson @ 2021-06-17 10:10 UTC (permalink / raw)
To: Gustavo A. R. Silva
Cc: Jason Wessel, Douglas Anderson, kgdb-bugreport, linux-kernel,
linux-hardening
On Fri, May 28, 2021 at 03:02:22PM -0500, Gustavo A. R. Silva wrote:
> In preparation to enable -Wimplicit-fallthrough for Clang, fix a
> fall-through warning by explicitly adding a goto statement instead
> of letting the code fall through to the next case.
>
> Link: https://github.com/KSPP/linux/issues/115
> Signed-off-by: Gustavo A. R. Silva <gustavoars@kernel.org>
Applied, thanks.
> ---
> JFYI: We had thousands of these sorts of warnings and now we are down
> to just 25 in linux-next. This is one of those last remaining
> warnings.
>
> kernel/debug/debug_core.c | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/kernel/debug/debug_core.c b/kernel/debug/debug_core.c
> index 4708aec492df..431749dd9ab6 100644
> --- a/kernel/debug/debug_core.c
> +++ b/kernel/debug/debug_core.c
> @@ -1038,6 +1038,7 @@ dbg_notify_reboot(struct notifier_block *this, unsigned long code, void *x)
> switch (kgdbreboot) {
> case 1:
> kgdb_breakpoint();
> + goto done;
> case -1:
> goto done;
> }
> --
> 2.27.0
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2021-06-17 10:10 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-05-28 20:02 [PATCH][next] kgdb: Fix fall-through warning for Clang Gustavo A. R. Silva
2021-06-01 19:20 ` Kees Cook
2021-06-01 22:13 ` Gustavo A. R. Silva
2021-06-17 10:10 ` Daniel Thompson
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.