public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Wu Fengguang <wfg@mail.ustc.edu.cn>
To: Andrew Morton <akpm@osdl.org>
Cc: linux-kernel@vger.kernel.org, nickpiggin@yahoo.com.au
Subject: [PATCH] radixtree: normalize radix_tree_tag_get() return value
Date: Sun, 4 Jun 2006 19:26:36 +0800	[thread overview]
Message-ID: <349420386.12104@ustc.edu.cn> (raw)
Message-ID: <20060604112636.GB5984@mail.ustc.edu.cn> (raw)
In-Reply-To: <20060604021105.1ce7d727.akpm@osdl.org>

In radix_tree_tag_get(), return normalized value of 0/1, as indicated
by its comment.

Signed-off-by: Wu Fengguang <wfg@mail.ustc.edu.cn>
---

--- linux-2.6.17-rc5-mm2.orig/lib/radix-tree.c
+++ linux-2.6.17-rc5-mm2/lib/radix-tree.c
@@ -531,7 +531,7 @@ int radix_tree_tag_get(struct radix_tree
 			int ret = tag_get(slot, tag, offset);
 
 			BUG_ON(ret && saw_unset_tag);
-			return ret;
+			return !! ret;
 		}
 		slot = slot->slots[offset];
 		shift -= RADIX_TREE_MAP_SHIFT;

      parent reply	other threads:[~2006-06-04 11:26 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <20060604084548.GA5609@mail.ustc.edu.cn>
2006-06-04  8:45 ` [minor fix] radixtree: regulate tag get return value Wu Fengguang
2006-06-04  9:11   ` Andrew Morton
     [not found]     ` <20060604111754.GA5984@mail.ustc.edu.cn>
2006-06-04 11:17       ` Wu Fengguang
2006-06-04 20:18         ` Andrew Morton
     [not found]     ` <20060604112636.GB5984@mail.ustc.edu.cn>
2006-06-04 11:26       ` Wu Fengguang [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=349420386.12104@ustc.edu.cn \
    --to=wfg@mail.ustc.edu.cn \
    --cc=akpm@osdl.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=nickpiggin@yahoo.com.au \
    /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