What’s wrong with switch statements?

Recently I’ve been noticing a surprising pattern in code I’m reviewing for the kernel. A lot of people seem to have taken to writing code that I’d expect to look like this: switch (thing) { case VALUE: /* Stuff */ break; case BAR: /* Nonsense */ break; default: /* Whatever */ break; } with if […]