Re: [PATCH v3 1/6] regulator: core: validate selector against linear_min_sel

2020-11-25 Thread Claudiu.Beznea
On 24.11.2020 15:41, Jon Hunter wrote: > EXTERNAL EMAIL: Do not click links or open attachments unless you know the > content is safe > > On 24/11/2020 11:14, claudiu.bez...@microchip.com wrote: > > ... > >> I would say that a solution would be to have a new helper to retrieve the >>

Re: [PATCH v3 1/6] regulator: core: validate selector against linear_min_sel

2020-11-24 Thread Mark Brown
On Tue, Nov 24, 2020 at 11:14:54AM +, claudiu.bez...@microchip.com wrote: > On 24.11.2020 11:36, Jon Hunter wrote: > > Before doing so, I wanted to ask if that is the correct fix here, > > because it seems a bit odd that regulator_count_voltages() returns N > > voltages, but if the min

Re: [PATCH v3 1/6] regulator: core: validate selector against linear_min_sel

2020-11-24 Thread Jon Hunter
On 24/11/2020 11:14, claudiu.bez...@microchip.com wrote: ... > I would say that a solution would be to have a new helper to retrieve the > linear_min_sel (e.g. regulator_min_sel()) and use this for all the > consumers of regulator_list_voltage() and the other APIs that patch > "regulator:

Re: [PATCH v3 1/6] regulator: core: validate selector against linear_min_sel

2020-11-24 Thread Claudiu.Beznea
Hi Jon, On 24.11.2020 11:36, Jon Hunter wrote: > EXTERNAL EMAIL: Do not click links or open attachments unless you know the > content is safe > > On 13/11/2020 15:21, Claudiu Beznea wrote: >> There are regulators who's min selector is not zero. Selectors loops >> (looping b/w zero and

Re: [PATCH v3 1/6] regulator: core: validate selector against linear_min_sel

2020-11-24 Thread Jon Hunter
On 13/11/2020 15:21, Claudiu Beznea wrote: > There are regulators who's min selector is not zero. Selectors loops > (looping b/w zero and regulator::desc::n_voltages) might throw errors > because invalid selectors are used (lower than > regulator::desc::linear_min_sel). For this situations

[PATCH v3 1/6] regulator: core: validate selector against linear_min_sel

2020-11-13 Thread Claudiu Beznea
There are regulators who's min selector is not zero. Selectors loops (looping b/w zero and regulator::desc::n_voltages) might throw errors because invalid selectors are used (lower than regulator::desc::linear_min_sel). For this situations validate selectors against