lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [day] [month] [year] [list]
Message-ID: <a872555b0908251336q2c4ee970qa12500d35d4e144e@mail.gmail.com>
Date:	Wed, 26 Aug 2009 00:36:36 +0400
From:	Denis Kirjanov <kirjanov@...il.com>
To:	linux-kernel@...r.kernel.org
Subject: [PATCH] Remove multiple definitions of the to_dev() macro

Remove multiple definitions of the to_dev() macro

Signed-off-by: Denis Kirjanov <kirjanov@...il.com>
---
diff --git a/drivers/base/core.c b/drivers/base/core.c
index 7ecb193..6fd7d16 100644
--- a/drivers/base/core.c
+++ b/drivers/base/core.c
@@ -62,7 +62,6 @@ const char *dev_driver_string(const struct device *dev)
 }
 EXPORT_SYMBOL(dev_driver_string);

-#define to_dev(obj) container_of(obj, struct device, kobj)
 #define to_dev_attr(_attr) container_of(_attr, struct device_attribute, attr)

 static ssize_t dev_attr_show(struct kobject *kobj, struct attribute *attr,
diff --git a/drivers/base/firmware_class.c b/drivers/base/firmware_class.c
index 7376367..9493c88 100644
--- a/drivers/base/firmware_class.c
+++ b/drivers/base/firmware_class.c
@@ -21,8 +21,6 @@
 #include <linux/firmware.h>
 #include "base.h"

-#define to_dev(obj) container_of(obj, struct device, kobj)
-
 MODULE_AUTHOR("Manuel Estrada Sainz");
 MODULE_DESCRIPTION("Multi purpose firmware loading support");
 MODULE_LICENSE("GPL");
diff --git a/drivers/net/bonding/bond_sysfs.c b/drivers/net/bonding/bond_sysfs.c
index 55bf34f..7d4101a 100644
--- a/drivers/net/bonding/bond_sysfs.c
+++ b/drivers/net/bonding/bond_sysfs.c
@@ -38,7 +38,6 @@

 #include "bonding.h"

-#define to_dev(obj)	container_of(obj, struct device, kobj)
 #define to_bond(cd)	((struct bonding *)(netdev_priv(to_net_dev(cd))))

 /*
diff --git a/include/linux/device.h b/include/linux/device.h
index aebb810..c2b4ac9 100644
--- a/include/linux/device.h
+++ b/include/linux/device.h
@@ -364,6 +364,7 @@ struct device_dma_parameters {
 	unsigned long segment_boundary_mask;
 };

+#define to_dev(obj) container_of(obj, struct device, kobj)
 struct device {
 	struct device		*parent;

diff --git a/net/bridge/br_sysfs_br.c b/net/bridge/br_sysfs_br.c
index ee4820a..41ed613 100644
--- a/net/bridge/br_sysfs_br.c
+++ b/net/bridge/br_sysfs_br.c
@@ -18,10 +18,10 @@
 #include <linux/rtnetlink.h>
 #include <linux/spinlock.h>
 #include <linux/times.h>
+#include <linux/device.h>

 #include "br_private.h"

-#define to_dev(obj)	container_of(obj, struct device, kobj)
 #define to_bridge(cd)	((struct net_bridge *)netdev_priv(to_net_dev(cd)))

 /*
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ