Re: [PATCH net v2] net: fec: add a check for CONFIG_PM to avoid clock count mis-match

From: David Miller
Date: Fri Nov 15 2019 - 15:10:59 EST


From: Chuhong Yuan <hslester96@xxxxxxxxx>
Date: Tue, 12 Nov 2019 19:28:30 +0800

> If CONFIG_PM is enabled, runtime pm will work and call runtime_suspend
> automatically to disable clks.
> Therefore, remove only needs to disable clks when CONFIG_PM is disabled.
> Add this check to avoid clock count mis-match caused by double-disable.
>
> Fixes: c43eab3eddb4 ("net: fec: add missed clk_disable_unprepare in remove")
> Signed-off-by: Chuhong Yuan <hslester96@xxxxxxxxx>

Your explanation in your reply to my feedback still doesn't explain the
situation to me.

For every clock enable done during probe, there must be a matching clock
disable during remove.

Period.

There is no CONFIG_PM guarding the clock enables during probe in this driver,
therefore there should be no reason to require CONFIG_PM guards to the clock
disables during the remove method,

You have to explain clearly, and in detail, why my logic and analysis of this
situation is not correct.

And when you do so, you will need to add those important details to
the commit message of this change and submit a v3.

Thank you.