Skip to content

Commit af65ec1

Browse files
krzkandersson
authored andcommitted
clk: qcom: constify static 'struct qcom_icc_hws_data'
Drivers and core code does not modify the file-scope static 'struct qcom_icc_hws_data', so it can be made const for code safety and readability. Signed-off-by: Krzysztof Kozlowski <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Bjorn Andersson <[email protected]>
1 parent b815ccf commit af65ec1

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

drivers/clk/qcom/common.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ struct qcom_cc_desc {
3535
size_t num_gdscs;
3636
struct clk_hw **clk_hws;
3737
size_t num_clk_hws;
38-
struct qcom_icc_hws_data *icc_hws;
38+
const struct qcom_icc_hws_data *icc_hws;
3939
size_t num_icc_hws;
4040
unsigned int icc_first_node_id;
4141
};

drivers/clk/qcom/gcc-ipq5332.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3622,7 +3622,7 @@ static const struct qcom_reset_map gcc_ipq5332_resets[] = {
36223622

36233623
#define IPQ_APPS_ID 5332 /* some unique value */
36243624

3625-
static struct qcom_icc_hws_data icc_ipq5332_hws[] = {
3625+
static const struct qcom_icc_hws_data icc_ipq5332_hws[] = {
36263626
{ MASTER_SNOC_PCIE3_1_M, SLAVE_SNOC_PCIE3_1_M, GCC_SNOC_PCIE3_1LANE_M_CLK },
36273627
{ MASTER_ANOC_PCIE3_1_S, SLAVE_ANOC_PCIE3_1_S, GCC_SNOC_PCIE3_1LANE_S_CLK },
36283628
{ MASTER_SNOC_PCIE3_2_M, SLAVE_SNOC_PCIE3_2_M, GCC_SNOC_PCIE3_2LANE_M_CLK },

drivers/clk/qcom/gcc-ipq9574.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4384,7 +4384,7 @@ static const struct qcom_reset_map gcc_ipq9574_resets[] = {
43844384

43854385
#define IPQ_APPS_ID 9574 /* some unique value */
43864386

4387-
static struct qcom_icc_hws_data icc_ipq9574_hws[] = {
4387+
static const struct qcom_icc_hws_data icc_ipq9574_hws[] = {
43884388
{ MASTER_ANOC_PCIE0, SLAVE_ANOC_PCIE0, GCC_ANOC_PCIE0_1LANE_M_CLK },
43894389
{ MASTER_SNOC_PCIE0, SLAVE_SNOC_PCIE0, GCC_SNOC_PCIE0_1LANE_S_CLK },
43904390
{ MASTER_ANOC_PCIE1, SLAVE_ANOC_PCIE1, GCC_ANOC_PCIE1_1LANE_M_CLK },

0 commit comments

Comments
 (0)