All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] x86/cpu: Include missing header
@ 2022-09-22 20:00 Luciano Leão
  2022-09-26 15:21 ` [tip: x86/cleanups] x86/cpu: Include the header of init_ia32_feat_ctl()'s prototype tip-bot2 for Luciano Leão
  0 siblings, 1 reply; 2+ messages in thread
From: Luciano Leão @ 2022-09-22 20:00 UTC (permalink / raw)
  To: seanjc, bp, tglx
  Cc: linux-kernel, n, mairacanal, isabbasso, andrealmeid, Luciano Leão

Include the header containing the prototype of a global function,
solving the following warning:

 arch/x86/kernel/cpu/feat_ctl.c:112:6: warning: no previous prototype for
 'init_ia32_feat_ctl'
 [-Wmissing-prototypes]

This warning appeared after commit 5d5103595e9e5 ("x86/cpu: Reinitialize
IA32_FEAT_CTL MSR on BSP during wakeup") had moved function
init_ia32_feat_ctl()'s prototype from arch/x86/kernel/cpu/cpu.h to
arch/x86/include/asm/cpu.h.

Note that, before the commit mentioned above, header "cpu.h"
(arch/x86/kernel/cpu/cpu.h) was added by commit 0e79ad863df43 ("x86/cpu:
Fix a -Wmissing-prototypes warning for init_ia32_feat_ctl()")
solely to fix init_ia32_feat_ctl()'s missing prototype. So, header
"cpu.h" is no longer necessary.

Fixes: 5d5103595e9e5 ("x86/cpu: Reinitialize IA32_FEAT_CTL MSR on BSP during wakeup")
Reviewed-by: Nícolas F. R. A. Prado <n@nfraprado.net>
Signed-off-by: Luciano Leão <lucianorsleao@gmail.com>
---
 arch/x86/kernel/cpu/feat_ctl.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/x86/kernel/cpu/feat_ctl.c b/arch/x86/kernel/cpu/feat_ctl.c
index 993697e71854..03851240c3e3 100644
--- a/arch/x86/kernel/cpu/feat_ctl.c
+++ b/arch/x86/kernel/cpu/feat_ctl.c
@@ -1,11 +1,11 @@
 // SPDX-License-Identifier: GPL-2.0
 #include <linux/tboot.h>
 
+#include <asm/cpu.h>
 #include <asm/cpufeature.h>
 #include <asm/msr-index.h>
 #include <asm/processor.h>
 #include <asm/vmx.h>
-#include "cpu.h"
 
 #undef pr_fmt
 #define pr_fmt(fmt)	"x86/cpu: " fmt
-- 
2.30.2


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* [tip: x86/cleanups] x86/cpu: Include the header of init_ia32_feat_ctl()'s prototype
  2022-09-22 20:00 [PATCH] x86/cpu: Include missing header Luciano Leão
@ 2022-09-26 15:21 ` tip-bot2 for Luciano Leão
  0 siblings, 0 replies; 2+ messages in thread
From: tip-bot2 for Luciano Leão @ 2022-09-26 15:21 UTC (permalink / raw)
  To: linux-tip-commits; +Cc: lucianorsleao, Borislav Petkov, n, x86, linux-kernel

The following commit has been merged into the x86/cleanups branch of tip:

Commit-ID:     30ea703a38ef76ca119673cd8bdd05c6e068e2ac
Gitweb:        https://git.kernel.org/tip/30ea703a38ef76ca119673cd8bdd05c6e068e2ac
Author:        Luciano Leão <lucianorsleao@gmail.com>
AuthorDate:    Thu, 22 Sep 2022 17:00:54 -03:00
Committer:     Borislav Petkov <bp@suse.de>
CommitterDate: Mon, 26 Sep 2022 17:06:27 +02:00

x86/cpu: Include the header of init_ia32_feat_ctl()'s prototype

Include the header containing the prototype of init_ia32_feat_ctl(),
solving the following warning:

  $ make W=1 arch/x86/kernel/cpu/feat_ctl.o
  arch/x86/kernel/cpu/feat_ctl.c:112:6: warning: no previous prototype for ‘init_ia32_feat_ctl’ [-Wmissing-prototypes]
    112 | void init_ia32_feat_ctl(struct cpuinfo_x86 *c)

This warning appeared after commit

  5d5103595e9e5 ("x86/cpu: Reinitialize IA32_FEAT_CTL MSR on BSP during wakeup")

had moved the function init_ia32_feat_ctl()'s prototype from
arch/x86/kernel/cpu/cpu.h to arch/x86/include/asm/cpu.h.

Note that, before the commit mentioned above, the header include "cpu.h"
(arch/x86/kernel/cpu/cpu.h) was added by commit

  0e79ad863df43 ("x86/cpu: Fix a -Wmissing-prototypes warning for init_ia32_feat_ctl()")

solely to fix init_ia32_feat_ctl()'s missing prototype. So, the header
include "cpu.h" is no longer necessary.

  [ bp: Massage commit message. ]

Fixes: 5d5103595e9e5 ("x86/cpu: Reinitialize IA32_FEAT_CTL MSR on BSP during wakeup")
Signed-off-by: Luciano Leão <lucianorsleao@gmail.com>
Signed-off-by: Borislav Petkov <bp@suse.de>
Reviewed-by: Nícolas F. R. A. Prado <n@nfraprado.net>
Link: https://lore.kernel.org/r/20220922200053.1357470-1-lucianorsleao@gmail.com
---
 arch/x86/kernel/cpu/feat_ctl.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/x86/kernel/cpu/feat_ctl.c b/arch/x86/kernel/cpu/feat_ctl.c
index 993697e..0385124 100644
--- a/arch/x86/kernel/cpu/feat_ctl.c
+++ b/arch/x86/kernel/cpu/feat_ctl.c
@@ -1,11 +1,11 @@
 // SPDX-License-Identifier: GPL-2.0
 #include <linux/tboot.h>
 
+#include <asm/cpu.h>
 #include <asm/cpufeature.h>
 #include <asm/msr-index.h>
 #include <asm/processor.h>
 #include <asm/vmx.h>
-#include "cpu.h"
 
 #undef pr_fmt
 #define pr_fmt(fmt)	"x86/cpu: " fmt

^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2022-09-26 16:33 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-09-22 20:00 [PATCH] x86/cpu: Include missing header Luciano Leão
2022-09-26 15:21 ` [tip: x86/cleanups] x86/cpu: Include the header of init_ia32_feat_ctl()'s prototype tip-bot2 for Luciano Leão

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.