Re: [PATCH] regulator: axp20x: Get rid of AXP20X_xxx_START/END/STEPS defines

2019-03-23 Thread Axel Lin
Olliver Schinagl 於 2019年2月24日 週日 上午4:37寫道: > > On 23-02-2019 13:54, Axel Lin wrote: > >> I will not disagree that it may be extra work to look up the define > >> (especially if there is no tool tip or split view in the editor) but > >> reading the whole lot of code, with only the magic values,

Re: [PATCH] regulator: axp20x: Get rid of AXP20X_xxx_START/END/STEPS defines

2019-02-27 Thread Olliver Schinagl
On 27-02-2019 21:05, Mark Brown wrote: > On Wed, Feb 27, 2019 at 08:41:46PM +0100, Olliver Schinagl wrote: >> On 25-02-2019 18:25, Mark Brown wrote: >>> 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

Re: [PATCH] regulator: axp20x: Get rid of AXP20X_xxx_START/END/STEPS defines

2019-02-27 Thread Mark Brown
On Wed, Feb 27, 2019 at 08:41:46PM +0100, Olliver Schinagl wrote: > On 25-02-2019 18:25, Mark Brown wrote: > > 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

Re: [PATCH] regulator: axp20x: Get rid of AXP20X_xxx_START/END/STEPS defines

2019-02-27 Thread Olliver Schinagl
On 25-02-2019 18:25, Mark Brown wrote: > 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

Re: [PATCH] regulator: axp20x: Get rid of AXP20X_xxx_START/END/STEPS defines

2019-02-25 Thread Mark Brown
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

Re: [PATCH] regulator: axp20x: Get rid of AXP20X_xxx_START/END/STEPS defines

2019-02-23 Thread Olliver Schinagl
On 23-02-2019 13:54, Axel Lin wrote: >> I will not disagree that it may be extra work to look up the define >> (especially if there is no tool tip or split view in the editor) but >> reading the whole lot of code, with only the magic values, you still >> have to look up the meaning of each magic

Re: [PATCH] regulator: axp20x: Get rid of AXP20X_xxx_START/END/STEPS defines

2019-02-23 Thread Axel Lin
> I will not disagree that it may be extra work to look up the define > (especially if there is no tool tip or split view in the editor) but > reading the whole lot of code, with only the magic values, you still > have to look up the meaning of each magic value, have to guess which one > has the

Re: [PATCH] regulator: axp20x: Get rid of AXP20X_xxx_START/END/STEPS defines

2019-02-22 Thread Olliver Schinagl
On 21-02-2019 10:42, Mark Brown wrote: > On Thu, Feb 21, 2019 at 08:22:53AM +0800, Axel Lin wrote: >> Olliver Schinagl 於 2019年2月21日 週四 上午6:57寫道: >>> On February 20, 2019 5:50:13 PM GMT+01:00, Axel Lin >>> wrote: The AXP20X_xxx_START/END/STEPS defines make the code hard to read and

Re: [PATCH] regulator: axp20x: Get rid of AXP20X_xxx_START/END/STEPS defines

2019-02-21 Thread Mark Brown
On Thu, Feb 21, 2019 at 08:22:53AM +0800, Axel Lin wrote: > Olliver Schinagl 於 2019年2月21日 週四 上午6:57寫道: > > On February 20, 2019 5:50:13 PM GMT+01:00, Axel Lin > > wrote: > > >The AXP20X_xxx_START/END/STEPS defines make the code hard to read and > > >very hard to check the linear range settings

Re: [PATCH] regulator: axp20x: Get rid of AXP20X_xxx_START/END/STEPS defines

2019-02-20 Thread Axel Lin
Olliver Schinagl 於 2019年2月21日 週四 上午6:57寫道: > > Hey Axel, > > On February 20, 2019 5:50:13 PM GMT+01:00, Axel Lin > wrote: > >The AXP20X_xxx_START/END/STEPS defines make the code hard to read and > >very hard to check the linear range settings because it needs to check > >the defines one-by-one.

Re: [PATCH] regulator: axp20x: Get rid of AXP20X_xxx_START/END/STEPS defines

2019-02-20 Thread Olliver Schinagl
Hey Axel, On February 20, 2019 5:50:13 PM GMT+01:00, Axel Lin wrote: >The AXP20X_xxx_START/END/STEPS defines make the code hard to read and >very hard to check the linear range settings because it needs to check >the defines one-by-one. >The original code without the defines is very good in

[PATCH] regulator: axp20x: Get rid of AXP20X_xxx_START/END/STEPS defines

2019-02-20 Thread Axel Lin
The AXP20X_xxx_START/END/STEPS defines make the code hard to read and very hard to check the linear range settings because it needs to check the defines one-by-one. The original code without the defines is very good in readability as the meaning of each field of REGULATOR_LINEAR_RANGE is clear. So