diff options
author | John Kacur <jkacur@redhat.com> | 2009-10-07 14:19:32 -0400 |
---|---|---|
committer | H. Peter Anvin <hpa@zytor.com> | 2009-10-07 18:41:21 -0400 |
commit | 170a0bc3808909d8ea0f3f9c725c6565efe7f9c4 (patch) | |
tree | 9b685c6fdf3be7f4889790d607d8bc0c15c359a3 | |
parent | d6c304055b3cecd4ca865769ac7cea97a320727b (diff) |
x86, cpuid: Remove the bkl from cpuid_open()
Most of the variables are local to the function. It IS possible that
for struct cpuinfo_x86 *c c could point to the same area. However,
this is used read only.
Signed-off-by: John Kacur <jkacur@redhat.com>
LKML-Reference: <alpine.LFD.2.00.0910072016190.15183@localhost.localdomain>
Signed-off-by: H. Peter Anvin <hpa@zytor.com>
-rw-r--r-- | arch/x86/kernel/cpuid.c | 3 |
1 files changed, 0 insertions, 3 deletions
diff --git a/arch/x86/kernel/cpuid.c b/arch/x86/kernel/cpuid.c index b07af8861244..ef6928418c8f 100644 --- a/arch/x86/kernel/cpuid.c +++ b/arch/x86/kernel/cpuid.c | |||
@@ -118,8 +118,6 @@ static int cpuid_open(struct inode *inode, struct file *file) | |||
118 | struct cpuinfo_x86 *c; | 118 | struct cpuinfo_x86 *c; |
119 | int ret = 0; | 119 | int ret = 0; |
120 | 120 | ||
121 | lock_kernel(); | ||
122 | |||
123 | cpu = iminor(file->f_path.dentry->d_inode); | 121 | cpu = iminor(file->f_path.dentry->d_inode); |
124 | if (cpu >= nr_cpu_ids || !cpu_online(cpu)) { | 122 | if (cpu >= nr_cpu_ids || !cpu_online(cpu)) { |
125 | ret = -ENXIO; /* No such CPU */ | 123 | ret = -ENXIO; /* No such CPU */ |
@@ -129,7 +127,6 @@ static int cpuid_open(struct inode *inode, struct file *file) | |||
129 | if (c->cpuid_level < 0) | 127 | if (c->cpuid_level < 0) |
130 | ret = -EIO; /* CPUID not supported */ | 128 | ret = -EIO; /* CPUID not supported */ |
131 | out: | 129 | out: |
132 | unlock_kernel(); | ||
133 | return ret; | 130 | return ret; |
134 | } | 131 | } |
135 | 132 | ||