Skip to content

Commit 5409e0c

Browse files
ChenTaogregkh
authored andcommitted
interconnect: qcom: Move the static keyword to the front of declaration
Fix the following warning: Move the static keyword to the front of declaration of sdm845_icc_osm_l3 sdm845_aggre1_noc sc7180_icc_osm_l3 sdm845_aggre2_noc sdm845_config_noc sdm845_dc_noc sdm845_gladiator_noc sdm845_mem_noc sdm845_mmss_noc and sdm845_system_noc, resolve the following compiler warning that can be when building with warnings enabled (W=1): drivers/interconnect/qcom/osm-l3.c:81:1: warning: const static struct qcom_icc_desc sdm845_icc_osm_l3 = { drivers/interconnect/qcom/osm-l3.c:94:1: warning: const static struct qcom_icc_desc sc7180_icc_osm_l3 = { drivers/interconnect/qcom/sdm845.c:195:1: warning: const static struct qcom_icc_desc sdm845_aggre1_noc = { drivers/interconnect/qcom/sdm845.c:223:1: warning: const static struct qcom_icc_desc sdm845_aggre2_noc = { drivers/interconnect/qcom/sdm845.c:284:1: warning: const static struct qcom_icc_desc sdm845_config_noc = { drivers/interconnect/qcom/sdm845.c:300:1: warning: const static struct qcom_icc_desc sdm845_dc_noc = { drivers/interconnect/qcom/sdm845.c:318:1: warning: const static struct qcom_icc_desc sdm845_gladiator_noc = { drivers/interconnect/qcom/sdm845.c:353:1: warning: const static struct qcom_icc_desc sdm845_mem_noc = { drivers/interconnect/qcom/sdm845.c:387:1: warning: const static struct qcom_icc_desc sdm845_mmss_noc = { drivers/interconnect/qcom/sdm845.c:433:1: warning: const static struct qcom_icc_desc sdm845_system_noc = { Reported-by: Hulk Robot <[email protected]> Signed-off-by: ChenTao <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Georgi Djakov <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Greg Kroah-Hartman <[email protected]>
1 parent 5e56bc0 commit 5409e0c

File tree

2 files changed

+10
-10
lines changed

2 files changed

+10
-10
lines changed

drivers/interconnect/qcom/osm-l3.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ static struct qcom_icc_node *sdm845_osm_l3_nodes[] = {
7878
[SLAVE_OSM_L3] = &sdm845_osm_l3,
7979
};
8080

81-
const static struct qcom_icc_desc sdm845_icc_osm_l3 = {
81+
static const struct qcom_icc_desc sdm845_icc_osm_l3 = {
8282
.nodes = sdm845_osm_l3_nodes,
8383
.num_nodes = ARRAY_SIZE(sdm845_osm_l3_nodes),
8484
};
@@ -91,7 +91,7 @@ static struct qcom_icc_node *sc7180_osm_l3_nodes[] = {
9191
[SLAVE_OSM_L3] = &sc7180_osm_l3,
9292
};
9393

94-
const static struct qcom_icc_desc sc7180_icc_osm_l3 = {
94+
static const struct qcom_icc_desc sc7180_icc_osm_l3 = {
9595
.nodes = sc7180_osm_l3_nodes,
9696
.num_nodes = ARRAY_SIZE(sc7180_osm_l3_nodes),
9797
};

drivers/interconnect/qcom/sdm845.c

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -192,7 +192,7 @@ static struct qcom_icc_node *aggre1_noc_nodes[] = {
192192
[SLAVE_ANOC_PCIE_A1NOC_SNOC] = &qns_pcie_a1noc_snoc,
193193
};
194194

195-
const static struct qcom_icc_desc sdm845_aggre1_noc = {
195+
static const struct qcom_icc_desc sdm845_aggre1_noc = {
196196
.nodes = aggre1_noc_nodes,
197197
.num_nodes = ARRAY_SIZE(aggre1_noc_nodes),
198198
.bcms = aggre1_noc_bcms,
@@ -220,7 +220,7 @@ static struct qcom_icc_node *aggre2_noc_nodes[] = {
220220
[SLAVE_SERVICE_A2NOC] = &srvc_aggre2_noc,
221221
};
222222

223-
const static struct qcom_icc_desc sdm845_aggre2_noc = {
223+
static const struct qcom_icc_desc sdm845_aggre2_noc = {
224224
.nodes = aggre2_noc_nodes,
225225
.num_nodes = ARRAY_SIZE(aggre2_noc_nodes),
226226
.bcms = aggre2_noc_bcms,
@@ -281,7 +281,7 @@ static struct qcom_icc_node *config_noc_nodes[] = {
281281
[SLAVE_SERVICE_CNOC] = &srvc_cnoc,
282282
};
283283

284-
const static struct qcom_icc_desc sdm845_config_noc = {
284+
static const struct qcom_icc_desc sdm845_config_noc = {
285285
.nodes = config_noc_nodes,
286286
.num_nodes = ARRAY_SIZE(config_noc_nodes),
287287
.bcms = config_noc_bcms,
@@ -297,7 +297,7 @@ static struct qcom_icc_node *dc_noc_nodes[] = {
297297
[SLAVE_MEM_NOC_CFG] = &qhs_memnoc,
298298
};
299299

300-
const static struct qcom_icc_desc sdm845_dc_noc = {
300+
static const struct qcom_icc_desc sdm845_dc_noc = {
301301
.nodes = dc_noc_nodes,
302302
.num_nodes = ARRAY_SIZE(dc_noc_nodes),
303303
.bcms = dc_noc_bcms,
@@ -315,7 +315,7 @@ static struct qcom_icc_node *gladiator_noc_nodes[] = {
315315
[SLAVE_SERVICE_GNOC] = &srvc_gnoc,
316316
};
317317

318-
const static struct qcom_icc_desc sdm845_gladiator_noc = {
318+
static const struct qcom_icc_desc sdm845_gladiator_noc = {
319319
.nodes = gladiator_noc_nodes,
320320
.num_nodes = ARRAY_SIZE(gladiator_noc_nodes),
321321
.bcms = gladiator_noc_bcms,
@@ -350,7 +350,7 @@ static struct qcom_icc_node *mem_noc_nodes[] = {
350350
[SLAVE_EBI1] = &ebi,
351351
};
352352

353-
const static struct qcom_icc_desc sdm845_mem_noc = {
353+
static const struct qcom_icc_desc sdm845_mem_noc = {
354354
.nodes = mem_noc_nodes,
355355
.num_nodes = ARRAY_SIZE(mem_noc_nodes),
356356
.bcms = mem_noc_bcms,
@@ -384,7 +384,7 @@ static struct qcom_icc_node *mmss_noc_nodes[] = {
384384
[SLAVE_CAMNOC_UNCOMP] = &qns_camnoc_uncomp,
385385
};
386386

387-
const static struct qcom_icc_desc sdm845_mmss_noc = {
387+
static const struct qcom_icc_desc sdm845_mmss_noc = {
388388
.nodes = mmss_noc_nodes,
389389
.num_nodes = ARRAY_SIZE(mmss_noc_nodes),
390390
.bcms = mmss_noc_bcms,
@@ -430,7 +430,7 @@ static struct qcom_icc_node *system_noc_nodes[] = {
430430
[SLAVE_TCU] = &xs_sys_tcu_cfg,
431431
};
432432

433-
const static struct qcom_icc_desc sdm845_system_noc = {
433+
static const struct qcom_icc_desc sdm845_system_noc = {
434434
.nodes = system_noc_nodes,
435435
.num_nodes = ARRAY_SIZE(system_noc_nodes),
436436
.bcms = system_noc_bcms,

0 commit comments

Comments
 (0)