All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] dm: remove pointless comparison
@ 2014-01-07  3:53 Mikulas Patocka
  2014-01-07 10:39 ` Joe Thornber
  0 siblings, 1 reply; 5+ messages in thread
From: Mikulas Patocka @ 2014-01-07  3:53 UTC (permalink / raw)
  To: Mike Snitzer, Alasdair G. Kergon; +Cc: dm-devel

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;
 
 	if (test_bit(DMF_FREEING, &md->flags) ||
 	    dm_deleting_md(md))

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2014-01-07 18:17 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-01-07  3:53 [PATCH] dm: remove pointless comparison Mikulas Patocka
2014-01-07 10:39 ` Joe Thornber
2014-01-07 15:52   ` Mike Snitzer
2014-01-07 17:28     ` Milan Broz
2014-01-07 18:17       ` Mike Snitzer

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.