All of lore.kernel.org
 help / color / mirror / Atom feed
From: tip-bot for Masami Hiramatsu <mhiramat@redhat.com>
To: linux-tip-commits@vger.kernel.org
Cc: linux-kernel@vger.kernel.org, hpa@zytor.com, mingo@redhat.com,
	dle-develop@lists.sourceforge.net, tglx@linutronix.de,
	mhiramat@redhat.com, mingo@elte.hu, systemtap@sources.redhat.com
Subject: [tip:perf/core] x86/alternatives: Fix build warning
Date: Sun, 7 Feb 2010 19:42:49 GMT	[thread overview]
Message-ID: <tip-076dc4a65a6d99a16979e2c7917e669fb8c91ee5@git.kernel.org> (raw)
In-Reply-To: <20100205171647.15750.37221.stgit@dhcp-100-2-132.bos.redhat.com>

Commit-ID:  076dc4a65a6d99a16979e2c7917e669fb8c91ee5
Gitweb:     http://git.kernel.org/tip/076dc4a65a6d99a16979e2c7917e669fb8c91ee5
Author:     Masami Hiramatsu <mhiramat@redhat.com>
AuthorDate: Fri, 5 Feb 2010 12:16:47 -0500
Committer:  Ingo Molnar <mingo@elte.hu>
CommitDate: Sun, 7 Feb 2010 18:08:24 +0100

x86/alternatives: Fix build warning

Fixes these warnings:

 arch/x86/kernel/alternative.c: In function 'alternatives_text_reserved':
 arch/x86/kernel/alternative.c:402: warning: comparison of distinct pointer types lacks a cast
 arch/x86/kernel/alternative.c:402: warning: comparison of distinct pointer types lacks a cast
 arch/x86/kernel/alternative.c:405: warning: comparison of distinct pointer types lacks a cast
 arch/x86/kernel/alternative.c:405: warning: comparison of distinct pointer types lacks a cast

Caused by:

  2cfa197: ftrace/alternatives: Introducing *_text_reserved functions

Changes in v2:
  - Use local variables to compare, instead of type casts.

Reported-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Masami Hiramatsu <mhiramat@redhat.com>
Cc: systemtap <systemtap@sources.redhat.com>
Cc: DLE <dle-develop@lists.sourceforge.net>
LKML-Reference: <20100205171647.15750.37221.stgit@dhcp-100-2-132.bos.redhat.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
---
 arch/x86/kernel/alternative.c |    6 ++++--
 1 files changed, 4 insertions(+), 2 deletions(-)

diff --git a/arch/x86/kernel/alternative.c b/arch/x86/kernel/alternative.c
index 3c13284..e63b80e 100644
--- a/arch/x86/kernel/alternative.c
+++ b/arch/x86/kernel/alternative.c
@@ -395,12 +395,14 @@ int alternatives_text_reserved(void *start, void *end)
 {
 	struct smp_alt_module *mod;
 	u8 **ptr;
+	u8 *text_start = start;
+	u8 *text_end = end;
 
 	list_for_each_entry(mod, &smp_alt_modules, next) {
-		if (mod->text > end || mod->text_end < start)
+		if (mod->text > text_end || mod->text_end < text_start)
 			continue;
 		for (ptr = mod->locks; ptr < mod->locks_end; ptr++)
-			if (start <= *ptr && end >= *ptr)
+			if (text_start <= *ptr && text_end >= *ptr)
 				return 1;
 	}
 

      reply	other threads:[~2010-02-07 19:44 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-02-05  6:24 [PATCH -tip 1/2] x86/alternatives: Fix build warning Masami Hiramatsu
2010-02-05  6:24 ` [PATCH -tip 2/2] kprobes: Add mcount in kprobes blacklist Masami Hiramatsu
2010-02-05  7:48   ` [tip:perf/core] kprobes: Add mcount to the " tip-bot for Masami Hiramatsu
2010-02-15  5:21   ` [tip:tracing/urgent] " tip-bot for Masami Hiramatsu
2010-02-05  7:12 ` [PATCH -tip 1/2] x86/alternatives: Fix build warning Ingo Molnar
2010-02-05 16:52   ` Masami Hiramatsu
2010-02-05 17:16   ` [PATCH -tip v2] " Masami Hiramatsu
2010-02-07 19:42     ` tip-bot for Masami Hiramatsu [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=tip-076dc4a65a6d99a16979e2c7917e669fb8c91ee5@git.kernel.org \
    --to=mhiramat@redhat.com \
    --cc=dle-develop@lists.sourceforge.net \
    --cc=hpa@zytor.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-tip-commits@vger.kernel.org \
    --cc=mingo@elte.hu \
    --cc=mingo@redhat.com \
    --cc=systemtap@sources.redhat.com \
    --cc=tglx@linutronix.de \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.