clk: actions: Fix discarding const qualifier by 'container_of' macro
Subsystems (2)
PATCH 1/1 clk: actions: Fix discarding const qualifier by 'container_of' macro
Remove const qualifier from functions parameter because it was discarded when container_of was called. Received pointer had mutable access to it through received container.
Signed-off-by Adrian Barnaś <[email protected]>
--- drivers/clk/actions/owl-common.h | 2 +- drivers/clk/actions/owl-composite.h | 2 +- drivers/clk/actions/owl-divider.h | 2 +- drivers/clk/actions/owl-factor.h | 2 +- drivers/clk/actions/owl-gate.h | 2 +- drivers/clk/actions/owl-mux.h | 2 +- drivers/clk/actions/owl-pll.h | 2 +- 7 files changed, 7 insertions(+), 7 deletions(-)
drivers/clk/actions/owl-common.h +1 -1
@@ -32,7 +32,7 @@ struct owl_clk_desc { };static inline struct owl_clk_common * -hw_to_owl_clk_common (const struct clk_hw *hw) +hw_to_owl_clk_common (struct clk_hw *hw) { return container_of(hw, struct owl_clk_common, hw); }
drivers/clk/actions/owl-composite.h +1 -1
@@ -108,7 +108,7 @@ struct owl_composite { }, \ } -static inline struct owl_composite *hw_to_owl_comp (const struct clk_hw *hw) +static inline struct owl_composite *hw_to_owl_comp (struct clk_hw *hw) {struct owl_clk_common *common =hw_to_owl_clk_common (hw);
drivers/clk/actions/owl-divider.h +1 -1
@@ -49,7 +49,7 @@ struct owl_divider { }, \ } -static inline struct owl_divider *hw_to_owl_divider (const struct clk_hw *hw) +static inline struct owl_divider *hw_to_owl_divider (struct clk_hw *hw) {struct owl_clk_common *common =hw_to_owl_clk_common (hw);
drivers/clk/actions/owl-factor.h +1 -1
@@ -57,7 +57,7 @@ struct owl_factor {#define div_mask (d) ((1 << ((d)->width)) - 1) -static inline struct owl_factor *hw_to_owl_factor (const struct clk_hw *hw) +static inline struct owl_factor *hw_to_owl_factor (struct clk_hw *hw) {struct owl_clk_common *common =hw_to_owl_clk_common (hw);
drivers/clk/actions/owl-gate.h +1 -1
@@ -56,7 +56,7 @@ struct owl_gate { }, \ } \ -static inline struct owl_gate *hw_to_owl_gate (const struct clk_hw *hw) +static inline struct owl_gate *hw_to_owl_gate (struct clk_hw *hw) {struct owl_clk_common *common =hw_to_owl_clk_common (hw);
drivers/clk/actions/owl-mux.h +1 -1
@@ -44,7 +44,7 @@ struct owl_mux { }, \ } -static inline struct owl_mux *hw_to_owl_mux (const struct clk_hw *hw) +static inline struct owl_mux *hw_to_owl_mux (struct clk_hw *hw) {struct owl_clk_common *common =hw_to_owl_clk_common (hw);
drivers/clk/actions/owl-pll.h +1 -1
@@ -98,7 +98,7 @@ struct owl_pll {#define mul_mask (m) ((1 << ((m)->width)) - 1) -static inline struct owl_pll *hw_to_owl_pll (const struct clk_hw *hw) +static inline struct owl_pll *hw_to_owl_pll (struct clk_hw *hw) {struct owl_clk_common *common =hw_to_owl_clk_common (hw);
Signature · 1 line
2.51.1.821.gb6fe4d2222-goog
Quoting Adrian Barnaś (2025-10-28 08:20:11)
Quoted 6 lines
Remove const qualifier from functions parameter because it was discarded when
container_ofwas called. Received pointer had mutable access to it through received container.Signed-off-by Adrian Barnaś <[email protected]>---
Applied to clk-next