From: Breno Leitao Date: Mon, 22 Oct 2018 14:54:12 +0000 (-0300) Subject: powerpc/64s: Include cpu header X-Git-Tag: archive/raspbian/5.2.17-1+rpi1^2^2^2^2^2~40 X-Git-Url: https://dgit.raspbian.org/?a=commitdiff_plain;h=a4d4afb56daba4f482168db978eb077137c4dd48;p=linux.git powerpc/64s: Include cpu header Current powerpc security.c file is defining functions, as cpu_show_meltdown(), cpu_show_spectre_v{1,2} and others, that are being declared at linux/cpu.h header without including the header file that contains these declarations. This is being reported by sparse, which thinks that these functions are static, due to the lack of declaration: arch/powerpc/kernel/security.c:105:9: warning: symbol 'cpu_show_meltdown' was not declared. Should it be static? arch/powerpc/kernel/security.c:139:9: warning: symbol 'cpu_show_spectre_v1' was not declared. Should it be static? arch/powerpc/kernel/security.c:161:9: warning: symbol 'cpu_show_spectre_v2' was not declared. Should it be static? arch/powerpc/kernel/security.c:209:6: warning: symbol 'stf_barrier' was not declared. Should it be static? arch/powerpc/kernel/security.c:289:9: warning: symbol 'cpu_show_spec_store_bypass' was not declared. Should it be static? This patch simply includes the proper header (linux/cpu.h) to match function definition and declaration. Signed-off-by: Breno Leitao Signed-off-by: Michael Ellerman Gbp-Pq: Topic bugfix/all/spec Gbp-Pq: Name powerpc-64s-include-cpu-header.patch --- diff --git a/arch/powerpc/kernel/security.c b/arch/powerpc/kernel/security.c index 4ccbf611a3c..70568ccbd9f 100644 --- a/arch/powerpc/kernel/security.c +++ b/arch/powerpc/kernel/security.c @@ -4,6 +4,7 @@ // // Copyright 2018, Michael Ellerman, IBM Corporation. +#include #include #include #include