Skip to content

Commit 1749001

Browse files
abarnas-usysbebarino
authored andcommitted
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ś <abarnas@google.com> Signed-off-by: Stephen Boyd <sboyd@kernel.org>
1 parent 23b2d2f commit 1749001

7 files changed

Lines changed: 7 additions & 7 deletions

File tree

drivers/clk/actions/owl-common.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ struct owl_clk_desc {
3232
};
3333

3434
static inline struct owl_clk_common *
35-
hw_to_owl_clk_common(const struct clk_hw *hw)
35+
hw_to_owl_clk_common(struct clk_hw *hw)
3636
{
3737
return container_of(hw, struct owl_clk_common, hw);
3838
}

drivers/clk/actions/owl-composite.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,7 @@ struct owl_composite {
108108
}, \
109109
}
110110

111-
static inline struct owl_composite *hw_to_owl_comp(const struct clk_hw *hw)
111+
static inline struct owl_composite *hw_to_owl_comp(struct clk_hw *hw)
112112
{
113113
struct owl_clk_common *common = hw_to_owl_clk_common(hw);
114114

drivers/clk/actions/owl-divider.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ struct owl_divider {
4949
}, \
5050
}
5151

52-
static inline struct owl_divider *hw_to_owl_divider(const struct clk_hw *hw)
52+
static inline struct owl_divider *hw_to_owl_divider(struct clk_hw *hw)
5353
{
5454
struct owl_clk_common *common = hw_to_owl_clk_common(hw);
5555

drivers/clk/actions/owl-factor.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ struct owl_factor {
5757

5858
#define div_mask(d) ((1 << ((d)->width)) - 1)
5959

60-
static inline struct owl_factor *hw_to_owl_factor(const struct clk_hw *hw)
60+
static inline struct owl_factor *hw_to_owl_factor(struct clk_hw *hw)
6161
{
6262
struct owl_clk_common *common = hw_to_owl_clk_common(hw);
6363

drivers/clk/actions/owl-gate.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ struct owl_gate {
5656
}, \
5757
} \
5858

59-
static inline struct owl_gate *hw_to_owl_gate(const struct clk_hw *hw)
59+
static inline struct owl_gate *hw_to_owl_gate(struct clk_hw *hw)
6060
{
6161
struct owl_clk_common *common = hw_to_owl_clk_common(hw);
6262

drivers/clk/actions/owl-mux.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ struct owl_mux {
4444
}, \
4545
}
4646

47-
static inline struct owl_mux *hw_to_owl_mux(const struct clk_hw *hw)
47+
static inline struct owl_mux *hw_to_owl_mux(struct clk_hw *hw)
4848
{
4949
struct owl_clk_common *common = hw_to_owl_clk_common(hw);
5050

drivers/clk/actions/owl-pll.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,7 @@ struct owl_pll {
9898

9999
#define mul_mask(m) ((1 << ((m)->width)) - 1)
100100

101-
static inline struct owl_pll *hw_to_owl_pll(const struct clk_hw *hw)
101+
static inline struct owl_pll *hw_to_owl_pll(struct clk_hw *hw)
102102
{
103103
struct owl_clk_common *common = hw_to_owl_clk_common(hw);
104104

0 commit comments

Comments
 (0)