From mboxrd@z Thu Jan 1 00:00:00 1970 From: Steven Rostedt Date: Fri, 29 Apr 2022 09:56:54 -0400 Subject: [PATCH 17/30] tracing: Improve panic/die notifiers In-Reply-To: <832eecc5-9569-1d95-6ab8-f029b660dfcb@igalia.com> References: <20220427224924.592546-1-gpiccoli@igalia.com> <20220427224924.592546-18-gpiccoli@igalia.com> <20220429092351.10bca4dd@gandalf.local.home> <832eecc5-9569-1d95-6ab8-f029b660dfcb@igalia.com> Message-ID: <20220429095654.26d00b79@gandalf.local.home> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: kexec@lists.infradead.org On Fri, 29 Apr 2022 10:46:35 -0300 "Guilherme G. Piccoli" wrote: > Thanks Sergei and Steven, good idea! I thought about the switch change > you propose, but I confess I got a bit confused by the "fallthrough" > keyword - do I need to use it? No. The fallthrough keyword is only needed when there's code between case labels. As it is very common to list multiple cases for the same code path. That is: case DIE_OOPS: case PANIC_NOTIFIER: do_dump = 1; break; Does not need a fall through label, as there's no code between the DIE_OOPS and the PANIC_NOTIFIER. But if you had: case DIE_OOPS: x = true; case PANIC_NOTIFIER: do_dump = 1; break; Then you do. -- Steve