Skip to contentSkip to conversation

drivers:pci:hotplug Fix all whitespace issues

PATCH In review Bogicevic Sasa 2 participants 3 messages Dec 11, 2015 – Dec 17, 2015

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

PATCH 1/1 drivers:pci:hotplug Fix all whitespace issues

This fixes all sorts of whitespace errors and warnings as well as blank line required after declaration messages in drivers/pci/hotplug folder

---
 drivers/pci/hotplug/acpi_pcihp.c        |  15 +-
 drivers/pci/hotplug/acpiphp_core.c      |  14 +-
 drivers/pci/hotplug/acpiphp_glue.c      |   4 +-
 drivers/pci/hotplug/acpiphp_ibm.c       |   5 +-
 drivers/pci/hotplug/cpci_hotplug.h      |  14 +-
 drivers/pci/hotplug/cpci_hotplug_core.c |  16 +-
 drivers/pci/hotplug/cpci_hotplug_pci.c  |  11 +-
 drivers/pci/hotplug/cpcihp_generic.c    |  12 +-
 drivers/pci/hotplug/cpcihp_zt5550.c     |  14 +-
 drivers/pci/hotplug/cpqphp.h            |  15 +-
 drivers/pci/hotplug/cpqphp_core.c       |  33 +-
 drivers/pci/hotplug/cpqphp_ctrl.c       | 203 ++++-----
 drivers/pci/hotplug/cpqphp_nvram.c      |  42 +-
 drivers/pci/hotplug/cpqphp_pci.c        |  94 +++--
 drivers/pci/hotplug/cpqphp_sysfs.c      |   8 +-
 drivers/pci/hotplug/ibmphp.h            |  10 +-
 drivers/pci/hotplug/ibmphp_core.c       |  27 +-
 drivers/pci/hotplug/ibmphp_ebda.c       | 526 +++++++++++------------
 drivers/pci/hotplug/ibmphp_hpc.c        | 392 ++++++++---------
 drivers/pci/hotplug/ibmphp_pci.c        | 717 ++++++++++++++++----------------
 drivers/pci/hotplug/ibmphp_res.c        | 510 ++++++++++++-----------
 drivers/pci/hotplug/pci_hotplug_core.c  |  12 +-
 drivers/pci/hotplug/pciehp.h            |   8 +-
 drivers/pci/hotplug/pciehp_core.c       |  16 +-
 drivers/pci/hotplug/pcihp_skeleton.c    |  24 +-
 drivers/pci/hotplug/rpaphp.h            |   8 +-
 drivers/pci/hotplug/rpaphp_core.c       |   3 +-
 drivers/pci/hotplug/rpaphp_pci.c        |   2 +-
 drivers/pci/hotplug/rpaphp_slot.c       |   3 +-
 drivers/pci/hotplug/sgi_hotplug.c       |  10 +-
 drivers/pci/hotplug/shpchp.h            |  10 +-
 drivers/pci/hotplug/shpchp_core.c       |  28 +-
 drivers/pci/hotplug/shpchp_ctrl.c       |  10 +-
 drivers/pci/hotplug/shpchp_hpc.c        |   2 +-
 drivers/pci/hotplug/shpchp_sysfs.c      |  10 +-
 35 files changed, 1428 insertions(+), 1400 deletions(-)
drivers/pci/hotplug/acpi_pcihp.c +9 -6
index 876ccc6..7ce052e 100644
@@ -36,10 +36,10 @@
 
 #define MY_NAME	"acpi_pcihp"
 
-#define dbg(fmt, arg...) do { if (debug_acpi) 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_acpi) 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	METHOD_NAME__SUN	"_SUN"
 #define	METHOD_NAME_OSHP	"OSHP"
@@ -123,6 +123,7 @@ int acpi_get_hp_hw_control_from_firmware(struct pci_dev *pdev, u32 flags)
 		 * space at all. Try to get acpi handle of parent pci bus.
 		 */
 		struct pci_bus *pbus;
+
 		for (pbus = pdev->bus; pbus; pbus = pbus->parent) {
 			handle = acpi_pci_get_bridge_handle(pbus);
 			if (handle)
@@ -132,8 +133,8 @@ int acpi_get_hp_hw_control_from_firmware(struct pci_dev *pdev, u32 flags)
 
 	while (handle) {
 		acpi_get_name(handle, ACPI_FULL_PATHNAME, &string);
-		dbg("Trying to get hotplug control for %s \n",
-		    (char *)string.pointer);
+		dbg("Trying to get hotplug control for %s\n",
+			(char *)string.pointer);
 		status = acpi_run_oshp(handle);
 		if (ACPI_SUCCESS(status))
 			goto got_one;
@@ -161,6 +162,7 @@ static int pcihp_is_ejectable(acpi_handle handle)
 {
 	acpi_status status;
 	unsigned long long removable;
+
 	if (!acpi_has_method(handle, "_ADR"))
 		return 0;
 	if (acpi_has_method(handle, "_EJ0"))
@@ -197,6 +199,7 @@ static acpi_status
 check_hotplug(acpi_handle handle, u32 lvl, void *context, void **rv)
 {
 	int *found = (int *)context;
+
 	if (pcihp_is_ejectable(handle)) {
 		*found = 1;
 		return AE_CTRL_TERMINATE;
drivers/pci/hotplug/acpiphp_core.c +7 -7
index e291efc..3c81fc8 100644
@@ -63,13 +63,13 @@ MODULE_LICENSE("GPL");
 MODULE_PARM_DESC(disable, "disable acpiphp driver");
 module_param_named(disable, acpiphp_disabled, bool, 0444);
 
-static int enable_slot		(struct hotplug_slot *slot);
-static int disable_slot		(struct hotplug_slot *slot);
-static int set_attention_status (struct hotplug_slot *slot, u8 value);
-static int get_power_status	(struct hotplug_slot *slot, u8 *value);
-static int get_attention_status (struct hotplug_slot *slot, u8 *value);
-static int get_latch_status	(struct hotplug_slot *slot, u8 *value);
-static int get_adapter_status	(struct hotplug_slot *slot, u8 *value);
+static int enable_slot(struct hotplug_slot *slot);
+static int disable_slot(struct hotplug_slot *slot);
+static int set_attention_status(struct hotplug_slot *slot, u8 value);
+static int get_power_status(struct hotplug_slot *slot, u8 *value);
+static int get_attention_status(struct hotplug_slot *slot, u8 *value);
+static int get_latch_status(struct hotplug_slot *slot, u8 *value);
+static int get_adapter_status(struct hotplug_slot *slot, u8 *value);
 
 static struct hotplug_slot_ops acpi_hotplug_slot_ops = {
 	.enable_slot		= enable_slot,
drivers/pci/hotplug/acpiphp_glue.c +3 -1
index ff53856..f5fa190 100644
@@ -621,6 +621,7 @@ static inline bool device_status_valid(unsigned int sta)
 	 * loaded (Section 6.3.7 of ACPI 5.0A).
 	 */
 	unsigned int mask = ACPI_STA_DEVICE_ENABLED | ACPI_STA_DEVICE_FUNCTIONING;
+
 	return (sta & mask) == mask;
 }
 
@@ -707,8 +708,9 @@ static void acpiphp_sanitize_bus(struct pci_bus *bus)
 	unsigned long type_mask = IORESOURCE_IO | IORESOURCE_MEM;
 
 	list_for_each_entry_safe_reverse(dev, tmp, &bus->devices, bus_list) {
-		for (i=0; i<PCI_BRIDGE_RESOURCES; i++) {
+		for (i = 0; i < PCI_BRIDGE_RESOURCES; i++) {
 			struct resource *res = &dev->resource[i];
+
 			if ((res->flags & type_mask) && !res->start &&
 					res->end) {
 				/* Could not assign a required resources
drivers/pci/hotplug/acpiphp_ibm.c +2 -3
index 6ca2399..a48026b 100644
@@ -115,8 +115,7 @@ static struct bin_attribute ibm_apci_table_attr = {
 	    .read = ibm_read_apci_table,
 	    .write = NULL,
 };
-static struct acpiphp_attention_info ibm_attention_info =
-{
+static struct acpiphp_attention_info ibm_attention_info = {
 	.set_attn = ibm_set_attention_status,
 	.get_attn = ibm_get_attention_status,
 	.owner = THIS_MODULE,
@@ -325,7 +324,7 @@ static int ibm_get_table_from_acpi(char **bufp)
 	}
 
 	size = 0;
-	for (i=0; i<package->package.count; i++) {
+	for (i = 0; i < package->package.count; i++) {
 		memcpy(&lbuf[size],
 				package->package.elements[i].buffer.pointer,
 				package->package.elements[i].buffer.length);
drivers/pci/hotplug/cpci_hotplug.h +7 -7
index 6a0ddf7..555bcde 100644
@@ -52,13 +52,13 @@ struct slot {
 };
 
 struct cpci_hp_controller_ops {
-	int (*query_enum) (void);
-	int (*enable_irq) (void);
-	int (*disable_irq) (void);
-	int (*check_irq) (void *dev_id);
-	int (*hardware_test) (struct slot *slot, u32 value);
-	u8  (*get_power) (struct slot *slot);
-	int (*set_power) (struct slot *slot, int value);
+	int (*query_enum)(void);
+	int (*enable_irq)(void);
+	int (*disable_irq)(void);
+	int (*check_irq)(void *dev_id);
+	int (*hardware_test)(struct slot *slot, u32 value);
+	u8  (*get_power)(struct slot *slot);
+	int (*set_power)(struct slot *slot, int value);
 };
 
 struct cpci_hp_controller {
drivers/pci/hotplug/cpci_hotplug_core.c +8 -8
index 46db293..7d3866c 100644
@@ -45,12 +45,12 @@
 #define dbg(format, arg...)					\
 	do {							\
 		if (cpci_debug)					\
-			printk (KERN_DEBUG "%s: " format "\n",	\
-				MY_NAME , ## arg);		\
+			printk(KERN_DEBUG "%s: " format "\n",	\
+				MY_NAME, ## arg);		\
 	} while (0)
-#define err(format, arg...) printk(KERN_ERR "%s: " format "\n", MY_NAME , ## arg)
-#define info(format, arg...) printk(KERN_INFO "%s: " format "\n", MY_NAME , ## arg)
-#define warn(format, arg...) printk(KERN_WARNING "%s: " format "\n", MY_NAME , ## arg)
+#define err(format, arg...) printk(KERN_ERR "%s: " format "\n", MY_NAME, ## arg)
+#define info(format, arg...) printk(KERN_INFO "%s: " format "\n", MY_NAME, ## arg)
+#define warn(format, arg...) printk(KERN_WARNING "%s: " format "\n", MY_NAME, ## arg)
 
 /* local variables */
 static DECLARE_RWSEM(list_rwsem);
@@ -238,21 +238,21 @@ cpci_hp_register_bus(struct pci_bus *bus, u8 first, u8 last)
 	 * with the pci_hotplug subsystem.
 	 */
 	for (i = first; i <= last; ++i) {
-		slot = kzalloc(sizeof (struct slot), GFP_KERNEL);
+		slot = kzalloc(sizeof(struct slot), GFP_KERNEL);
 		if (!slot) {
 			status = -ENOMEM;
 			goto error;
 		}
 
 		hotplug_slot =
-			kzalloc(sizeof (struct hotplug_slot), GFP_KERNEL);
+			kzalloc(sizeof(struct hotplug_slot), GFP_KERNEL);
 		if (!hotplug_slot) {
 			status = -ENOMEM;
 			goto error_slot;
 		}
 		slot->hotplug_slot = hotplug_slot;
 
-		info = kzalloc(sizeof (struct hotplug_slot_info), GFP_KERNEL);
+		info = kzalloc(sizeof(struct hotplug_slot_info), GFP_KERNEL);
 		if (!info) {
 			status = -ENOMEM;
 			goto error_hpslot;
drivers/pci/hotplug/cpci_hotplug_pci.c +6 -5
index 788db48..6bae121 100644
@@ -38,12 +38,12 @@ extern int cpci_debug;
 #define dbg(format, arg...)					\
 	do {							\
 		if (cpci_debug)					\
-			printk (KERN_DEBUG "%s: " format "\n",	\
-				MY_NAME , ## arg);		\
+			printk(KERN_DEBUG "%s: " format "\n",	\
+				MY_NAME, ## arg);		\
 	} while (0)
-#define err(format, arg...) printk(KERN_ERR "%s: " format "\n", MY_NAME , ## arg)
-#define info(format, arg...) printk(KERN_INFO "%s: " format "\n", MY_NAME , ## arg)
-#define warn(format, arg...) printk(KERN_WARNING "%s: " format "\n", MY_NAME , ## arg)
+#define err(format, arg...) printk(KERN_ERR "%s: " format "\n", MY_NAME, ## arg)
+#define info(format, arg...) printk(KERN_INFO "%s: " format "\n", MY_NAME, ## arg)
+#define warn(format, arg...) printk(KERN_WARNING "%s: " format "\n", MY_NAME, ## arg)
 
 
 u8 cpci_get_attention_status(struct slot *slot)
@@ -269,6 +269,7 @@ int cpci_configure_slot(struct slot *slot)
 	/* Still NULL? Well then scan for it! */
 	if (slot->dev == NULL) {
 		int n;
+
 		dbg("pci_dev still null");
 
 		/*
drivers/pci/hotplug/cpcihp_generic.c +6 -6
index 66b7bbe..88a44a7 100644
@@ -54,12 +54,12 @@
 #define dbg(format, arg...)					\
 	do {							\
 		if (debug)					\
-			printk (KERN_DEBUG "%s: " format "\n",	\
-				MY_NAME , ## arg);		\
+			printk(KERN_DEBUG "%s: " format "\n",	\
+				MY_NAME, ## arg);		\
 	} while (0)
-#define err(format, arg...) printk(KERN_ERR "%s: " format "\n", MY_NAME , ## arg)
-#define info(format, arg...) printk(KERN_INFO "%s: " format "\n", MY_NAME , ## arg)
-#define warn(format, arg...) printk(KERN_WARNING "%s: " format "\n", MY_NAME , ## arg)
+#define err(format, arg...) printk(KERN_ERR "%s: " format "\n", MY_NAME, ## arg)
+#define info(format, arg...) printk(KERN_INFO "%s: " format "\n", MY_NAME, ## arg)
+#define warn(format, arg...) printk(KERN_WARNING "%s: " format "\n", MY_NAME, ## arg)
 
 /* local variables */
 static bool debug;
@@ -164,7 +164,7 @@ static int __init cpcihp_generic_init(void)
 	bus = dev->subordinate;
 	pci_dev_put(dev);
 
-	memset(&generic_hpc, 0, sizeof (struct cpci_hp_controller));
+	memset(&generic_hpc, 0, sizeof(struct cpci_hp_controller));
 	generic_hpc_ops.query_enum = query_enum;
 	generic_hpc.ops = &generic_hpc_ops;
 
drivers/pci/hotplug/cpcihp_zt5550.c +7 -7
index 7ecf34e..5f49c3f 100644
@@ -49,12 +49,12 @@
 #define dbg(format, arg...)					\
 	do {							\
 		if (debug)					\
-			printk (KERN_DEBUG "%s: " format "\n",	\
-				MY_NAME , ## arg);		\
+			printk(KERN_DEBUG "%s: " format "\n",	\
+				MY_NAME, ## arg);		\
 	} while (0)
-#define err(format, arg...) printk(KERN_ERR "%s: " format "\n", MY_NAME , ## arg)
-#define info(format, arg...) printk(KERN_INFO "%s: " format "\n", MY_NAME , ## arg)
-#define warn(format, arg...) printk(KERN_WARNING "%s: " format "\n", MY_NAME , ## arg)
+#define err(format, arg...) printk(KERN_ERR "%s: " format "\n", MY_NAME, ## arg)
+#define info(format, arg...) printk(KERN_INFO "%s: " format "\n", MY_NAME, ## arg)
+#define warn(format, arg...) printk(KERN_WARNING "%s: " format "\n", MY_NAME, ## arg)
 
 /* local variables */
 static bool debug;
@@ -204,7 +204,7 @@ static int zt5550_hc_disable_irq(void)
 	return 0;
 }
 
-static int zt5550_hc_init_one (struct pci_dev *pdev, const struct pci_device_id *ent)
+static int zt5550_hc_init_one(struct pci_dev *pdev, const struct pci_device_id *ent)
 {
 	int status;
 
@@ -214,7 +214,7 @@ static int zt5550_hc_init_one (struct pci_dev *pdev, const struct pci_device_id
 
 	dbg("returned from zt5550_hc_config");
 
-	memset(&zt5550_hpc, 0, sizeof (struct cpci_hp_controller));
+	memset(&zt5550_hpc, 0, sizeof(struct cpci_hp_controller));
 	zt5550_hpc_ops.query_enum = zt5550_hc_query_enum;
 	zt5550_hpc.ops = &zt5550_hpc_ops;
 	if (!poll) {
drivers/pci/hotplug/cpqphp.h +8 -7
index b28b2d2..8a93529 100644
@@ -36,10 +36,10 @@
 
 #define MY_NAME	"cpqphp"
 
-#define dbg(fmt, arg...) do { if (cpqhp_debug) printk(KERN_DEBUG "%s: " fmt , MY_NAME , ## 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 (cpqhp_debug) printk(KERN_DEBUG "%s: " fmt, MY_NAME, ## 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)
 
 
 
@@ -424,7 +424,7 @@ int cpqhp_process_SS(struct controller *ctrl, struct pci_func *func);
 int cpqhp_hardware_test(struct controller *ctrl, int test_num);
 
 /* resource functions */
-int	cpqhp_resource_sort_and_combine	(struct pci_resource **head);
+int	cpqhp_resource_sort_and_combine(struct pci_resource **head);
 
 /* pci functions */
 int cpqhp_set_irq(u8 bus_num, u8 dev_num, u8 int_pin, u8 irq_num);
@@ -625,6 +625,7 @@ static inline u8 get_controller_speed(struct controller *ctrl)
 static inline u8 get_adapter_speed(struct controller *ctrl, u8 hp_slot)
 {
 	u32 temp_dword = readl(ctrl->hpc_reg + NON_INT_INPUT);
+
 	dbg("slot: %d, PCIXCAP: %8x\n", hp_slot, temp_dword);
 	if (ctrl->pcix_support) {
 		if (temp_dword & (0x10000 << hp_slot))
@@ -685,7 +686,7 @@ static inline int cpq_get_latch_status(struct controller *ctrl,
 	u8 hp_slot;
 
 	hp_slot = slot->device - ctrl->slot_device_offset;
-	dbg("%s: slot->device = %d, ctrl->slot_device_offset = %d \n",
+	dbg("%s: slot->device = %d, ctrl->slot_device_offset = %d\n",
 	    __func__, slot->device, ctrl->slot_device_offset);
 
 	status = (readl(ctrl->hpc_reg + INT_INPUT_CLEAR) & (0x01L << hp_slot));
@@ -712,7 +713,7 @@ static inline int get_presence_status(struct controller *ctrl,
 
 static inline int wait_for_ctrl_irq(struct controller *ctrl)
 {
-        DECLARE_WAITQUEUE(wait, current);
+	DECLARE_WAITQUEUE(wait, current);
 	int retval = 0;
 
 	dbg("%s - start\n", __func__);
drivers/pci/hotplug/cpqphp_core.c +17 -16
index a53084d..d378a9a 100644
@@ -291,7 +291,7 @@ static void release_slot(struct hotplug_slot *hotplug_slot)
 	kfree(slot);
 }
 
-static int ctrl_slot_cleanup (struct controller *ctrl)
+static int ctrl_slot_cleanup(struct controller *ctrl)
 {
 	struct slot *old_slot, *next_slot;
 
@@ -301,7 +301,7 @@ static int ctrl_slot_cleanup (struct controller *ctrl)
 	while (old_slot) {
 		/* memory will be freed by the release_slot callback */
 		next_slot = old_slot->next;
-		pci_hp_deregister (old_slot->hotplug_slot);
+		pci_hp_deregister(old_slot->hotplug_slot);
 		old_slot = next_slot;
 	}
 
@@ -413,9 +413,9 @@ cpqhp_set_attention_status(struct controller *ctrl, struct pci_func *func,
 	mutex_lock(&ctrl->crit_sect);
 
 	if (status == 1)
-		amber_LED_on (ctrl, hp_slot);
+		amber_LED_on(ctrl, hp_slot);
 	else if (status == 0)
-		amber_LED_off (ctrl, hp_slot);
+		amber_LED_off(ctrl, hp_slot);
 	else {
 		/* Done with exclusive hardware access */
 		mutex_unlock(&ctrl->crit_sect);
@@ -425,7 +425,7 @@ cpqhp_set_attention_status(struct controller *ctrl, struct pci_func *func,
 	set_SOGO(ctrl);
 
 	/* Wait for SOBS to be unset */
-	wait_for_ctrl_irq (ctrl);
+	wait_for_ctrl_irq(ctrl);
 
 	/* Done with exclusive hardware access */
 	mutex_unlock(&ctrl->crit_sect);
@@ -439,7 +439,7 @@ cpqhp_set_attention_status(struct controller *ctrl, struct pci_func *func,
  * @hotplug_slot: slot to change LED on
  * @status: LED control flag
  */
-static int set_attention_status (struct hotplug_slot *hotplug_slot, u8 status)
+static int set_attention_status(struct hotplug_slot *hotplug_slot, u8 status)
 {
 	struct pci_func *slot_func;
 	struct slot *slot = hotplug_slot->private;
@@ -610,7 +610,7 @@ static int ctrl_slot_setup(struct controller *ctrl,
 	u8 ctrl_slot;
 	u32 tempdword;
 	char name[SLOT_NAME_SIZE];
-	void __iomem *slot_entry= NULL;
+	void __iomem *slot_entry = NULL;
 	int result;
 
 	dbg("%s\n", __func__);
@@ -755,7 +755,7 @@ static int one_time_init(void)
 	if (cpqhp_debug)
 		pci_print_IRQ_route();
 
-	dbg("Initialize + Start the notification mechanism \n");
+	dbg("Initialize + Start the notification mechanism\n");
 
 	retval = cpqhp_event_start_thread();
 	if (retval)
@@ -772,7 +772,7 @@ static int one_time_init(void)
 	/* Map rom address */
 	cpqhp_rom_start = ioremap(ROM_PHY_ADDR, ROM_PHY_LEN);
 	if (!cpqhp_rom_start) {
-		err ("Could not ioremap memory region for ROM\n");
+		err("Could not ioremap memory region for ROM\n");
 		retval = -EIO;
 		goto error;
 	}
@@ -786,7 +786,7 @@ static int one_time_init(void)
 	smbios_table = detect_SMBIOS_pointer(cpqhp_rom_start,
 					cpqhp_rom_start + ROM_PHY_LEN);
 	if (!smbios_table) {
-		err ("Could not find the SMBIOS pointer in memory\n");
+		err("Could not find the SMBIOS pointer in memory\n");
 		retval = -EIO;
 		goto error_rom_start;
 	}
@@ -794,7 +794,7 @@ static int one_time_init(void)
 	smbios_start = ioremap(readl(smbios_table + ST_ADDRESS),
 					readw(smbios_table + ST_LENGTH));
 	if (!smbios_start) {
-		err ("Could not ioremap memory region taken from SMBIOS values\n");
+		err("Could not ioremap memory region taken from SMBIOS values\n");
 		retval = -EIO;
 		goto error_smbios_start;
 	}
@@ -1181,7 +1181,7 @@ static int cpqhpc_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
 	 * Finish setting up the hot plug ctrl device
 	 */
 	ctrl->slot_device_offset = readb(ctrl->hpc_reg + SLOT_MASK) >> 4;
-	dbg("NumSlots %d \n", ctrl->slot_device_offset);
+	dbg("NumSlots %d\n", ctrl->slot_device_offset);
 
 	ctrl->next_event = 0;
 
@@ -1198,7 +1198,7 @@ static int cpqhpc_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
 	writel(0xFFFFFFFFL, ctrl->hpc_reg + INT_MASK);
 
 	/* set up the interrupt */
-	dbg("HPC interrupt = %d \n", ctrl->interrupt);
+	dbg("HPC interrupt = %d\n", ctrl->interrupt);
 	if (request_irq(ctrl->interrupt, cpqhp_ctrl_intr,
 			IRQF_SHARED, MY_NAME, ctrl)) {
 		err("Can't get irq %d for the hotplug pci controller\n",
@@ -1321,7 +1321,8 @@ static void __exit unload_cpqphpd(void)
 	while (ctrl) {
 		if (ctrl->hpc_reg) {
 			u16 misc;
-			rc = read_slot_enable (ctrl);
+
+			rc = read_slot_enable(ctrl);
 
 			writeb(0, ctrl->hpc_reg + SLOT_SERR);
 			writel(0xFFFFFFC0L | ~rc, ctrl->hpc_reg + INT_MASK);
@@ -1361,7 +1362,7 @@ static void __exit unload_cpqphpd(void)
 			kfree(tres);
 		}
 
-		kfree (ctrl->pci_bus);
+		kfree(ctrl->pci_bus);
 
 		tctrl = ctrl;
 		ctrl = ctrl->next;
@@ -1446,7 +1447,7 @@ static int __init cpqhpc_init(void)
 
 	cpqhp_debug = debug;
 
-	info (DRIVER_DESC " version: " DRIVER_VERSION "\n");
+	info(DRIVER_DESC " version: " DRIVER_VERSION "\n");
 	cpqhp_initialize_debugfs();
 	result = pci_register_driver(&cpqhpc_driver);
 	dbg("pci_register_driver = %d\n", result);
drivers/pci/hotplug/cpqphp_ctrl.c +102 -101

650 lines not on this page · raw message

drivers/pci/hotplug/cpqphp_nvram.c +21 -21

166 lines not on this page · raw message

drivers/pci/hotplug/cpqphp_pci.c +48 -46

337 lines not on this page · raw message

drivers/pci/hotplug/cpqphp_sysfs.c +5 -3
index d81648f..f0b7851 100644
@@ -39,7 +39,7 @@
 #include "cpqphp.h"
 
 static DEFINE_MUTEX(cpqphp_mutex);
-static int show_ctrl (struct controller *ctrl, char *buf)
+static int show_ctrl(struct controller *ctrl, char *buf)
 {
 	char *out = buf;
 	int index;
@@ -77,7 +77,7 @@ static int show_ctrl (struct controller *ctrl, char *buf)
 	return out - buf;
 }
 
-static int show_dev (struct controller *ctrl, char *buf)
+static int show_dev(struct controller *ctrl, char *buf)
 {
 	char *out = buf;
 	int index;
@@ -119,7 +119,7 @@ static int show_dev (struct controller *ctrl, char *buf)
 			out += sprintf(out, "start = %8.8x, length = %8.8x\n", res->base, res->length);
 			res = res->next;
 		}
-		slot=slot->next;
+		slot = slot->next;
 	}
 
 	return out - buf;
@@ -168,6 +168,7 @@ exit:
 static loff_t lseek(struct file *file, loff_t off, int whence)
 {
 	struct ctrl_dbg *dbg = file->private_data;
+
 	return fixed_size_llseek(file, off, whence, dbg->size);
 }
 
@@ -175,6 +176,7 @@ static ssize_t read(struct file *file, char __user *buf,
 		    size_t nbytes, loff_t *ppos)
 {
 	struct ctrl_dbg *dbg = file->private_data;
+
 	return simple_read_from_buffer(buf, nbytes, ppos, dbg->data, dbg->size);
 }
 
drivers/pci/hotplug/ibmphp.h +5 -5
index e3e46a7..d72a5c3 100644
@@ -39,11 +39,11 @@ extern int ibmphp_debug;
 #else
 	#define MY_NAME THIS_MODULE->name
 #endif
-#define debug(fmt, arg...) do { if (ibmphp_debug == 1) printk(KERN_DEBUG "%s: " fmt , MY_NAME , ## arg); } while (0)
-#define debug_pci(fmt, arg...) do { if (ibmphp_debug) printk(KERN_DEBUG "%s: " fmt , MY_NAME , ## 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 debug(fmt, arg...) do { if (ibmphp_debug == 1) printk(KERN_DEBUG "%s: " fmt, MY_NAME, ## arg); } while (0)
+#define debug_pci(fmt, arg...) do { if (ibmphp_debug) printk(KERN_DEBUG "%s: " fmt, MY_NAME, ## 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)
 
 
 /* EBDA stuff */
drivers/pci/hotplug/ibmphp_core.c +14 -13
index 1530247..48329f8 100644
@@ -39,11 +39,11 @@
 #include <asm/io_apic.h>
 #include "ibmphp.h"
 
-#define attn_on(sl)  ibmphp_hpc_writeslot (sl, HPC_SLOT_ATTNON)
-#define attn_off(sl) ibmphp_hpc_writeslot (sl, HPC_SLOT_ATTNOFF)
-#define attn_LED_blink(sl) ibmphp_hpc_writeslot (sl, HPC_SLOT_BLINKLED)
-#define get_ctrl_revision(sl, rev) ibmphp_hpc_readslot (sl, READ_REVLEVEL, rev)
-#define get_hpc_options(sl, opt) ibmphp_hpc_readslot (sl, READ_HPCOPTIONS, opt)
+#define attn_on(sl)  ibmphp_hpc_writeslot(sl, HPC_SLOT_ATTNON)
+#define attn_off(sl) ibmphp_hpc_writeslot(sl, HPC_SLOT_ATTNOFF)
+#define attn_LED_blink(sl) ibmphp_hpc_writeslot(sl, HPC_SLOT_BLINKLED)
+#define get_ctrl_revision(sl, rev) ibmphp_hpc_readslot(sl, READ_REVLEVEL, rev)
+#define get_hpc_options(sl, opt) ibmphp_hpc_readslot(sl, READ_HPCOPTIONS, opt)
 
 #define DRIVER_VERSION	"0.6"
 #define DRIVER_DESC	"IBM Hot Plug PCI Controller Driver"
@@ -52,9 +52,9 @@ int ibmphp_debug;
 
 static bool debug;
 module_param(debug, bool, S_IRUGO | S_IWUSR);
-MODULE_PARM_DESC (debug, "Debugging mode enabled or not");
-MODULE_LICENSE ("GPL");
-MODULE_DESCRIPTION (DRIVER_DESC);
+MODULE_PARM_DESC(debug, "Debugging mode enabled or not");
+MODULE_LICENSE("GPL");
+MODULE_DESCRIPTION(DRIVER_DESC);
 
 struct pci_bus *ibmphp_pci_bus;
 static int max_slots;
@@ -113,7 +113,7 @@ static inline int slot_update(struct slot **sl)
 	return rc;
 }
 
-static int __init get_max_slots (void)
+static int __init get_max_slots(void)
 {
 	struct slot *slot_cur;
 	struct list_head *tmp;
@@ -621,10 +621,10 @@ int ibmphp_update_slot_info(struct slot *slot_cur)
 						slot_cur->ext_status);
 	info->latch_status = SLOT_LATCH(slot_cur->status);
         if (!SLOT_PRESENT(slot_cur->status)) {
-                info->adapter_status = 0;
+	info->adapter_status = 0;
 /*		info->max_adapter_speed_status = MAX_ADAPTER_NONE; */
 	} else {
-                info->adapter_status = 1;
+		info->adapter_status = 1;
 /*		get_max_adapter_speed_1(slot_cur->hotplug_slot,
 					&info->max_adapter_speed_status, 0); */
 	}
@@ -797,6 +797,7 @@ static int ibm_configure_device(struct pci_func *func)
 
 	if (func->dev == NULL) {
 		struct pci_bus *bus = pci_find_bus(0, func->busno);
+
 		if (!bus)
 			goto out;
 
@@ -1181,8 +1182,8 @@ error_power:
 /**************************************************************
 * HOT REMOVING ADAPTER CARD                                   *
 * INPUT: POINTER TO THE HOTPLUG SLOT STRUCTURE                *
-* OUTPUT: SUCCESS 0 ; FAILURE: UNCONFIGURE , VALIDATE         *
-          DISABLE POWER ,                                    *
+* OUTPUT: SUCCESS 0 ; FAILURE: UNCONFIGURE, VALIDATE         *
+          DISABLE POWER,                                    *
 **************************************************************/
 static int ibmphp_disable_slot(struct hotplug_slot *hotplug_slot)
 {
drivers/pci/hotplug/ibmphp_ebda.c +265 -261

1,106 lines not on this page · raw message

drivers/pci/hotplug/ibmphp_hpc.c +198 -194

211 lines not on this page · raw message

drivers/pci/hotplug/ibmphp_pci.c +359 -358

717 lines not on this page · raw message

drivers/pci/hotplug/ibmphp_res.c +256 -254

510 lines not on this page · raw message

drivers/pci/hotplug/pci_hotplug_core.c +6 -6
index d1fab97..8c7018aa 100644

Lines of this file are not shown. View the raw message.

drivers/pci/hotplug/pciehp.h +4 -4
index 62d6fe6..e764918 100644

Lines of this file are not shown. View the raw message.

drivers/pci/hotplug/pciehp_core.c +8 -8
index 612b21a..ac531e6 100644

Lines of this file are not shown. View the raw message.

drivers/pci/hotplug/pcihp_skeleton.c +12 -12
index d062c00..cade141 100644

Lines of this file are not shown. View the raw message.

drivers/pci/hotplug/rpaphp.h +4 -4
index b2593e8..7db024e 100644

Lines of this file are not shown. View the raw message.

drivers/pci/hotplug/rpaphp_core.c +2 -1
index f2945fa..50c19a4 100644

Lines of this file are not shown. View the raw message.

drivers/pci/hotplug/rpaphp_pci.c +1 -1
index 9243f3e7..7836d69 100644

Lines of this file are not shown. View the raw message.

drivers/pci/hotplug/rpaphp_slot.c +2 -1
index a6082cc..a5b6a79 100644

Lines of this file are not shown. View the raw message.

drivers/pci/hotplug/sgi_hotplug.c +6 -4
index c32fb78..121390f 100644

Lines of this file are not shown. View the raw message.

drivers/pci/hotplug/shpchp.h +5 -5
index 5897d51..821227f 100644

Lines of this file are not shown. View the raw message.

drivers/pci/hotplug/shpchp_core.c +14 -14
index 294ef4b..c3fbf3e 100644

Lines of this file are not shown. View the raw message.

drivers/pci/hotplug/shpchp_ctrl.c +5 -5
index 10c7927..0deffff 100644

Lines of this file are not shown. View the raw message.

drivers/pci/hotplug/shpchp_hpc.c +1 -1
index 7d223e9..e03341c 100644

Lines of this file are not shown. View the raw message.

drivers/pci/hotplug/shpchp_sysfs.c +5 -5
index 52875b3..1b4d73d 100644

Lines of this file are not shown. View the raw message.

The rest of this diff is not shown. View the raw message.

Signature · 1 line
2.5.0

Part of the diff is not shown here. View the raw message.

#1 lore raw

Hi Bogicevic,

Quoted 3 lines · Bogicevic Sasa

This fixes all sorts of whitespace errors and warnings as well as blank line required after declaration messages in drivers/pci/hotplug folder

1) Can you combine drivers/pci/hotplug with drivers/pci in a single patch?

2) Can you run objdiff on an allyesconfig build to make sure nothing really changed, and mention this in the changelog as you did with one of your others? This might require moving the blank line additions/removals to a separate patch because those might change debug info or line numbers in printk messages.

Bjorn

#2 lore raw

Sure thing, back to the laboratory :)

{
	name: Bogicevic Sasa
	phone: +381606006200
}
Quoted 19 lines · Bjorn Helgaas

Hi Bogicevic,

Quoted 3 lines · Bogicevic Sasa

This fixes all sorts of whitespace errors and warnings as well as blank line required after declaration messages in drivers/pci/hotplug folder

1) Can you combine drivers/pci/hotplug with drivers/pci in a single patch?

2) Can you run objdiff on an allyesconfig build to make sure nothing really changed, and mention this in the changelog as you did with one of your others? This might require moving the blank line additions/removals to a separate patch because those might change debug info or line numbers in printk messages.

Bjorn