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>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <56ca1f3ed6d30d0a9628b44c44783001d1ada7cd.1472196564.git.jthumshirn@suse.de>
Date:   Fri, 26 Aug 2016 09:35:00 +0200
From:   Johannes Thumshirn <jthumshirn@...e.de>
To:     Greg KH <gregkh@...uxfoundation.org>
Cc:     Andreas Werner <andreas.werner@....de>,
        Linux Kernel Mailinglist <linux-kernel@...r.kernel.org>,
        Johannes Thumshirn <jthumshirn@...e.de>
Subject: [RESEND PATCH 4/4] mcb: remove sub-device handling code

The MEN Chameleon specification states that a chameleon FPGA can include a
bridge descriptor, which then opens up a new bus behind this bridge. MCB
included subdevice handling code in the core, but no support for bus
descriptors in the parser, due to a lack of hardware access.

As this is technically dead code, but it gets executed on a device add,
I've decided to remove it.

Signed-off-by: Johannes Thumshirn <jthumshirn@...e.de>
---
 drivers/mcb/mcb-core.c | 17 -----------------
 include/linux/mcb.h    |  4 ----
 2 files changed, 21 deletions(-)

diff --git a/drivers/mcb/mcb-core.c b/drivers/mcb/mcb-core.c
index 6f2c852..5306966 100644
--- a/drivers/mcb/mcb-core.c
+++ b/drivers/mcb/mcb-core.c
@@ -369,7 +369,6 @@ struct mcb_device *mcb_alloc_dev(struct mcb_bus *bus)
 	if (!dev)
 		return NULL;
 
-	INIT_LIST_HEAD(&dev->bus_list);
 	dev->bus = bus;
 
 	return dev;
@@ -405,20 +404,6 @@ static int __mcb_bus_add_devices(struct device *dev, void *data)
 	return 0;
 }
 
-static int __mcb_bus_add_child(struct device *dev, void *data)
-{
-	struct mcb_device *mdev = to_mcb_device(dev);
-	struct mcb_bus *child;
-
-	BUG_ON(!mdev->is_added);
-	child = mdev->subordinate;
-
-	if (child)
-		mcb_bus_add_devices(child);
-
-	return 0;
-}
-
 /**
  * mcb_bus_add_devices() - Add devices in the bus' internal device list
  * @bus: The @mcb_bus we add the devices
@@ -428,8 +413,6 @@ static int __mcb_bus_add_child(struct device *dev, void *data)
 void mcb_bus_add_devices(const struct mcb_bus *bus)
 {
 	bus_for_each_dev(&mcb_bus_type, NULL, NULL, __mcb_bus_add_devices);
-	bus_for_each_dev(&mcb_bus_type, NULL, NULL, __mcb_bus_add_child);
-
 }
 EXPORT_SYMBOL_GPL(mcb_bus_add_devices);
 
diff --git a/include/linux/mcb.h b/include/linux/mcb.h
index a6733d3..ee5200d 100644
--- a/include/linux/mcb.h
+++ b/include/linux/mcb.h
@@ -50,10 +50,8 @@ static inline struct mcb_bus *to_mcb_bus(struct device *dev)
 /**
  * struct mcb_device - MEN Chameleon Bus device
  *
- * @bus_list: internal list handling for bus code
  * @dev: device in kernel representation
  * @bus: mcb bus the device is plugged to
- * @subordinate: subordinate MCBus in case of bridge
  * @is_added: flag to check if device is added to bus
  * @driver: associated mcb_driver
  * @id: mcb device id
@@ -66,10 +64,8 @@ static inline struct mcb_bus *to_mcb_bus(struct device *dev)
  * @memory: memory resource
  */
 struct mcb_device {
-	struct list_head bus_list;
 	struct device dev;
 	struct mcb_bus *bus;
-	struct mcb_bus *subordinate;
 	bool is_added;
 	struct mcb_driver *driver;
 	u16 id;
-- 
2.9.3

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ