* [PATCH] x86: microcode: fix sparse warnings
@ 2008-11-23 19:49 Hannes Eder
2008-11-26 7:49 ` Ingo Molnar
0 siblings, 1 reply; 2+ messages in thread
From: Hannes Eder @ 2008-11-23 19:49 UTC (permalink / raw)
To: Ingo Molnar, linux-kernel, kernel-janitors
Impact: make global variables and a function static
Fix following sparse warnings:
arch/x86/kernel/microcode_core.c:102:22: warning: symbol
'microcode_ops' was not declared. Should it be static?
arch/x86/kernel/microcode_core.c:206:24: warning: symbol
'microcode_pdev' was not declared. Should it be static?
arch/x86/kernel/microcode_core.c:322:6: warning: symbol
'microcode_update_cpu' was not declared. Should it be static?
arch/x86/kernel/microcode_intel.c:468:22: warning: symbol
'microcode_intel_ops' was not declared. Should it be static?
Signed-off-by: Hannes Eder <hannes@hanneseder.net>
---
Last patch for tonight ;-)
Best
Hannes
arch/x86/kernel/microcode_core.c | 6 +++---
arch/x86/kernel/microcode_intel.c | 2 +-
2 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/arch/x86/kernel/microcode_core.c b/arch/x86/kernel/microcode_core.c
index 82fb280..5b711a5 100644
--- a/arch/x86/kernel/microcode_core.c
+++ b/arch/x86/kernel/microcode_core.c
@@ -99,7 +99,7 @@ MODULE_LICENSE("GPL");
#define MICROCODE_VERSION "2.00"
-struct microcode_ops *microcode_ops;
+static struct microcode_ops *microcode_ops;
/* no concurrent ->write()s are allowed on /dev/cpu/microcode */
static DEFINE_MUTEX(microcode_mutex);
@@ -203,7 +203,7 @@ MODULE_ALIAS_MISCDEV(MICROCODE_MINOR);
#endif
/* fake device for request_firmware */
-struct platform_device *microcode_pdev;
+static struct platform_device *microcode_pdev;
static ssize_t reload_store(struct sys_device *dev,
struct sysdev_attribute *attr,
@@ -319,7 +319,7 @@ static int microcode_resume_cpu(int cpu)
return 0;
}
-void microcode_update_cpu(int cpu)
+static void microcode_update_cpu(int cpu)
{
struct ucode_cpu_info *uci = ucode_cpu_info + cpu;
int err = 0;
diff --git a/arch/x86/kernel/microcode_intel.c
b/arch/x86/kernel/microcode_intel.c
index 622dc4a..c34c820 100644
--- a/arch/x86/kernel/microcode_intel.c
+++ b/arch/x86/kernel/microcode_intel.c
@@ -465,7 +465,7 @@ static void microcode_fini_cpu(int cpu)
uci->mc = NULL;
}
-struct microcode_ops microcode_intel_ops = {
+static struct microcode_ops microcode_intel_ops = {
.request_microcode_user = request_microcode_user,
.request_microcode_fw = request_microcode_fw,
.collect_cpu_info = collect_cpu_info,
^ permalink raw reply [flat|nested] 2+ messages in thread* Re: [PATCH] x86: microcode: fix sparse warnings
2008-11-23 19:49 [PATCH] x86: microcode: fix sparse warnings Hannes Eder
@ 2008-11-26 7:49 ` Ingo Molnar
0 siblings, 0 replies; 2+ messages in thread
From: Ingo Molnar @ 2008-11-26 7:49 UTC (permalink / raw)
To: Hannes Eder; +Cc: linux-kernel, kernel-janitors, the arch/x86 maintainers
* Hannes Eder <hannes@hanneseder.net> wrote:
> Impact: make global variables and a function static
>
> Fix following sparse warnings:
>
> arch/x86/kernel/microcode_core.c:102:22: warning: symbol
> 'microcode_ops' was not declared. Should it be static?
> arch/x86/kernel/microcode_core.c:206:24: warning: symbol
> 'microcode_pdev' was not declared. Should it be static?
> arch/x86/kernel/microcode_core.c:322:6: warning: symbol
> 'microcode_update_cpu' was not declared. Should it be static?
> arch/x86/kernel/microcode_intel.c:468:22: warning: symbol
> 'microcode_intel_ops' was not declared. Should it be static?
>
> Signed-off-by: Hannes Eder <hannes@hanneseder.net>
applied to tip/x86/sparse-fixes, thanks Hannes!
Ingo
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2008-11-26 7:49 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-11-23 19:49 [PATCH] x86: microcode: fix sparse warnings Hannes Eder
2008-11-26 7:49 ` Ingo Molnar
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®