Skip to contentSkip to conversation

Fix rpadlpar pci hotplug driver sysfs usage

PATCH In review Benjamin Herrenschmidt 2 participants 3 messages May 30, 2008

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 Fix rpadlpar pci hotplug driver sysfs usage

When Greg "fixed" the sysfs usage of that driver a while back, he seem to have introduced a bug where the quotes are added around the name of our specific sysfs files, thus breaking the user space tool.

This fixes it. Tested DLPAR operations on a POWER6 machine successfully.

---

 drivers/pci/hotplug/rpadlpar_sysfs.c |    8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)
drivers/pci/hotplug/rpadlpar_sysfs.c +6 -2
@@ -18,8 +18,12 @@
 #include "rpadlpar.h"
 
 #define DLPAR_KOBJ_NAME       "control"
-#define ADD_SLOT_ATTR_NAME    "add_slot"
-#define REMOVE_SLOT_ATTR_NAME "remove_slot"
+
+/* Those two have no quotes because they are passed to __ATTR() which
+ * stringifies the argument (yuck !)
+ */
+#define ADD_SLOT_ATTR_NAME    add_slot
+#define REMOVE_SLOT_ATTR_NAME remove_slot
 
 #define MAX_DRC_NAME_LEN 64
 
#1 lore raw
Quoted 5 lines · Benjamin Herrenschmidt

When Greg "fixed" the sysfs usage of that driver a while back, he seem to have introduced a bug where the quotes are added around the name of our specific sysfs files, thus breaking the user space tool.

This fixes it. Tested DLPAR operations on a POWER6 machine successfully.

Do you think this is important enough for 2.6.26?

Thanks,
Jesse

#2 lore raw
Quoted 8 lines · Jesse Barnes
Quoted 5 lines · Benjamin Herrenschmidt

When Greg "fixed" the sysfs usage of that driver a while back, he seem to have introduced a bug where the quotes are added around the name of our specific sysfs files, thus breaking the user space tool.

This fixes it. Tested DLPAR operations on a POWER6 machine successfully.

Do you think this is important enough for 2.6.26?

Yes and .25 too in fact. I'll send it to -stable once it's upstream.

Cheers,
Ben.