Messages in this thread | | | Date | Mon, 8 Aug 2022 19:52:09 +0200 | From | Borislav Petkov <> | Subject | Re: [RFC PATCH 1/5] entry: Pass pt_regs to irqentry_exit_cond_resched() |
| |
On Mon, Aug 08, 2022 at 10:43:35AM -0700, Dave Hansen wrote: > Might have been me. Function calls that look like this: > > foo(&ptr, false, true, false, true, 1, 0); > > are incomprehensible. A true/false is effectively a magic number here > and you have to go looking at the code implementing 'foo()' or at least > the declaration hoping that the variable names help (if the declaration > has variable names).
Yap, agreed.
It would start getting on my nerves after the second bool. :)
> I think I've encouraged Ira to do something like this instead: > > enum foo_mode { > MODE_BAR, > MODE_BAZ > } > > where the call ends up looking like: > > foo(&ptr, MODE_BAR); > > which is much more self-documenting.
Yap, that's much better.
I suggested the bool thing in thinking that this would be the only exception to the usage, i.e., a one-off thing. I probably should talk to Jürgen whether we even need this one-off thing and maybe solve it differently.
Thx.
-- Regards/Gruss, Boris.
https://people.kernel.org/tglx/notes-about-netiquette
| |