Merge tag 'powerpc-4.5-3' of git://git.kernel.org/pub/scm/linux/kernel/git/powerpc...
[cascardo/linux.git] / drivers / pci / hotplug / pci_hotplug_core.c
index d1fab97..9acd199 100644 (file)
 
 #define MY_NAME        "pci_hotplug"
 
-#define dbg(fmt, arg...) do { if (debug) printk(KERN_DEBUG "%s: %s: " fmt , MY_NAME , __func__ , ## arg); } while (0)
-#define err(format, arg...) printk(KERN_ERR "%s: " format , MY_NAME , ## arg)
-#define info(format, arg...) printk(KERN_INFO "%s: " format , MY_NAME , ## arg)
-#define warn(format, arg...) printk(KERN_WARNING "%s: " format , MY_NAME , ## arg)
+#define dbg(fmt, arg...) do { if (debug) printk(KERN_DEBUG "%s: %s: " fmt, MY_NAME, __func__, ## arg); } while (0)
+#define err(format, arg...) printk(KERN_ERR "%s: " format, MY_NAME, ## arg)
+#define info(format, arg...) printk(KERN_INFO "%s: " format, MY_NAME, ## arg)
+#define warn(format, arg...) printk(KERN_WARNING "%s: " format, MY_NAME, ## arg)
 
 
 /* local variables */
@@ -226,7 +226,7 @@ static ssize_t test_write_file(struct pci_slot *pci_slot, const char *buf,
        u32 test;
        int retval = 0;
 
-       ltest = simple_strtoul (buf, NULL, 10);
+       ltest = simple_strtoul(buf, NULL, 10);
        test = (u32)(ltest & 0xffffffff);
        dbg("test = %d\n", test);
 
@@ -396,10 +396,8 @@ static void fs_remove_slot(struct pci_slot *pci_slot)
 static struct hotplug_slot *get_slot_from_name(const char *name)
 {
        struct hotplug_slot *slot;
-       struct list_head *tmp;
 
-       list_for_each(tmp, &pci_hotplug_slot_list) {
-               slot = list_entry(tmp, struct hotplug_slot, slot_list);
+       list_for_each_entry(slot, &pci_hotplug_slot_list, slot_list) {
                if (strcmp(hotplug_slot_name(slot), name) == 0)
                        return slot;
        }