public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH -mm 1/4] genhd: fixup kobj_to_dev() macro
@ 2008-01-08  8:43 Alexey Dobriyan
  2008-01-12  1:32 ` Greg KH
  0 siblings, 1 reply; 2+ messages in thread
From: Alexey Dobriyan @ 2008-01-08  8:43 UTC (permalink / raw)
  To: Kay Sievers; +Cc: Greg Kroah-Hartman, linux-kernel, devel

Please, fold into gregkh-driver-block-device.patch
-------------------------------------------------------
[PATCH -mm 1/4] genhd: fixup kobj_to_dev() macro

>From Pavel Emelyanov <xemul@openvz.org>

Using "kobj" twice is not OK, because substitution will be done twice
resulting in compile breakage if variable name is different from
structure member name.

Signed-off-by: Pavel Emelyanov <xemul@openvz.org>
Signed-off-by: Alexey Dobriyan <adobriyan@sw.ru>
---

 include/linux/genhd.h |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

--- a/include/linux/genhd.h
+++ b/include/linux/genhd.h
@@ -13,7 +13,7 @@
 
 #ifdef CONFIG_BLOCK
 
-#define kobj_to_dev(kobj) container_of(kobj, struct device, kobj)
+#define kobj_to_dev(k) container_of(k, struct device, kobj)
 #define dev_to_disk(device) container_of(device, struct gendisk, dev)
 #define dev_to_part(device) container_of(device, struct hd_struct, dev)
 


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

end of thread, other threads:[~2008-01-12  1:33 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-01-08  8:43 [PATCH -mm 1/4] genhd: fixup kobj_to_dev() macro Alexey Dobriyan
2008-01-12  1:32 ` Greg KH

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox