Skip to content

Commit

Permalink
[PATCH] x86-64: remove unused variable
Browse files Browse the repository at this point in the history
Remove unused variable in msr_write().

Reported by D Binderman <dcb314@hotmail.com>.

Cc: H. Peter Anvin <hpa@zytor.com>
Signed-off-by: David Rientjes <rientjes@cs.washington.edu>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Andi Kleen <ak@suse.de>
  • Loading branch information
David Rientjes authored and Andi Kleen committed Dec 7, 2006
1 parent 9dc452b commit f475ff3
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions arch/i386/kernel/msr.c
Original file line number Diff line number Diff line change
Expand Up @@ -195,15 +195,14 @@ static ssize_t msr_write(struct file *file, const char __user *buf,
{
const u32 __user *tmp = (const u32 __user *)buf;
u32 data[2];
size_t rv;
u32 reg = *ppos;
int cpu = iminor(file->f_dentry->d_inode);
int err;

if (count % 8)
return -EINVAL; /* Invalid chunk size */

for (rv = 0; count; count -= 8) {
for (; count; count -= 8) {
if (copy_from_user(&data, tmp, 8))
return -EFAULT;
err = do_wrmsr(cpu, reg, data[0], data[1]);
Expand Down

0 comments on commit f475ff3

Please sign in to comment.