Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
adam.huang
Arm Trusted Firmware
Commits
64690e06
Commit
64690e06
authored
5 years ago
by
Paul Beesley
Committed by
TrustedFirmware Code Review
5 years ago
Browse files
Options
Download
Plain Diff
Merge "Coverity fix: Remove GGC ignore -Warray-bounds" into integration
parents
988cc820
41af0515
master
v2.5
v2.5-rc1
v2.5-rc0
v2.4
v2.4-rc2
v2.4-rc1
v2.4-rc0
v2.3
v2.3-rc2
v2.3-rc1
v2.3-rc0
v2.2
v2.2-rc2
v2.2-rc1
v2.2-rc0
arm_cca_v0.2
arm_cca_v0.1
No related merge requests found
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
lib/psci/psci_common.c
+11
-11
lib/psci/psci_common.c
with
11 additions
and
11 deletions
+11
-11
lib/psci/psci_common.c
View file @
64690e06
/*
* Copyright (c) 2013-201
8
, ARM Limited and Contributors. All rights reserved.
* Copyright (c) 2013-201
9
, ARM Limited and Contributors. All rights reserved.
*
* SPDX-License-Identifier: BSD-3-Clause
*/
...
...
@@ -198,21 +198,17 @@ static unsigned int get_power_on_target_pwrlvl(void)
/******************************************************************************
* Helper function to update the requested local power state array. This array
* does not store the requested state for the CPU power level. Hence an
* assertion is added to prevent us from accessing the
wrong index
.
* assertion is added to prevent us from accessing the
CPU power level
.
*****************************************************************************/
static
void
psci_set_req_local_pwr_state
(
unsigned
int
pwrlvl
,
unsigned
int
cpu_idx
,
plat_local_state_t
req_pwr_state
)
{
/*
* This should never happen, we have this here to avoid
* "array subscript is above array bounds" errors in GCC.
*/
assert
(
pwrlvl
>
PSCI_CPU_PWR_LVL
);
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Warray-bounds"
if
((
pwrlvl
>
PSCI_CPU_PWR_LVL
)
&&
(
pwrlvl
<=
PLAT_MAX_PWR_LVL
)
&&
(
cpu_idx
<
PLATFORM_CORE_COUNT
))
{
psci_req_local_pwr_states
[
pwrlvl
-
1U
][
cpu_idx
]
=
req_pwr_state
;
#pragma GCC diagnostic pop
}
}
/******************************************************************************
...
...
@@ -245,7 +241,11 @@ static plat_local_state_t *psci_get_req_local_pwr_states(unsigned int pwrlvl,
{
assert
(
pwrlvl
>
PSCI_CPU_PWR_LVL
);
if
((
pwrlvl
>
PSCI_CPU_PWR_LVL
)
&&
(
pwrlvl
<=
PLAT_MAX_PWR_LVL
)
&&
(
cpu_idx
<
PLATFORM_CORE_COUNT
))
{
return
&
psci_req_local_pwr_states
[
pwrlvl
-
1U
][
cpu_idx
];
}
else
return
NULL
;
}
/*
...
...
This diff is collapsed.
Click to expand it.
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment
Menu
Projects
Groups
Snippets
Help