Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

lib/bug: remove unnecessary variable initializations

Remove the unnecessary initialization of 'rcu' to false in
report_bug_entry() and report_bug(), as it is assigned by warn_rcu_enter()
before its first use.

Link: https://lkml.kernel.org/r/20260306162418.2815979-1-objecting@objecting.org
Signed-off-by: Josh Law <objecting@objecting.org>
Reviewed-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>

authored by

Josh Law and committed by
Andrew Morton
228491c3 6a280411

+2 -2
+2 -2
lib/bug.c
··· 263 263 enum bug_trap_type report_bug_entry(struct bug_entry *bug, struct pt_regs *regs) 264 264 { 265 265 enum bug_trap_type ret; 266 - bool rcu = false; 266 + bool rcu; 267 267 268 268 rcu = warn_rcu_enter(); 269 269 ret = __report_bug(bug, bug_addr(bug), regs); ··· 275 275 enum bug_trap_type report_bug(unsigned long bugaddr, struct pt_regs *regs) 276 276 { 277 277 enum bug_trap_type ret; 278 - bool rcu = false; 278 + bool rcu; 279 279 280 280 rcu = warn_rcu_enter(); 281 281 ret = __report_bug(NULL, bugaddr, regs);