diff options
author | Dong Aisheng <aisheng.dong@nxp.com> | 2018-01-23 07:24:45 -0500 |
---|---|---|
committer | Stephen Boyd <sboyd@kernel.org> | 2018-03-16 18:45:51 -0400 |
commit | 6e0d4ff4580c1272f4e4860bf22841ef31fd31ba (patch) | |
tree | f71b40d9ec5a479fd9ed730b83e2698b5e73a1bf | |
parent | 7928b2cbe55b2a410a0f5c1f154610059c57b1b2 (diff) |
clk: add more __must_check for bulk APIs
we need it even when !CONFIG_HAVE_CLK because it allows
us to catch missing checking return values in the non-clk
compile configurations too. More test coverage.
Cc: Stephen Boyd <sboyd@codeaurora.org>
Suggested-by: Stephen Boyd <sboyd@codeaurora.org>
Signed-off-by: Dong Aisheng <aisheng.dong@nxp.com>
Signed-off-by: Stephen Boyd <sboyd@kernel.org>
-rw-r--r-- | include/linux/clk.h | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/include/linux/clk.h b/include/linux/clk.h index 4c4ef9f34db3..0dbd0885b2c2 100644 --- a/include/linux/clk.h +++ b/include/linux/clk.h | |||
@@ -209,7 +209,7 @@ static inline int clk_prepare(struct clk *clk) | |||
209 | return 0; | 209 | return 0; |
210 | } | 210 | } |
211 | 211 | ||
212 | static inline int clk_bulk_prepare(int num_clks, struct clk_bulk_data *clks) | 212 | static inline int __must_check clk_bulk_prepare(int num_clks, struct clk_bulk_data *clks) |
213 | { | 213 | { |
214 | might_sleep(); | 214 | might_sleep(); |
215 | return 0; | 215 | return 0; |
@@ -603,8 +603,8 @@ static inline struct clk *clk_get(struct device *dev, const char *id) | |||
603 | return NULL; | 603 | return NULL; |
604 | } | 604 | } |
605 | 605 | ||
606 | static inline int clk_bulk_get(struct device *dev, int num_clks, | 606 | static inline int __must_check clk_bulk_get(struct device *dev, int num_clks, |
607 | struct clk_bulk_data *clks) | 607 | struct clk_bulk_data *clks) |
608 | { | 608 | { |
609 | return 0; | 609 | return 0; |
610 | } | 610 | } |
@@ -614,8 +614,8 @@ static inline struct clk *devm_clk_get(struct device *dev, const char *id) | |||
614 | return NULL; | 614 | return NULL; |
615 | } | 615 | } |
616 | 616 | ||
617 | static inline int devm_clk_bulk_get(struct device *dev, int num_clks, | 617 | static inline int __must_check devm_clk_bulk_get(struct device *dev, int num_clks, |
618 | struct clk_bulk_data *clks) | 618 | struct clk_bulk_data *clks) |
619 | { | 619 | { |
620 | return 0; | 620 | return 0; |
621 | } | 621 | } |
@@ -645,7 +645,7 @@ static inline int clk_enable(struct clk *clk) | |||
645 | return 0; | 645 | return 0; |
646 | } | 646 | } |
647 | 647 | ||
648 | static inline int clk_bulk_enable(int num_clks, struct clk_bulk_data *clks) | 648 | static inline int __must_check clk_bulk_enable(int num_clks, struct clk_bulk_data *clks) |
649 | { | 649 | { |
650 | return 0; | 650 | return 0; |
651 | } | 651 | } |
@@ -719,8 +719,8 @@ static inline void clk_disable_unprepare(struct clk *clk) | |||
719 | clk_unprepare(clk); | 719 | clk_unprepare(clk); |
720 | } | 720 | } |
721 | 721 | ||
722 | static inline int clk_bulk_prepare_enable(int num_clks, | 722 | static inline int __must_check clk_bulk_prepare_enable(int num_clks, |
723 | struct clk_bulk_data *clks) | 723 | struct clk_bulk_data *clks) |
724 | { | 724 | { |
725 | int ret; | 725 | int ret; |
726 | 726 | ||