Skip to contentSkip to conversation

lib/bug: remove unnecessary variable initializations

PATCH Applied Josh Law 1 participant 1 message Mar 6 Library code

lore
Share & tools
lore

Josh Law

author
#0 lore raw

PATCH 1/1 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.

---
 lib/bug.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
lib/bug.c +2 -2
index d7faa1255f85..bbc301097749 100644
@@ -263,7 +263,7 @@ static enum bug_trap_type __report_bug(struct bug_entry *bug, unsigned long buga
 enum bug_trap_type report_bug_entry(struct bug_entry *bug, struct pt_regs *regs)
 {
 	enum bug_trap_type ret;
-	bool rcu = false;
+	bool rcu;
 
 	rcu = warn_rcu_enter();
 	ret = __report_bug(bug, bug_addr(bug), regs);
@@ -275,7 +275,7 @@ enum bug_trap_type report_bug_entry(struct bug_entry *bug, struct pt_regs *regs)
 enum bug_trap_type report_bug(unsigned long bugaddr, struct pt_regs *regs)
 {
 	enum bug_trap_type ret;
-	bool rcu = false;
+	bool rcu;
 
 	rcu = warn_rcu_enter();
 	ret = __report_bug(NULL, bugaddr, regs);
Signature · 1 line
2.43.0