Feature #3608
open
145: Usage of clock functions
Added by Vladimir Gratinskiy about 12 years ago.
Updated almost 10 years ago.
Description
It is necessary to use functions from clk.h correctly. This rule checks usage of functions clk_get, clk_prepare, clk_enable, clk_disable, clk_unprepare, clk_put.
- functions must be in the correct order
- function clk_put mustn't get null pointer
Are any known bugs of this kind?
Commit 0afe0f1 at linux-stable fix that clk_put receives null pointer. Other commits I didn't find yet.
'clk_put mustn't get null pointer' is not actual requirement anymore.
The rule should be left to check correct usage of clk_ API (ordering, balancing, etc.), but it should not check for NULL pointers. So commit 0afe0f1 will be irrelevant to it.
- Status changed from New to Open
- Assignee changed from Vladimir Gratinskiy to Vadim Mutilin
Current rule implementation does not provide model for 'devm_clk_get', so it results into many false alarms.
Another not implemented yet function is 'clk_prepare'.
Also available in: Atom
PDF