RE: [PATCH v3 1/2] clk:Fix divide-by-zero in divider_ro_round_rate_parent

2019-04-24 Thread Stephen Boyd
Quoting Nixiaoming (2019-04-24 08:31:23) > On Wed, Apr 24, 2019 at 6:52 AM Stephen Boyd wrote: > >Quoting nixiaoming (2019-03-30 06:54:50) > >> In the function divider_recalc_rate() The judgment of the return value of > >> _get_div() indicates that the return value of _get_div() can be 0. > > > >W

RE: [PATCH v3 1/2] clk:Fix divide-by-zero in divider_ro_round_rate_parent

2019-04-24 Thread Nixiaoming
On Wed, Apr 24, 2019 at 6:52 AM Stephen Boyd wrote: >Quoting nixiaoming (2019-03-30 06:54:50) >> In the function divider_recalc_rate() The judgment of the return value of >> _get_div() indicates that the return value of _get_div() can be 0. > >When does _get_div() return 0? It can't be CLK_DIVIDER

Re: [PATCH v3 1/2] clk:Fix divide-by-zero in divider_ro_round_rate_parent

2019-04-23 Thread Stephen Boyd
Quoting nixiaoming (2019-03-30 06:54:50) > In the function divider_recalc_rate() The judgment of the return value of > _get_div() indicates that the return value of _get_div() can be 0. When does _get_div() return 0? It can't be CLK_DIVIDER_MAX_AT_ZERO or CLK_DIVIDER_POWER_OF_TWO. I suppose it cou

[PATCH v3 1/2] clk:Fix divide-by-zero in divider_ro_round_rate_parent

2019-03-30 Thread nixiaoming
In the function divider_recalc_rate() The judgment of the return value of _get_div() indicates that the return value of _get_div() can be 0. In order to avoid the divide-by-zero error, add check for return value of _get_div() in the divider_ro_round_rate_parent() Signed-off-by: nixiaoming Reviewe