mirror of
https://github.com/Fishwaldo/Star64_linux.git
synced 2025-03-17 20:54:10 +00:00
psci: Fix the function type for psci_initcall_t
Functions called through a psci_initcall_t pointer all have non-const arguments. Fix the type definition to avoid tripping indirect call checks with CFI_CLANG. Suggested-by: Mark Rutland <mark.rutland@arm.com> Signed-off-by: Sami Tolvanen <samitolvanen@google.com> Reviewed-by: Kees Cook <keescook@chromium.org> Tested-by: Kees Cook <keescook@chromium.org> Tested-by: Nathan Chancellor <nathan@kernel.org> Acked-by: Peter Zijlstra (Intel) <peterz@infradead.org> Tested-by: Peter Zijlstra (Intel) <peterz@infradead.org> Signed-off-by: Kees Cook <keescook@chromium.org> Link: https://lore.kernel.org/r/20220908215504.3686827-9-samitolvanen@google.com
This commit is contained in:
parent
cf90d03835
commit
44f665b69c
1 changed files with 4 additions and 4 deletions
|
@ -274,7 +274,7 @@ static void set_conduit(enum arm_smccc_conduit conduit)
|
||||||
psci_conduit = conduit;
|
psci_conduit = conduit;
|
||||||
}
|
}
|
||||||
|
|
||||||
static int get_set_conduit_method(struct device_node *np)
|
static int get_set_conduit_method(const struct device_node *np)
|
||||||
{
|
{
|
||||||
const char *method;
|
const char *method;
|
||||||
|
|
||||||
|
@ -528,7 +528,7 @@ typedef int (*psci_initcall_t)(const struct device_node *);
|
||||||
*
|
*
|
||||||
* Probe based on PSCI PSCI_VERSION function
|
* Probe based on PSCI PSCI_VERSION function
|
||||||
*/
|
*/
|
||||||
static int __init psci_0_2_init(struct device_node *np)
|
static int __init psci_0_2_init(const struct device_node *np)
|
||||||
{
|
{
|
||||||
int err;
|
int err;
|
||||||
|
|
||||||
|
@ -549,7 +549,7 @@ static int __init psci_0_2_init(struct device_node *np)
|
||||||
/*
|
/*
|
||||||
* PSCI < v0.2 get PSCI Function IDs via DT.
|
* PSCI < v0.2 get PSCI Function IDs via DT.
|
||||||
*/
|
*/
|
||||||
static int __init psci_0_1_init(struct device_node *np)
|
static int __init psci_0_1_init(const struct device_node *np)
|
||||||
{
|
{
|
||||||
u32 id;
|
u32 id;
|
||||||
int err;
|
int err;
|
||||||
|
@ -585,7 +585,7 @@ static int __init psci_0_1_init(struct device_node *np)
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
static int __init psci_1_0_init(struct device_node *np)
|
static int __init psci_1_0_init(const struct device_node *np)
|
||||||
{
|
{
|
||||||
int err;
|
int err;
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue