[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <tip-170a0bc3808909d8ea0f3f9c725c6565efe7f9c4@git.kernel.org>
Date: Wed, 7 Oct 2009 22:43:13 GMT
From: tip-bot for John Kacur <jkacur@...hat.com>
To: linux-tip-commits@...r.kernel.org
Cc: linux-kernel@...r.kernel.org, hpa@...or.com, mingo@...hat.com,
jkacur@...hat.com, tglx@...utronix.de
Subject: [tip:x86/cpu] x86, cpuid: Remove the bkl from cpuid_open()
Commit-ID: 170a0bc3808909d8ea0f3f9c725c6565efe7f9c4
Gitweb: http://git.kernel.org/tip/170a0bc3808909d8ea0f3f9c725c6565efe7f9c4
Author: John Kacur <jkacur@...hat.com>
AuthorDate: Wed, 7 Oct 2009 20:19:32 +0200
Committer: H. Peter Anvin <hpa@...or.com>
CommitDate: Wed, 7 Oct 2009 15:41:21 -0700
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@...hat.com>
LKML-Reference: <alpine.LFD.2.00.0910072016190.15183@...alhost.localdomain>
Signed-off-by: H. Peter Anvin <hpa@...or.com>
---
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 b07af88..ef69284 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)
struct cpuinfo_x86 *c;
int ret = 0;
- lock_kernel();
-
cpu = iminor(file->f_path.dentry->d_inode);
if (cpu >= nr_cpu_ids || !cpu_online(cpu)) {
ret = -ENXIO; /* No such CPU */
@@ -129,7 +127,6 @@ static int cpuid_open(struct inode *inode, struct file *file)
if (c->cpuid_level < 0)
ret = -EIO; /* CPUID not supported */
out:
- unlock_kernel();
return ret;
}
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists