Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit f475ff35 authored by David Rientjes's avatar David Rientjes Committed by Andi Kleen
Browse files

[PATCH] x86-64: remove unused variable



Remove unused variable in msr_write().

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

Cc: H. Peter Anvin <hpa@zytor.com>
Signed-off-by: default avatarDavid Rientjes <rientjes@cs.washington.edu>
Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
Signed-off-by: default avatarAndi Kleen <ak@suse.de>
parent 9dc452ba
Loading
Loading
Loading
Loading
+1 −2
Original line number Original line Diff line number Diff line
@@ -195,7 +195,6 @@ static ssize_t msr_write(struct file *file, const char __user *buf,
{
{
	const u32 __user *tmp = (const u32 __user *)buf;
	const u32 __user *tmp = (const u32 __user *)buf;
	u32 data[2];
	u32 data[2];
	size_t rv;
	u32 reg = *ppos;
	u32 reg = *ppos;
	int cpu = iminor(file->f_dentry->d_inode);
	int cpu = iminor(file->f_dentry->d_inode);
	int err;
	int err;
@@ -203,7 +202,7 @@ static ssize_t msr_write(struct file *file, const char __user *buf,
	if (count % 8)
	if (count % 8)
		return -EINVAL;	/* Invalid chunk size */
		return -EINVAL;	/* Invalid chunk size */


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