All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] i2o: Remove the dangerous kobj_to_i2o_device macro
@ 2010-03-23 17:10 Ferenc Wagner
  2010-03-24  7:19 ` Jens Axboe
  0 siblings, 1 reply; 2+ messages in thread
From: Ferenc Wagner @ 2010-03-23 17:10 UTC (permalink / raw)
  To: linux-kernel, Jens Axboe, Martin K. Petersen

This macro worked only when applied to variables named 'kobj'.
While this could have been fixed by simply renaming the macro argument,
a more type-safe replacement by an inline function would be preferred.
However, nobody uses this macro, so it's simpler to just remove it.

Signed-off-by: Ferenc Wagner <wferi@niif.hu>
---
 include/linux/i2o.h |    1 -
 1 files changed, 0 insertions(+), 1 deletions(-)

diff --git a/include/linux/i2o.h b/include/linux/i2o.h
index 87018dc..9e7a12d 100644
--- a/include/linux/i2o.h
+++ b/include/linux/i2o.h
@@ -782,7 +782,6 @@ extern int i2o_exec_lct_get(struct i2o_controller *);
 #define to_i2o_driver(drv) container_of(drv,struct i2o_driver, driver)
 #define to_i2o_device(dev) container_of(dev, struct i2o_device, device)
 #define to_i2o_controller(dev) container_of(dev, struct i2o_controller, device)
-#define kobj_to_i2o_device(kobj) to_i2o_device(container_of(kobj, struct device, kobj))
 
 /**
  *	i2o_out_to_virt - Turn an I2O message to a virtual address
-- 
1.5.6.5


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

* Re: [PATCH] i2o: Remove the dangerous kobj_to_i2o_device macro
  2010-03-23 17:10 [PATCH] i2o: Remove the dangerous kobj_to_i2o_device macro Ferenc Wagner
@ 2010-03-24  7:19 ` Jens Axboe
  0 siblings, 0 replies; 2+ messages in thread
From: Jens Axboe @ 2010-03-24  7:19 UTC (permalink / raw)
  To: Ferenc Wagner; +Cc: linux-kernel, Martin K. Petersen

On Tue, Mar 23 2010, Ferenc Wagner wrote:
> This macro worked only when applied to variables named 'kobj'.
> While this could have been fixed by simply renaming the macro argument,
> a more type-safe replacement by an inline function would be preferred.
> However, nobody uses this macro, so it's simpler to just remove it.

Thanks, applied to the block tree.

-- 
Jens Axboe


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

end of thread, other threads:[~2010-03-24  7:19 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-03-23 17:10 [PATCH] i2o: Remove the dangerous kobj_to_i2o_device macro Ferenc Wagner
2010-03-24  7:19 ` Jens Axboe

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.