From: Joe Thornber <thornber@redhat.com>
To: device-mapper development <dm-devel@redhat.com>
Cc: Mike Snitzer <msnitzer@redhat.com>,
"Alasdair G. Kergon" <agk@redhat.com>
Subject: Re: [PATCH] dm: remove pointless comparison
Date: Tue, 7 Jan 2014 10:39:30 +0000 [thread overview]
Message-ID: <20140107103930.GA11734@debian> (raw)
In-Reply-To: <alpine.LRH.2.02.1401062249200.17811@file01.intranet.prod.int.rdu2.redhat.com>
On Mon, Jan 06, 2014 at 10:53:28PM -0500, Mikulas Patocka wrote:
> Remove pointless comparison in dm_get_from_kobject. The comparison is
> always true and the compiler optimizes it out anyway.
>
> Signed-off-by: Mikulas Patocka <mpatocka@redhat.com>
>
> ---
> drivers/md/dm.c | 2 --
> 1 file changed, 2 deletions(-)
>
> Index: linux-3.13-rc7/drivers/md/dm.c
> ===================================================================
> --- linux-3.13-rc7.orig/drivers/md/dm.c 2014-01-07 01:28:27.000000000 +0100
> +++ linux-3.13-rc7/drivers/md/dm.c 2014-01-07 01:28:39.000000000 +0100
> @@ -2922,8 +2922,6 @@ struct mapped_device *dm_get_from_kobjec
> struct mapped_device *md;
>
> md = container_of(kobj, struct mapped_device, kobj);
> - if (&md->kobj != kobj)
> - return NULL;
What were they trying to check? The compiler?
next prev parent reply other threads:[~2014-01-07 10:39 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-01-07 3:53 [PATCH] dm: remove pointless comparison Mikulas Patocka
2014-01-07 10:39 ` Joe Thornber [this message]
2014-01-07 15:52 ` Mike Snitzer
2014-01-07 17:28 ` Milan Broz
2014-01-07 18:17 ` Mike Snitzer
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=20140107103930.GA11734@debian \
--to=thornber@redhat.com \
--cc=agk@redhat.com \
--cc=dm-devel@redhat.com \
--cc=msnitzer@redhat.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