Skip to contentSkip to conversation

IPMI: misc fixes

PATCH New Corey Minyard 1 participant 1 message Dec 8, 2006 IPMI

lore
Share & tools
lore
#0 lore raw

PATCH 2/2 IPMI: misc fixes

Fix various problems pointed out by Andrew Morton and others:
* platform_device_unregister checks for NULL, no need to check here.
* Formatting fixes.
* Remove big macro and convert to a function.
* Use strcmp instead of defining a broken case-insensitive comparison, and make the output parameter info match the case of the input one (change "I/O" to "i/o").
* Return the length instead of 0 from the hotmod parameter handler.
* Remove some unused cruft.
* The trydefaults parameter only has to do with scanning the "standard" addresses, don't check for that on ACPI.

drivers/char/ipmi/ipmi_msghandler.c +2 -4
Index: linux-2.6.19/drivers/char/ipmi/ipmi_msghandler.c
===================================================================
@@ -2142,8 +2142,7 @@ cleanup_bmc_device(struct kref *ref)
 	bmc = container_of(ref, struct bmc_device, refcount);
 
 	remove_files(bmc);
-	if (bmc->dev)
-		platform_device_unregister(bmc->dev);
+	platform_device_unregister(bmc->dev);
 	kfree(bmc);
 }
 
@@ -2341,8 +2340,7 @@ static int ipmi_bmc_register(ipmi_smi_t 
 
 		while (ipmi_find_bmc_prod_dev_id(&ipmidriver,
 						 bmc->id.product_id,
-						 bmc->id.device_id))
-		{
+						 bmc->id.device_id)) {
 			if (!warn_printed) {
 				printk(KERN_WARNING PFX
 				       "This machine has two different BMCs"
drivers/char/ipmi/ipmi_si_intf.c +66 -54

201 lines not on this page · raw message