Commit 2ccf33c0 authored by Krzysztof Kozlowski's avatar Krzysztof Kozlowski Committed by Georgi Djakov
Browse files

interconnect: qcom: constify icc_node pointers



Pointers to struct qcom_icc_node (and similar structures) are not
modified, so they can be made const for safety.  The contents of struct
qcom_icc_node must stay non-const.

Signed-off-by: default avatarKrzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Link: https://lore.kernel.org/r/20220412102623.227607-2-krzysztof.kozlowski@linaro.org


Signed-off-by: default avatarGeorgi Djakov <djakov@kernel.org>
parent 1625aaa3
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -301,7 +301,7 @@ int qnoc_probe(struct platform_device *pdev)
	const struct qcom_icc_desc *desc;
	struct icc_onecell_data *data;
	struct icc_provider *provider;
	struct qcom_icc_node **qnodes;
	struct qcom_icc_node * const *qnodes;
	struct qcom_icc_provider *qp;
	struct icc_node *node;
	size_t num_nodes, i;
+1 −1
Original line number Diff line number Diff line
@@ -81,7 +81,7 @@ struct qcom_icc_node {
};

struct qcom_icc_desc {
	struct qcom_icc_node **nodes;
	struct qcom_icc_node * const *nodes;
	size_t num_nodes;
	const char * const *clocks;
	size_t num_clocks;
+1 −1
Original line number Diff line number Diff line
@@ -189,7 +189,7 @@ int qcom_icc_rpmh_probe(struct platform_device *pdev)
	struct device *dev = &pdev->dev;
	struct icc_onecell_data *data;
	struct icc_provider *provider;
	struct qcom_icc_node **qnodes, *qn;
	struct qcom_icc_node * const *qnodes, *qn;
	struct qcom_icc_provider *qp;
	struct icc_node *node;
	size_t num_nodes, i, j;
+1 −1
Original line number Diff line number Diff line
@@ -112,7 +112,7 @@ struct qcom_icc_fabric {
};

struct qcom_icc_desc {
	struct qcom_icc_node **nodes;
	struct qcom_icc_node * const *nodes;
	size_t num_nodes;
	struct qcom_icc_bcm **bcms;
	size_t num_bcms;
+3 −3
Original line number Diff line number Diff line
@@ -1191,7 +1191,7 @@ static struct qcom_icc_node snoc_pcnoc_slv = {
	.links = snoc_pcnoc_slv_links,
};

static struct qcom_icc_node *msm8916_snoc_nodes[] = {
static struct qcom_icc_node * const msm8916_snoc_nodes[] = {
	[BIMC_SNOC_SLV] = &bimc_snoc_slv,
	[MASTER_JPEG] = &mas_jpeg,
	[MASTER_MDP_PORT0] = &mas_mdp,
@@ -1236,7 +1236,7 @@ static const struct qcom_icc_desc msm8916_snoc = {
	.qos_offset = 0x7000,
};

static struct qcom_icc_node *msm8916_bimc_nodes[] = {
static struct qcom_icc_node * const msm8916_bimc_nodes[] = {
	[BIMC_SNOC_MAS] = &bimc_snoc_mas,
	[MASTER_AMPSS_M0] = &mas_apss,
	[MASTER_GRAPHICS_3D] = &mas_gfx,
@@ -1264,7 +1264,7 @@ static const struct qcom_icc_desc msm8916_bimc = {
	.qos_offset = 0x8000,
};

static struct qcom_icc_node *msm8916_pcnoc_nodes[] = {
static struct qcom_icc_node * const msm8916_pcnoc_nodes[] = {
	[MASTER_BLSP_1] = &mas_blsp_1,
	[MASTER_DEHR] = &mas_dehr,
	[MASTER_LPASS] = &mas_audio,
Loading