Skip to contentSkip to conversation

Cleanup simple switches

Outreachy Info Alison Schofield 1 participant 1 message Mar 19, 2023

lore
Share & tools
lore
#0 lore raw

drivers/staging$ git log --oneline | grep -i replace | grep switch

You'll see example patches where folks replaced simple switches with if statements.

If a switch only has one case, or more than one case but all result in the same action, it may be simplified to an if statement.