mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Kumar Gala <galak@kernel.crashing.org>
To: linux-kernel@vger.kernel.org
Cc: Andrew Morton <akpm@osdl.org>,
	prasanna@in.ibm.com, ananth@in.ibm.com,
	anil.s.keshavamurthy@intel.com, davem@davemloft.net,
	Paul Mackerras <paulus@samba.org>
Subject: [PATCH] kprobes: Fix compiler warning
Date: Mon, 29 Jan 2007 23:43:33 -0600 (CST)	[thread overview]
Message-ID: <Pine.LNX.4.64.0701292341070.32393@localhost.localdomain> (raw)

On ppc the compiler gripes about:

kernel/kprobes.c: In function 'collect_garbage_slots':
kernel/kprobes.c:215: warning: comparison is always false due to limited range of data type

The compiler ends up optimizing away the test since char's are unsigned on ppc.

Signed-off-by: Kumar Gala <galak@kernel.crashing.org>

---
commit 1ee2dc5300b1c454f92eeea82da300f72db1b26f
tree c73cdacb43e154292708d967e11b1cbf7ab4904f
parent c0d4d573feed199b16094c072e7cb07afb01c598
author Kumar Gala <galak@kernel.crashing.org> Mon, 29 Jan 2007 23:38:11 -0600
committer Kumar Gala <galak@kernel.crashing.org> Mon, 29 Jan 2007 23:38:11 -0600

  kernel/kprobes.c |    2 +-
  1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/kernel/kprobes.c b/kernel/kprobes.c
index 17ec4af..514276f 100644
--- a/kernel/kprobes.c
+++ b/kernel/kprobes.c
@@ -212,7 +212,7 @@ static int __kprobes collect_garbage_slots(void)
  			continue;
  		kip->ngarbage = 0;	/* we will collect all garbages */
  		for (i = 0; i < INSNS_PER_PAGE; i++) {
-			if (kip->slot_used[i] == -1 &&
+			if (kip->slot_used[i] == (char)-1 &&
  			    collect_one_slot(kip, i))
  				break;
  		}

             reply	other threads:[~2007-01-30  5:45 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-01-30  5:43 Kumar Gala [this message]
2007-01-30  5:55 ` Ananth N Mavinakayanahalli
2007-01-30  7:05   ` Kumar Gala
2007-01-30  7:12     ` Kumar Gala
2007-01-30  7:41       ` Andrew Morton
2007-01-31  0:04         ` Kumar Gala
2013-07-01 14:33 [PATCH] kprobes: fix " Dong Fang
2013-07-01 14:46 ` Dong Fang

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=Pine.LNX.4.64.0701292341070.32393@localhost.localdomain \
    --to=galak@kernel.crashing.org \
    --cc=akpm@osdl.org \
    --cc=ananth@in.ibm.com \
    --cc=anil.s.keshavamurthy@intel.com \
    --cc=davem@davemloft.net \
    --cc=linux-kernel@vger.kernel.org \
    --cc=paulus@samba.org \
    --cc=prasanna@in.ibm.com \
    /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®