lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Tue, 21 Nov 2006 22:00:29 +0100
From:	Adrian Bunk <bunk@...sta.de>
To:	David Rientjes <rientjes@...washington.edu>
Cc:	d binderman <dcb314@...mail.com>, "H. Peter Anvin" <hpa@...or.com>,
	linux-kernel@...r.kernel.org
Subject: Re: [PATCH] i386 msr: remove unused variable

On Tue, Nov 21, 2006 at 12:27:22PM -0800, David Rientjes wrote:
> Remove unused variable in msr_write().
> 
> Reported by D Binderman <dcb314@...mail.com>.
> 
> Cc: H. Peter Anvin <hpa@...or.com>
> Signed-off-by: David Rientjes <rientjes@...washington.edu>
> ---
>  arch/i386/kernel/msr.c |    3 +--
>  1 files changed, 1 insertions(+), 2 deletions(-)
> 
> diff --git a/arch/i386/kernel/msr.c b/arch/i386/kernel/msr.c
> index d535cdb..331bd59 100644
> --- a/arch/i386/kernel/msr.c
> +++ b/arch/i386/kernel/msr.c
> @@ -195,7 +195,6 @@ static ssize_t msr_write(struct file *fi
>  {
>  	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;
> @@ -203,7 +202,7 @@ static ssize_t msr_write(struct file *fi
>  	if (count % 8)
>  		return -EINVAL;	/* Invalid chunk size */
>  
> -	for (rv = 0; count; count -= 8) {
> +	for (; count; count -= 8) {
>...

What about changing this to a while() loop?

cu
Adrian

-- 

       "Is there not promise of rain?" Ling Tan asked suddenly out
        of the darkness. There had been need of rain for many days.
       "Only a promise," Lao Er said.
                                       Pearl S. Buck - Dragon Seed

-
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