Re: [PATCH v5] printk: Userspace format enumeration support

From: Chris Down
Date: Mon Mar 15 2021 - 08:22:06 EST


Petr Mladek writes:
I don't feel strongly that this is more clear though, so maybe you
mean something else?

I was pretty tired when reviewing the patch. It was not easy for me
to create the mental model of the code. I felt that some other names
would have made it easier.

Also the tricky pi_next() implementation did not help much. It looks
like you changed the code many times to get it working and did not
clean it at the end.

No worries. I'm not totally clear on what you're asking for though: do you meant that you'd like the SEQ_START_TOKEN logic to only be present for pi_start, or to pull out the logic currently in pi_next into another function and call it from both, or?

In my mind, pi_start is really just a special case of pi_next, so the code flow makes sense to me. I'm happy to change it to whatever you like, but it's not immediately obvious to me what that is :-)