From: Adrian Bunk <bunk@stusta.de>
To: David Rientjes <rientjes@cs.washington.edu>
Cc: d binderman <dcb314@hotmail.com>,
"H. Peter Anvin" <hpa@zytor.com>,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH] i386 msr: remove unused variable
Date: Tue, 21 Nov 2006 22:00:29 +0100 [thread overview]
Message-ID: <20061121210029.GO5200@stusta.de> (raw)
In-Reply-To: <Pine.LNX.4.64N.0611211225300.25455@attu4.cs.washington.edu>
On Tue, Nov 21, 2006 at 12:27:22PM -0800, David Rientjes wrote:
> 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>
> ---
> 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
next prev parent reply other threads:[~2006-11-21 21:00 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-11-21 19:43 arch/i386/kernel/msr.c(198): remark #593: variable "rv" was set but never used d binderman
2006-11-21 20:27 ` [PATCH] i386 msr: remove unused variable David Rientjes
2006-11-21 21:00 ` Adrian Bunk [this message]
2006-11-21 21:03 ` David Rientjes
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20061121210029.GO5200@stusta.de \
--to=bunk@stusta.de \
--cc=dcb314@hotmail.com \
--cc=hpa@zytor.com \
--cc=linux-kernel@vger.kernel.org \
--cc=rientjes@cs.washington.edu \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®