virtualization.lists.linux-foundation.org archive mirror
 help / color / mirror / Atom feed
From: Rusty Russell <rusty@rustcorp.com.au>
To: virtualization <virtualization@lists.osdl.org>
Cc: Andrew Morton <akpm@osdl.org>, Chris Wright <chrisw@sous-sol.org>
Subject: [PATCH] Fix 'arch/i386/kernel/alternative.c:355: warning: unused variable 'i''
Date: Sun, 05 Nov 2006 17:05:43 +1100	[thread overview]
Message-ID: <1162706743.29777.37.camel@localhost.localdomain> (raw)
In-Reply-To: <1162706575.29777.33.camel@localhost.localdomain>

Fix warning about "unused variable i" when CONFIG_PARAVIRT enabled and
CONFIG_DEBUG_PARAVIRT disabled.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>

diff -urpN --exclude TAGS -X /home/rusty/devel/kernel/kernel-patches/dontdiff --minimal linux-2.6.19-rc4-mm2/arch/i386/kernel/alternative.c working-2.6.19-rc4-mm2-warnings/arch/i386/kernel/alternative.c
--- linux-2.6.19-rc4-mm2/arch/i386/kernel/alternative.c	2006-11-05 15:35:24.000000000 +1100
+++ working-2.6.19-rc4-mm2-warnings/arch/i386/kernel/alternative.c	2006-11-05 16:04:38.000000000 +1100
@@ -352,7 +352,6 @@ void alternatives_smp_switch(int smp)
 void apply_paravirt(struct paravirt_patch *start, struct paravirt_patch *end)
 {
 	struct paravirt_patch *p;
-	int i;
 
 	for (p = start; p < end; p++) {
 		unsigned int used;
@@ -360,6 +359,8 @@ void apply_paravirt(struct paravirt_patc
 		used = paravirt_ops.patch(p->instrtype, p->clobbers, p->instr,
 					  p->len);
 #ifdef CONFIG_DEBUG_PARAVIRT
+		{
+		int i;
 		/* Deliberately clobber regs using "not %reg" to find bugs. */
 		for (i = 0; i < 3; i++) {
 			if (p->len - used >= 2 && (p->clobbers & (1 << i))) {
@@ -368,6 +369,7 @@ void apply_paravirt(struct paravirt_patc
 				used += 2;
 			}
 		}
+		}
 #endif
 		/* Pad the rest with nops */
 		nop_out(p->instr + used, p->len - used);

      reply	other threads:[~2006-11-05  6:05 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-11-05  6:02 [PATCH] Fix 'arch/i386/kernel/paravirt.c:481: warning: initialization from incompatible pointer type' Rusty Russell
2006-11-05  6:05 ` Rusty Russell [this message]

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=1162706743.29777.37.camel@localhost.localdomain \
    --to=rusty@rustcorp.com.au \
    --cc=akpm@osdl.org \
    --cc=chrisw@sous-sol.org \
    --cc=virtualization@lists.osdl.org \
    /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;
as well as URLs for NNTP newsgroup(s).