OpenVZ Forum


Home » Mailing lists » Devel » [PATCH -mm 1/4] genhd: fixup kobj_to_dev() macro
[PATCH -mm 1/4] genhd: fixup kobj_to_dev() macro [message #25718] Tue, 08 January 2008 08:41 Go to next message
Alexey Dobriyan is currently offline  Alexey Dobriyan
Messages: 195
Registered: August 2006
Senior Member
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)
Re: [PATCH -mm 1/4] genhd: fixup kobj_to_dev() macro [message #25952 is a reply to message #25718] Sat, 12 January 2008 01:32 Go to previous message
Greg KH is currently offline  Greg KH
Messages: 27
Registered: February 2006
Junior Member
On Tue, Jan 08, 2008 at 11:43:04AM +0300, Alexey Dobriyan wrote:
> Please, fold into gregkh-driver-block-device.patch
> -------------------------------------------------------
> [PATCH -mm 1/4] genhd: fixup kobj_to_dev() macro

Thanks, I've now merged it in.

greg k-h
Previous Topic: [PATCH net-2.6.25][NEIGH]: Add a comment describing what a NUD stands for.
Next Topic: [PATCH -mm 3/4] hvcs: fixup container_of() usage
Goto Forum:
  


Current Time: Tue Jul 29 18:11:40 GMT 2025

Total time taken to generate the page: 0.08245 seconds