Skip to content

Commit

Permalink
x86: microcode: fix sparse warnings
Browse files Browse the repository at this point in the history
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>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
  • Loading branch information
Hannes Eder authored and Ingo Molnar committed Nov 26, 2008
1 parent e951e4a commit 4db646b
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions arch/x86/kernel/microcode_core.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down Expand Up @@ -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,
Expand Down Expand Up @@ -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;
Expand Down
2 changes: 1 addition & 1 deletion arch/x86/kernel/microcode_intel.c
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down

0 comments on commit 4db646b

Please sign in to comment.