From patchwork Wed Apr 27 13:11:52 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Krzysztof Kozlowski X-Patchwork-Id: 568713 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 61224C433F5 for ; Wed, 27 Apr 2022 13:12:30 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235549AbiD0NPi (ORCPT ); Wed, 27 Apr 2022 09:15:38 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46472 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235533AbiD0NPh (ORCPT ); Wed, 27 Apr 2022 09:15:37 -0400 Received: from mail-ed1-x530.google.com (mail-ed1-x530.google.com [IPv6:2a00:1450:4864:20::530]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 4BEC95FF31 for ; Wed, 27 Apr 2022 06:11:59 -0700 (PDT) Received: by mail-ed1-x530.google.com with SMTP id e23so1873262eda.11 for ; Wed, 27 Apr 2022 06:11:59 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=B6yWm7+Ar/4/8ayNYRDPQr7wAj2ROmSNoWWzHAVHw54=; b=ij/XleydR+SleEyXBjGFG/HQA1aEsJeShqUBA6BtP4LpAowu7b1m0FdAzyd8gU9LC2 +kMxCJbDAn6n30PjehDqb/meI9B5aGprQ6ijfY6vUlvdcvr3L2F0M3kTXgKaOi1Q8M+U AuObFWNrehCnSoAfkOf0bdKX4IocNMV5QpWKahUlvi0RshJpTxKngRu31/SND4JnDIuJ h5GZ0K4xsqbXE9iX+bMtHgKNA57TytK0qy+b7zmMwGpznu+SC80C/3m0BQXtQfxsojRQ vP8hP0yQ86olMlhPU0EhPh9Vmii6O4/P6R1O+nsKC+uQAQhajScG6ES+xCsNn74ZYs/P VuSg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=B6yWm7+Ar/4/8ayNYRDPQr7wAj2ROmSNoWWzHAVHw54=; b=HDWxpI6XehNDewfG7P04EwxthnHsMLDS327rc0/5I/pW7sRkoAWhLhVPhbgM7YYSTd 6kNnvjn9Lh/hyAA6G6gVEKX8J0+bhMDoi95UgnUIQEHvM7TLicbgCP7xMi/qFrYMaVg2 waQ2mz7KlT4vIOsx+9pPkfmJOLeRliYA6XbizE/7XovQigTDznbI9pByvRX5TZaI/fZA H8w5B3oODZD6RBjILocJzLSFgDrWaj56bfIGrxsGReczOA0TIiQhjVs/v7y510l4cqjV E3Zdyr3yFNGsqp/1WsrqQyizHPBtuKms8bq+i7EqnxAGmD/nkLQB3jGLXZhqntiFisCw ylHg== X-Gm-Message-State: AOAM531XWhXMbaJLQNa6gkoYnGnpqaw8+0qQiVC7BCw7Z2v20xTNHCU0 YXTbCkffB+tK5ejG8xm+pyyjeA== X-Google-Smtp-Source: ABdhPJz5+9LnLTZP1P6DGBG7H11HpFJTuxT+GgXeaAOHBUOkEJhdxgwd9iWi5Prh4Wh/wAEdmNl7iw== X-Received: by 2002:a05:6402:50d0:b0:423:f4a1:597d with SMTP id h16-20020a05640250d000b00423f4a1597dmr30107203edb.228.1651065117534; Wed, 27 Apr 2022 06:11:57 -0700 (PDT) Received: from localhost.localdomain (xdsl-188-155-176-92.adslplus.ch. [188.155.176.92]) by smtp.gmail.com with ESMTPSA id o23-20020a509b17000000b00425edfe72a3sm4881031edi.43.2022.04.27.06.11.56 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 27 Apr 2022 06:11:57 -0700 (PDT) From: Krzysztof Kozlowski To: Andy Gross , Bjorn Andersson , Georgi Djakov , linux-arm-msm@vger.kernel.org, linux-pm@vger.kernel.org, linux-kernel@vger.kernel.org Cc: Krzysztof Kozlowski Subject: [PATCH 1/3] interconnect: qcom: sc8280xp: constify qcom_icc_desc Date: Wed, 27 Apr 2022 15:11:52 +0200 Message-Id: <20220427131154.302581-1-krzysztof.kozlowski@linaro.org> X-Mailer: git-send-email 2.32.0 MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-pm@vger.kernel.org struct qcom_icc_desc is not modified so it can be made const for safety. Signed-off-by: Krzysztof Kozlowski --- drivers/interconnect/qcom/sc8280xp.c | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/drivers/interconnect/qcom/sc8280xp.c b/drivers/interconnect/qcom/sc8280xp.c index 07dae4043986..7e6967d7b4a7 100644 --- a/drivers/interconnect/qcom/sc8280xp.c +++ b/drivers/interconnect/qcom/sc8280xp.c @@ -2033,7 +2033,7 @@ static struct qcom_icc_node *aggre1_noc_nodes[] = { [SLAVE_SERVICE_A1NOC] = &srvc_aggre1_noc, }; -static struct qcom_icc_desc sc8280xp_aggre1_noc = { +static const struct qcom_icc_desc sc8280xp_aggre1_noc = { .nodes = aggre1_noc_nodes, .num_nodes = ARRAY_SIZE(aggre1_noc_nodes), .bcms = aggre1_noc_bcms, @@ -2069,7 +2069,7 @@ static struct qcom_icc_node *aggre2_noc_nodes[] = { [SLAVE_SERVICE_A2NOC] = &srvc_aggre2_noc, }; -static struct qcom_icc_desc sc8280xp_aggre2_noc = { +static const struct qcom_icc_desc sc8280xp_aggre2_noc = { .nodes = aggre2_noc_nodes, .num_nodes = ARRAY_SIZE(aggre2_noc_nodes), .bcms = aggre2_noc_bcms, @@ -2094,7 +2094,7 @@ static struct qcom_icc_node *clk_virt_nodes[] = { [SLAVE_QUP_CORE_2] = &qup2_core_slave, }; -static struct qcom_icc_desc sc8280xp_clk_virt = { +static const struct qcom_icc_desc sc8280xp_clk_virt = { .nodes = clk_virt_nodes, .num_nodes = ARRAY_SIZE(clk_virt_nodes), .bcms = clk_virt_bcms, @@ -2198,7 +2198,7 @@ static struct qcom_icc_node *config_noc_nodes[] = { [SLAVE_TCU] = &xs_sys_tcu_cfg, }; -static struct qcom_icc_desc sc8280xp_config_noc = { +static const struct qcom_icc_desc sc8280xp_config_noc = { .nodes = config_noc_nodes, .num_nodes = ARRAY_SIZE(config_noc_nodes), .bcms = config_noc_bcms, @@ -2214,7 +2214,7 @@ static struct qcom_icc_node *dc_noc_nodes[] = { [SLAVE_GEM_NOC_CFG] = &qns_gemnoc, }; -static struct qcom_icc_desc sc8280xp_dc_noc = { +static const struct qcom_icc_desc sc8280xp_dc_noc = { .nodes = dc_noc_nodes, .num_nodes = ARRAY_SIZE(dc_noc_nodes), .bcms = dc_noc_bcms, @@ -2248,7 +2248,7 @@ static struct qcom_icc_node *gem_noc_nodes[] = { [SLAVE_SERVICE_GEM_NOC] = &srvc_sys_gemnoc, }; -static struct qcom_icc_desc sc8280xp_gem_noc = { +static const struct qcom_icc_desc sc8280xp_gem_noc = { .nodes = gem_noc_nodes, .num_nodes = ARRAY_SIZE(gem_noc_nodes), .bcms = gem_noc_bcms, @@ -2271,7 +2271,7 @@ static struct qcom_icc_node *lpass_ag_noc_nodes[] = { [SLAVE_SERVICE_LPASS_AG_NOC] = &srvc_niu_lpass_agnoc, }; -static struct qcom_icc_desc sc8280xp_lpass_ag_noc = { +static const struct qcom_icc_desc sc8280xp_lpass_ag_noc = { .nodes = lpass_ag_noc_nodes, .num_nodes = ARRAY_SIZE(lpass_ag_noc_nodes), .bcms = lpass_ag_noc_bcms, @@ -2288,7 +2288,7 @@ static struct qcom_icc_node *mc_virt_nodes[] = { [SLAVE_EBI1] = &ebi, }; -static struct qcom_icc_desc sc8280xp_mc_virt = { +static const struct qcom_icc_desc sc8280xp_mc_virt = { .nodes = mc_virt_nodes, .num_nodes = ARRAY_SIZE(mc_virt_nodes), .bcms = mc_virt_bcms, @@ -2319,7 +2319,7 @@ static struct qcom_icc_node *mmss_noc_nodes[] = { [SLAVE_SERVICE_MNOC] = &srvc_mnoc, }; -static struct qcom_icc_desc sc8280xp_mmss_noc = { +static const struct qcom_icc_desc sc8280xp_mmss_noc = { .nodes = mmss_noc_nodes, .num_nodes = ARRAY_SIZE(mmss_noc_nodes), .bcms = mmss_noc_bcms, @@ -2339,7 +2339,7 @@ static struct qcom_icc_node *nspa_noc_nodes[] = { [SLAVE_SERVICE_NSP_NOC] = &service_nsp_noc, }; -static struct qcom_icc_desc sc8280xp_nspa_noc = { +static const struct qcom_icc_desc sc8280xp_nspa_noc = { .nodes = nspa_noc_nodes, .num_nodes = ARRAY_SIZE(nspa_noc_nodes), .bcms = nspa_noc_bcms, @@ -2359,7 +2359,7 @@ static struct qcom_icc_node *nspb_noc_nodes[] = { [SLAVE_SERVICE_NSPB_NOC] = &service_nspb_noc, }; -static struct qcom_icc_desc sc8280xp_nspb_noc = { +static const struct qcom_icc_desc sc8280xp_nspb_noc = { .nodes = nspb_noc_nodes, .num_nodes = ARRAY_SIZE(nspb_noc_nodes), .bcms = nspb_noc_bcms, @@ -2388,7 +2388,7 @@ static struct qcom_icc_node *system_noc_main_nodes[] = { [SLAVE_SERVICE_SNOC] = &srvc_snoc, }; -static struct qcom_icc_desc sc8280xp_system_noc_main = { +static const struct qcom_icc_desc sc8280xp_system_noc_main = { .nodes = system_noc_main_nodes, .num_nodes = ARRAY_SIZE(system_noc_main_nodes), .bcms = system_noc_main_bcms, From patchwork Wed Apr 27 13:11:53 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Krzysztof Kozlowski X-Patchwork-Id: 568712 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id C928CC4167B for ; Wed, 27 Apr 2022 13:12:34 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235613AbiD0NPn (ORCPT ); Wed, 27 Apr 2022 09:15:43 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46442 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235620AbiD0NPi (ORCPT ); Wed, 27 Apr 2022 09:15:38 -0400 Received: from mail-ej1-x630.google.com (mail-ej1-x630.google.com [IPv6:2a00:1450:4864:20::630]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 2F40E15C3B1 for ; Wed, 27 Apr 2022 06:12:00 -0700 (PDT) Received: by mail-ej1-x630.google.com with SMTP id r13so3319010ejd.5 for ; Wed, 27 Apr 2022 06:12:00 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=Zo30U2a3x9h8gZmVnKlzICGjV7EErdQKTWjBgF+XEsk=; b=enGbpjMNb0lU0hAevh127t9WQAvthP/Q1dK2zgs0wxhlwwIFvbgj5Cuu7QKBfxHl+T 2LDymhT9ZWmyx2XdDPs4YM9LcX5jsNW+YqktQtP6wuAVoGlNFdnp6oL+f7xKlCxiGVBw 5cECJlrL6DsG+Ek02hfGAJ66kPXL8MKGcGE0O/yR9bzjX6ci8bC2+naBcnej0Ob6bDzR RUX1AIGzIW7uFxhBZDiFtgJSCuasxH6RjUWYZxnKlhNoPWl3i0AXoJ6BLfCna0H1BVuB 3KDduRORx764x67bpD8wj8jFxWOolm9rpT5sVNsVz09ZwgYC+3+0xrgFTnfI18UTVMsd WmEA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=Zo30U2a3x9h8gZmVnKlzICGjV7EErdQKTWjBgF+XEsk=; b=4Fook88JYCxC/vwO4DoWcQ2toHHCUow/H45yRdU85ZEG/qFkWvXtRmdHV307MxkZaV iFOYvqhSrC2YA2aDtzeq+KLXzW+zuzb5s04VLSP59VrkmOjfEKsDp2XBdHFNLMfoHAky 8SBJxRB9JIeLzniOH6/50B8t4qScDb+PpMwwpA0dv1BTNqif77vGJeGNFtaEds5I0uwP idTRlQur0f1RRieCvMV5RRboUf8/vqPV1iZS60xAhX+oHLlCcNXGCFq/lppOYoJmlX7b 6ZQIREjWoyWccgW36gFLOopB/KWciJSdx2ZdME76uZbWsoOZMIJzu7qkYa3wqgQgn2Kv qnGg== X-Gm-Message-State: AOAM531GfRwjWmQP1HrPLTGkk5+b7n3wGGildptRrdssgUjzBRnASwnk Rt07mtM1Zaq+vMBvoHt0Q+0Z7g== X-Google-Smtp-Source: ABdhPJxTjNa8hRlOr0lMdgB81fJ3uKNVMzPZ/Tat4sDhuysmdYW4gHfjUpOTAYgrl0MP0Wx5lpeXJQ== X-Received: by 2002:a17:907:3e18:b0:6f3:6abc:a904 with SMTP id hp24-20020a1709073e1800b006f36abca904mr22192208ejc.341.1651065119149; Wed, 27 Apr 2022 06:11:59 -0700 (PDT) Received: from localhost.localdomain (xdsl-188-155-176-92.adslplus.ch. [188.155.176.92]) by smtp.gmail.com with ESMTPSA id o23-20020a509b17000000b00425edfe72a3sm4881031edi.43.2022.04.27.06.11.57 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 27 Apr 2022 06:11:58 -0700 (PDT) From: Krzysztof Kozlowski To: Andy Gross , Bjorn Andersson , Georgi Djakov , linux-arm-msm@vger.kernel.org, linux-pm@vger.kernel.org, linux-kernel@vger.kernel.org Cc: Krzysztof Kozlowski Subject: [PATCH 2/3] interconnect: qcom: sc8280xp: constify icc_node pointers Date: Wed, 27 Apr 2022 15:11:53 +0200 Message-Id: <20220427131154.302581-2-krzysztof.kozlowski@linaro.org> X-Mailer: git-send-email 2.32.0 In-Reply-To: <20220427131154.302581-1-krzysztof.kozlowski@linaro.org> References: <20220427131154.302581-1-krzysztof.kozlowski@linaro.org> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-pm@vger.kernel.org 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: Krzysztof Kozlowski --- drivers/interconnect/qcom/sc8280xp.c | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/drivers/interconnect/qcom/sc8280xp.c b/drivers/interconnect/qcom/sc8280xp.c index 7e6967d7b4a7..408f6ade29e4 100644 --- a/drivers/interconnect/qcom/sc8280xp.c +++ b/drivers/interconnect/qcom/sc8280xp.c @@ -2014,7 +2014,7 @@ static struct qcom_icc_bcm *aggre1_noc_bcms[] = { &bcm_sn5, }; -static struct qcom_icc_node *aggre1_noc_nodes[] = { +static struct qcom_icc_node * const aggre1_noc_nodes[] = { [MASTER_QSPI_0] = &qhm_qspi, [MASTER_QUP_1] = &qhm_qup1, [MASTER_QUP_2] = &qhm_qup2, @@ -2046,7 +2046,7 @@ static struct qcom_icc_bcm *aggre2_noc_bcms[] = { &bcm_sn4, }; -static struct qcom_icc_node *aggre2_noc_nodes[] = { +static struct qcom_icc_node * const aggre2_noc_nodes[] = { [MASTER_QDSS_BAM] = &qhm_qdss_bam, [MASTER_QUP_0] = &qhm_qup0, [MASTER_A2NOC_CFG] = &qnm_a2noc_cfg, @@ -2083,7 +2083,7 @@ static struct qcom_icc_bcm *clk_virt_bcms[] = { &bcm_qup2, }; -static struct qcom_icc_node *clk_virt_nodes[] = { +static struct qcom_icc_node * const clk_virt_nodes[] = { [MASTER_IPA_CORE] = &ipa_core_master, [MASTER_QUP_CORE_0] = &qup0_core_master, [MASTER_QUP_CORE_1] = &qup1_core_master, @@ -2110,7 +2110,7 @@ static struct qcom_icc_bcm *config_noc_bcms[] = { &bcm_sn10, }; -static struct qcom_icc_node *config_noc_nodes[] = { +static struct qcom_icc_node * const config_noc_nodes[] = { [MASTER_GEM_NOC_CNOC] = &qnm_gemnoc_cnoc, [MASTER_GEM_NOC_PCIE_SNOC] = &qnm_gemnoc_pcie, [SLAVE_AHB2PHY_0] = &qhs_ahb2phy0, @@ -2208,7 +2208,7 @@ static const struct qcom_icc_desc sc8280xp_config_noc = { static struct qcom_icc_bcm *dc_noc_bcms[] = { }; -static struct qcom_icc_node *dc_noc_nodes[] = { +static struct qcom_icc_node * const dc_noc_nodes[] = { [MASTER_CNOC_DC_NOC] = &qnm_cnoc_dc_noc, [SLAVE_LLCC_CFG] = &qhs_llcc, [SLAVE_GEM_NOC_CFG] = &qns_gemnoc, @@ -2226,7 +2226,7 @@ static struct qcom_icc_bcm *gem_noc_bcms[] = { &bcm_sh2, }; -static struct qcom_icc_node *gem_noc_nodes[] = { +static struct qcom_icc_node * const gem_noc_nodes[] = { [MASTER_GPU_TCU] = &alm_gpu_tcu, [MASTER_PCIE_TCU] = &alm_pcie_tcu, [MASTER_SYS_TCU] = &alm_sys_tcu, @@ -2259,7 +2259,7 @@ static struct qcom_icc_bcm *lpass_ag_noc_bcms[] = { &bcm_sn9, }; -static struct qcom_icc_node *lpass_ag_noc_nodes[] = { +static struct qcom_icc_node * const lpass_ag_noc_nodes[] = { [MASTER_CNOC_LPASS_AG_NOC] = &qhm_config_noc, [MASTER_LPASS_PROC] = &qxm_lpass_dsp, [SLAVE_LPASS_CORE_CFG] = &qhs_lpass_core, @@ -2283,7 +2283,7 @@ static struct qcom_icc_bcm *mc_virt_bcms[] = { &bcm_mc0, }; -static struct qcom_icc_node *mc_virt_nodes[] = { +static struct qcom_icc_node * const mc_virt_nodes[] = { [MASTER_LLCC] = &llcc_mc, [SLAVE_EBI1] = &ebi, }; @@ -2300,7 +2300,7 @@ static struct qcom_icc_bcm *mmss_noc_bcms[] = { &bcm_mm1, }; -static struct qcom_icc_node *mmss_noc_nodes[] = { +static struct qcom_icc_node * const mmss_noc_nodes[] = { [MASTER_CAMNOC_HF] = &qnm_camnoc_hf, [MASTER_MDP0] = &qnm_mdp0_0, [MASTER_MDP1] = &qnm_mdp0_1, @@ -2331,7 +2331,7 @@ static struct qcom_icc_bcm *nspa_noc_bcms[] = { &bcm_nsa1, }; -static struct qcom_icc_node *nspa_noc_nodes[] = { +static struct qcom_icc_node * const nspa_noc_nodes[] = { [MASTER_CDSP_NOC_CFG] = &qhm_nsp_noc_config, [MASTER_CDSP_PROC] = &qxm_nsp, [SLAVE_CDSP_MEM_NOC] = &qns_nsp_gemnoc, @@ -2351,7 +2351,7 @@ static struct qcom_icc_bcm *nspb_noc_bcms[] = { &bcm_nsb1, }; -static struct qcom_icc_node *nspb_noc_nodes[] = { +static struct qcom_icc_node * const nspb_noc_nodes[] = { [MASTER_CDSPB_NOC_CFG] = &qhm_nspb_noc_config, [MASTER_CDSP_PROC_B] = &qxm_nspb, [SLAVE_CDSPB_MEM_NOC] = &qns_nspb_gemnoc, @@ -2375,7 +2375,7 @@ static struct qcom_icc_bcm *system_noc_main_bcms[] = { &bcm_sn9, }; -static struct qcom_icc_node *system_noc_main_nodes[] = { +static struct qcom_icc_node * const system_noc_main_nodes[] = { [MASTER_A1NOC_SNOC] = &qnm_aggre1_noc, [MASTER_A2NOC_SNOC] = &qnm_aggre2_noc, [MASTER_USB_NOC_SNOC] = &qnm_aggre_usb_noc, From patchwork Wed Apr 27 13:11:54 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Krzysztof Kozlowski X-Patchwork-Id: 566990 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 394A4C43217 for ; Wed, 27 Apr 2022 13:12:33 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235641AbiD0NPk (ORCPT ); Wed, 27 Apr 2022 09:15:40 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46458 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235525AbiD0NPi (ORCPT ); Wed, 27 Apr 2022 09:15:38 -0400 Received: from mail-ed1-x52a.google.com (mail-ed1-x52a.google.com [IPv6:2a00:1450:4864:20::52a]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id F29D38230E for ; Wed, 27 Apr 2022 06:12:01 -0700 (PDT) Received: by mail-ed1-x52a.google.com with SMTP id k27so1894108edk.4 for ; Wed, 27 Apr 2022 06:12:01 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=wYkrJLy1p+XxvrhEEZ1IAgmat2NjMtZTka/mSSSQ/0U=; b=R7mvZDkphifKpD+Z3mHx+KUHUKCaGykfzTW6eMWM5uCsYpCIK6gl1s7xDyT7u64x9t rggEL21uN/Q5+jmrizztW9MZPNxfIYNfWlJypbO1CyrVFQCd7nkj438C7AloHHMekZaY Vj31PGqGQDIxviLNg2mhtmn67dp5f8V3jIZy56BBD5vj5K3KZRRLsmGxGPQLcdEiNzPm ipxa/NSj5juloOMHzxNhyK4OWqIGkWUqBlbEs4Ss2nmxeVpBS4cr5j2Vhc+y0LTrGwZ6 O6rI2O0EX7CbXl356TTkhUKqb0rWJ24hT3Uf2o6uWEne1jfXsPIl+9ufPCLwwmNKzkev y/+A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=wYkrJLy1p+XxvrhEEZ1IAgmat2NjMtZTka/mSSSQ/0U=; b=axny8FevJuXDosCuHfvCPt8CThbrp3YbI0zzs6hT95Sfns7v+CBYr3NpqHxn1R7bSh V3r5TFSKVLZfgnz4IqXOzLPWnIjvhdaSJfbdI3FaDLpPyXFlxpftvrA/9U0l/pjuh5Qk d4K6sAbmKtoATD8TtnHk3uXeYoVPPpMAa/nibErpjEDWvOyRvZUzLa3675CRRlE7x3Nx sI2N1b3F439Qb/LP8BsUgsLnU+WtwSVlPbflHL0JUlOhBTGLK67MWng8+owUvLpQvYFu OIh2nrskvK9lxFTjCzceN8UDXRpv0vYgZwfSMvYQwoxQ0iw3dwICCKvsuwvws3v3rkzm N7Tw== X-Gm-Message-State: AOAM532Nz04dq3yDqocmXRTlAWpJj1p2LSqdIJ8jUzG8aphOXKXW/MkG FzHZv6CmJAZrMNzf0sRRIqs47Q== X-Google-Smtp-Source: ABdhPJzgV11aeWdeaNi6wWDhLWIwyBsX5gRZgeIBu5ZKrL8bNbV72OnYm+daQTwpmatrZHODOLinyA== X-Received: by 2002:a05:6402:d05:b0:425:b5c8:faeb with SMTP id eb5-20020a0564020d0500b00425b5c8faebmr30177910edb.273.1651065120316; Wed, 27 Apr 2022 06:12:00 -0700 (PDT) Received: from localhost.localdomain (xdsl-188-155-176-92.adslplus.ch. [188.155.176.92]) by smtp.gmail.com with ESMTPSA id o23-20020a509b17000000b00425edfe72a3sm4881031edi.43.2022.04.27.06.11.59 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 27 Apr 2022 06:11:59 -0700 (PDT) From: Krzysztof Kozlowski To: Andy Gross , Bjorn Andersson , Georgi Djakov , linux-arm-msm@vger.kernel.org, linux-pm@vger.kernel.org, linux-kernel@vger.kernel.org Cc: Krzysztof Kozlowski Subject: [PATCH 3/3] interconnect: qcom: sc8280xp: constify qcom_icc_bcm pointers Date: Wed, 27 Apr 2022 15:11:54 +0200 Message-Id: <20220427131154.302581-3-krzysztof.kozlowski@linaro.org> X-Mailer: git-send-email 2.32.0 In-Reply-To: <20220427131154.302581-1-krzysztof.kozlowski@linaro.org> References: <20220427131154.302581-1-krzysztof.kozlowski@linaro.org> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-pm@vger.kernel.org Pointers to struct qcom_icc_bcm are not modified, so they can be made const for safety. The contents of struct qcom_icc_bcm must stay non-const. Signed-off-by: Krzysztof Kozlowski --- drivers/interconnect/qcom/sc8280xp.c | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/drivers/interconnect/qcom/sc8280xp.c b/drivers/interconnect/qcom/sc8280xp.c index 408f6ade29e4..507fe5f89791 100644 --- a/drivers/interconnect/qcom/sc8280xp.c +++ b/drivers/interconnect/qcom/sc8280xp.c @@ -2009,7 +2009,7 @@ static struct qcom_icc_bcm bcm_sn10 = { .nodes = { &xs_qdss_stm }, }; -static struct qcom_icc_bcm *aggre1_noc_bcms[] = { +static struct qcom_icc_bcm * const aggre1_noc_bcms[] = { &bcm_sn3, &bcm_sn5, }; @@ -2040,7 +2040,7 @@ static const struct qcom_icc_desc sc8280xp_aggre1_noc = { .num_bcms = ARRAY_SIZE(aggre1_noc_bcms), }; -static struct qcom_icc_bcm *aggre2_noc_bcms[] = { +static struct qcom_icc_bcm * const aggre2_noc_bcms[] = { &bcm_ce0, &bcm_pci0, &bcm_sn4, @@ -2076,7 +2076,7 @@ static const struct qcom_icc_desc sc8280xp_aggre2_noc = { .num_bcms = ARRAY_SIZE(aggre2_noc_bcms), }; -static struct qcom_icc_bcm *clk_virt_bcms[] = { +static struct qcom_icc_bcm * const clk_virt_bcms[] = { &bcm_ip0, &bcm_qup0, &bcm_qup1, @@ -2101,7 +2101,7 @@ static const struct qcom_icc_desc sc8280xp_clk_virt = { .num_bcms = ARRAY_SIZE(clk_virt_bcms), }; -static struct qcom_icc_bcm *config_noc_bcms[] = { +static struct qcom_icc_bcm * const config_noc_bcms[] = { &bcm_cn0, &bcm_cn1, &bcm_cn2, @@ -2205,7 +2205,7 @@ static const struct qcom_icc_desc sc8280xp_config_noc = { .num_bcms = ARRAY_SIZE(config_noc_bcms), }; -static struct qcom_icc_bcm *dc_noc_bcms[] = { +static struct qcom_icc_bcm * const dc_noc_bcms[] = { }; static struct qcom_icc_node * const dc_noc_nodes[] = { @@ -2221,7 +2221,7 @@ static const struct qcom_icc_desc sc8280xp_dc_noc = { .num_bcms = ARRAY_SIZE(dc_noc_bcms), }; -static struct qcom_icc_bcm *gem_noc_bcms[] = { +static struct qcom_icc_bcm * const gem_noc_bcms[] = { &bcm_sh0, &bcm_sh2, }; @@ -2255,7 +2255,7 @@ static const struct qcom_icc_desc sc8280xp_gem_noc = { .num_bcms = ARRAY_SIZE(gem_noc_bcms), }; -static struct qcom_icc_bcm *lpass_ag_noc_bcms[] = { +static struct qcom_icc_bcm * const lpass_ag_noc_bcms[] = { &bcm_sn9, }; @@ -2278,7 +2278,7 @@ static const struct qcom_icc_desc sc8280xp_lpass_ag_noc = { .num_bcms = ARRAY_SIZE(lpass_ag_noc_bcms), }; -static struct qcom_icc_bcm *mc_virt_bcms[] = { +static struct qcom_icc_bcm * const mc_virt_bcms[] = { &bcm_acv, &bcm_mc0, }; @@ -2295,7 +2295,7 @@ static const struct qcom_icc_desc sc8280xp_mc_virt = { .num_bcms = ARRAY_SIZE(mc_virt_bcms), }; -static struct qcom_icc_bcm *mmss_noc_bcms[] = { +static struct qcom_icc_bcm * const mmss_noc_bcms[] = { &bcm_mm0, &bcm_mm1, }; @@ -2326,7 +2326,7 @@ static const struct qcom_icc_desc sc8280xp_mmss_noc = { .num_bcms = ARRAY_SIZE(mmss_noc_bcms), }; -static struct qcom_icc_bcm *nspa_noc_bcms[] = { +static struct qcom_icc_bcm * const nspa_noc_bcms[] = { &bcm_nsa0, &bcm_nsa1, }; @@ -2346,7 +2346,7 @@ static const struct qcom_icc_desc sc8280xp_nspa_noc = { .num_bcms = ARRAY_SIZE(nspa_noc_bcms), }; -static struct qcom_icc_bcm *nspb_noc_bcms[] = { +static struct qcom_icc_bcm * const nspb_noc_bcms[] = { &bcm_nsb0, &bcm_nsb1, }; @@ -2366,7 +2366,7 @@ static const struct qcom_icc_desc sc8280xp_nspb_noc = { .num_bcms = ARRAY_SIZE(nspb_noc_bcms), }; -static struct qcom_icc_bcm *system_noc_main_bcms[] = { +static struct qcom_icc_bcm * const system_noc_main_bcms[] = { &bcm_sn0, &bcm_sn1, &bcm_sn3,