Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

[PATCH] PCI Hotplug: fix up coding style issues

Signed-off-by: Pavel Machek <pavel@suse.cz>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>

authored by

Pavel Machek and committed by
Greg Kroah-Hartman
072888fa 8169b5d2

+11 -14
+9 -12
drivers/pci/hotplug/acpiphp_ibm.c
··· 302 302 } 303 303 304 304 package = (union acpi_object *) buffer.pointer; 305 - if(!(package) || 305 + if (!(package) || 306 306 (package->type != ACPI_TYPE_PACKAGE) || 307 307 !(package->package.elements)) { 308 308 err("%s: Invalid APCI object\n", __FUNCTION__); ··· 405 405 } 406 406 info.hardware_id.value[sizeof(info.hardware_id.value) - 1] = '\0'; 407 407 408 - if(info.current_status && (info.valid & ACPI_VALID_HID) && 408 + if (info.current_status && (info.valid & ACPI_VALID_HID) && 409 409 (!strcmp(info.hardware_id.value, IBM_HARDWARE_ID1) || 410 410 !strcmp(info.hardware_id.value, IBM_HARDWARE_ID2))) { 411 411 dbg("found hardware: %s, handle: %p\n", info.hardware_id.value, ··· 449 449 } 450 450 451 451 ibm_note.device = device; 452 - status = acpi_install_notify_handler( 453 - ibm_acpi_handle, 454 - ACPI_DEVICE_NOTIFY, 455 - ibm_handle_events, 452 + status = acpi_install_notify_handler(ibm_acpi_handle, 453 + ACPI_DEVICE_NOTIFY, ibm_handle_events, 456 454 &ibm_note); 457 455 if (ACPI_FAILURE(status)) { 458 - err("%s: Failed to register notification handler\n", 456 + err("%s: Failed to register notification handler\n", 459 457 __FUNCTION__); 460 458 retval = -EBUSY; 461 459 goto init_cleanup; ··· 480 482 if (acpiphp_unregister_attention(&ibm_attention_info)) 481 483 err("%s: attention info deregistration failed", __FUNCTION__); 482 484 483 - status = acpi_remove_notify_handler( 485 + status = acpi_remove_notify_handler( 484 486 ibm_acpi_handle, 485 487 ACPI_DEVICE_NOTIFY, 486 488 ibm_handle_events); 487 - if (ACPI_FAILURE(status)) 488 - err("%s: Notification handler removal failed\n", 489 - __FUNCTION__); 490 - // remove the /sys entries 489 + if (ACPI_FAILURE(status)) 490 + err("%s: Notification handler removal failed\n", __FUNCTION__); 491 + /* remove the /sys entries */ 491 492 if (sysfs_remove_bin_file(sysdir, &ibm_apci_table_attr)) 492 493 err("%s: removal of sysfs file apci_table failed\n", 493 494 __FUNCTION__);
+2 -2
drivers/pci/hotplug/ibmphp_core.c
··· 235 235 { 236 236 int rc = 0; 237 237 struct slot *pslot; 238 - u8 cmd; 238 + u8 cmd = 0x00; /* avoid compiler warning */ 239 239 240 240 debug("set_attention_status - Entry hotplug_slot[%lx] value[%x]\n", 241 241 (ulong) hotplug_slot, value); 242 242 ibmphp_lock_operations(); 243 - cmd = 0x00; // avoid compiler warning 243 + 244 244 245 245 if (hotplug_slot) { 246 246 switch (value) {