All of lore.kernel.org
 help / color / mirror / Atom feed
From: Dan Carpenter <error27@gmail.com>
To: Chris Mason <chris.mason@oracle.com>
Cc: "Christoph Hellwig" <hch@lst.de>,
	"Dan Carpenter" <error27@gmail.com>,
	"Venkatesh Pallipadi" <venkatesh.pallipadi@intel.com>,
	"André Goddard Rosa" <andre.goddard@gmail.com>,
	linux-btrfs@vger.kernel.org, linux-kernel@vger.kernel.org,
	kernel-janitors@vger.kernel.org
Subject: [patch 1/3] btrfs cleanup: remove dead code
Date: Sat, 20 Mar 2010 14:26:05 +0300	[thread overview]
Message-ID: <20100320112605.GY5331@bicker> (raw)

rb_node is never an ERR_PTR() here.  This code confuses smatch.

Signed-off-by: Dan Carpenter <error27@gmail.com>
---
This doesn't change anything.  It's just a cleanup.  Could you load
it up for linux-next?

diff --git a/fs/btrfs/extent_map.c b/fs/btrfs/extent_map.c
index 28d87ba..94668b1 100644
--- a/fs/btrfs/extent_map.c
+++ b/fs/btrfs/extent_map.c
@@ -335,10 +335,6 @@ struct extent_map *lookup_extent_mapping(struct extent_map_tree *tree,
 		em = NULL;
 		goto out;
 	}
-	if (IS_ERR(rb_node)) {
-		em = ERR_PTR(PTR_ERR(rb_node));
-		goto out;
-	}
 	em = rb_entry(rb_node, struct extent_map, rb_node);
 	if (end > em->start && start < extent_map_end(em))
 		goto found;

WARNING: multiple messages have this Message-ID (diff)
From: Dan Carpenter <error27@gmail.com>
To: Chris Mason <chris.mason@oracle.com>
Cc: "Christoph Hellwig" <hch@lst.de>,
	"Dan Carpenter" <error27@gmail.com>,
	"Venkatesh Pallipadi" <venkatesh.pallipadi@intel.com>,
	"André Goddard Rosa" <andre.goddard@gmail.com>,
	linux-btrfs@vger.kernel.org, linux-kernel@vger.kernel.org,
	kernel-janitors@vger.kernel.org
Subject: [patch 1/3] btrfs cleanup: remove dead code
Date: Sat, 20 Mar 2010 11:26:05 +0000	[thread overview]
Message-ID: <20100320112605.GY5331@bicker> (raw)

rb_node is never an ERR_PTR() here.  This code confuses smatch.

Signed-off-by: Dan Carpenter <error27@gmail.com>
---
This doesn't change anything.  It's just a cleanup.  Could you load
it up for linux-next?

diff --git a/fs/btrfs/extent_map.c b/fs/btrfs/extent_map.c
index 28d87ba..94668b1 100644
--- a/fs/btrfs/extent_map.c
+++ b/fs/btrfs/extent_map.c
@@ -335,10 +335,6 @@ struct extent_map *lookup_extent_mapping(struct extent_map_tree *tree,
 		em = NULL;
 		goto out;
 	}
-	if (IS_ERR(rb_node)) {
-		em = ERR_PTR(PTR_ERR(rb_node));
-		goto out;
-	}
 	em = rb_entry(rb_node, struct extent_map, rb_node);
 	if (end > em->start && start < extent_map_end(em))
 		goto found;

             reply	other threads:[~2010-03-20 11:26 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-03-20 11:26 Dan Carpenter [this message]
2010-03-20 11:26 ` [patch 1/3] btrfs cleanup: remove dead code Dan Carpenter

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=20100320112605.GY5331@bicker \
    --to=error27@gmail.com \
    --cc=andre.goddard@gmail.com \
    --cc=chris.mason@oracle.com \
    --cc=hch@lst.de \
    --cc=kernel-janitors@vger.kernel.org \
    --cc=linux-btrfs@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=venkatesh.pallipadi@intel.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 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.