Re: [PATCH] regulator: axp20x: Get rid of AXP20X_xxx_START/END/STEPS defines
From: Mark Brown
Date: Mon Feb 25 2019 - 12:25:36 EST
On Sat, Feb 23, 2019 at 09:37:01PM +0100, Olliver Schinagl wrote:
> In any case, you seem like a smart person that reads and writes hex and
> bits often enough. This is not true for everyone. I can just as easily
> reverse your arguments of course, for example, 'each field has a well
> known meaning' ... to whom? People that use these things daily, sure.
> People who just need to double check something or modify something, not
> so much. They have to look up the MACRO, the struct its in, compare it
> to others, so as you can see, what is natural for you, is not true for
> everyone. :)
> Also, the general consensus is still to avoid magic values, and to stay
> consistent with the rest and not make expceptions, it makes sense to
> have defines instead of magic values.
If you find you need to describe what the fields are it would be much
more constructive to add a comment at the top of the table saying what
they are. As things are this isn't helping anyone - as a big pile of
defines it's hard to read the values without context for how they're
used and if you're looking at the table you can't tell what the
regulator actually supports without going and decoding the defines.
Attachment:
signature.asc
Description: PGP signature