]> www.infradead.org Git - users/jedix/linux-maple.git/commitdiff
clk: qcom: constify static 'struct qcom_icc_hws_data'
authorKrzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Thu, 5 Sep 2024 15:02:35 +0000 (17:02 +0200)
committerBjorn Andersson <andersson@kernel.org>
Sun, 6 Oct 2024 03:18:22 +0000 (22:18 -0500)
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 <krzysztof.kozlowski@linaro.org>
Link: https://lore.kernel.org/r/20240905150235.276345-1-krzysztof.kozlowski@linaro.org
Signed-off-by: Bjorn Andersson <andersson@kernel.org>
drivers/clk/qcom/common.h
drivers/clk/qcom/gcc-ipq5332.c
drivers/clk/qcom/gcc-ipq9574.c

index 7e57f8fe8ea6bc3eef7340b7bc8742302eaa8db1..7ace5d7f5836aa81431153ba92d8f14f2ffe8147 100644 (file)
@@ -35,7 +35,7 @@ struct qcom_cc_desc {
        size_t num_gdscs;
        struct clk_hw **clk_hws;
        size_t num_clk_hws;
-       struct qcom_icc_hws_data *icc_hws;
+       const struct qcom_icc_hws_data *icc_hws;
        size_t num_icc_hws;
        unsigned int icc_first_node_id;
 };
index 9536b2b7d07c2554df0db66e1e1bf550ac295c67..00c48478c8876bd4cd416d9b6a05f679c0c8c747 100644 (file)
@@ -3622,7 +3622,7 @@ static const struct qcom_reset_map gcc_ipq5332_resets[] = {
 
 #define IPQ_APPS_ID                    5332    /* some unique value */
 
-static struct qcom_icc_hws_data icc_ipq5332_hws[] = {
+static const struct qcom_icc_hws_data icc_ipq5332_hws[] = {
        { MASTER_SNOC_PCIE3_1_M, SLAVE_SNOC_PCIE3_1_M, GCC_SNOC_PCIE3_1LANE_M_CLK },
        { MASTER_ANOC_PCIE3_1_S, SLAVE_ANOC_PCIE3_1_S, GCC_SNOC_PCIE3_1LANE_S_CLK },
        { MASTER_SNOC_PCIE3_2_M, SLAVE_SNOC_PCIE3_2_M, GCC_SNOC_PCIE3_2LANE_M_CLK },
index 645109f75b46cd1f348564a8e084afc85702e139..0405a2473842040c188e6fdf05b52fab42abdd17 100644 (file)
@@ -4384,7 +4384,7 @@ static const struct qcom_reset_map gcc_ipq9574_resets[] = {
 
 #define IPQ_APPS_ID                    9574    /* some unique value */
 
-static struct qcom_icc_hws_data icc_ipq9574_hws[] = {
+static const struct qcom_icc_hws_data icc_ipq9574_hws[] = {
        { MASTER_ANOC_PCIE0, SLAVE_ANOC_PCIE0, GCC_ANOC_PCIE0_1LANE_M_CLK },
        { MASTER_SNOC_PCIE0, SLAVE_SNOC_PCIE0, GCC_SNOC_PCIE0_1LANE_S_CLK },
        { MASTER_ANOC_PCIE1, SLAVE_ANOC_PCIE1, GCC_ANOC_PCIE1_1LANE_M_CLK },