Merge tag 'for-linus-6.14-1' of https://github.com/cminyard/linux-ipmi

Pull ipmi updates from Corey Minyard:

- I'm switching to a new email address, so update that

- Minor fixes for formats and return values and missing ifdefs

- A fix for some error handling that causes a loss of messages

* tag 'for-linus-6.14-1' of https://github.com/cminyard/linux-ipmi:
MAINTAINERS: ipmi: update my email address
ipmi: ssif_bmc: Fix new request loss when bmc ready for a response
ipmi: make ipmi_destroy_user() return void
char:ipmi: Fix a not-used variable on a non-ACPI system
char:ipmi: Fix the wrong format specifier
ipmi: ipmb: Add check devm_kasprintf() returned value

+15 -21
+1 -1
MAINTAINERS
··· 12118 F: io_uring/ 12119 12120 IPMI SUBSYSTEM 12121 - M: Corey Minyard <minyard@acm.org> 12122 L: openipmi-developer@lists.sourceforge.net (moderated for non-subscribers) 12123 S: Supported 12124 W: http://openipmi.sourceforge.net/
··· 12118 F: io_uring/ 12119 12120 IPMI SUBSYSTEM 12121 + M: Corey Minyard <corey@minyard.net> 12122 L: openipmi-developer@lists.sourceforge.net (moderated for non-subscribers) 12123 S: Supported 12124 W: http://openipmi.sourceforge.net/
+5
drivers/char/ipmi/ipmb_dev_int.c
··· 321 ipmb_dev->miscdev.name = devm_kasprintf(&client->dev, GFP_KERNEL, 322 "%s%d", "ipmb-", 323 client->adapter->nr); 324 ipmb_dev->miscdev.fops = &ipmb_fops; 325 ipmb_dev->miscdev.parent = &client->dev; 326 ret = misc_register(&ipmb_dev->miscdev); ··· 358 }; 359 MODULE_DEVICE_TABLE(i2c, ipmb_id); 360 361 static const struct acpi_device_id acpi_ipmb_id[] = { 362 { "IPMB0001", 0 }, 363 {}, 364 }; 365 MODULE_DEVICE_TABLE(acpi, acpi_ipmb_id); 366 367 static struct i2c_driver ipmb_driver = { 368 .driver = {
··· 321 ipmb_dev->miscdev.name = devm_kasprintf(&client->dev, GFP_KERNEL, 322 "%s%d", "ipmb-", 323 client->adapter->nr); 324 + if (!ipmb_dev->miscdev.name) 325 + return -ENOMEM; 326 + 327 ipmb_dev->miscdev.fops = &ipmb_fops; 328 ipmb_dev->miscdev.parent = &client->dev; 329 ret = misc_register(&ipmb_dev->miscdev); ··· 355 }; 356 MODULE_DEVICE_TABLE(i2c, ipmb_id); 357 358 + #ifdef CONFIG_ACPI 359 static const struct acpi_device_id acpi_ipmb_id[] = { 360 { "IPMB0001", 0 }, 361 {}, 362 }; 363 MODULE_DEVICE_TABLE(acpi, acpi_ipmb_id); 364 + #endif 365 366 static struct i2c_driver ipmb_driver = { 367 .driver = {
+1 -4
drivers/char/ipmi/ipmi_devintf.c
··· 122 static int ipmi_release(struct inode *inode, struct file *file) 123 { 124 struct ipmi_file_private *priv = file->private_data; 125 - int rv; 126 struct ipmi_recv_msg *msg, *next; 127 128 - rv = ipmi_destroy_user(priv->user); 129 - if (rv) 130 - return rv; 131 132 list_for_each_entry_safe(msg, next, &priv->recv_msgs, link) 133 ipmi_free_recv_msg(msg);
··· 122 static int ipmi_release(struct inode *inode, struct file *file) 123 { 124 struct ipmi_file_private *priv = file->private_data; 125 struct ipmi_recv_msg *msg, *next; 126 127 + ipmi_destroy_user(priv->user); 128 129 list_for_each_entry_safe(msg, next, &priv->recv_msgs, link) 130 ipmi_free_recv_msg(msg);
+1 -3
drivers/char/ipmi/ipmi_msghandler.c
··· 1398 module_put(owner); 1399 } 1400 1401 - int ipmi_destroy_user(struct ipmi_user *user) 1402 { 1403 _ipmi_destroy_user(user); 1404 1405 kref_put(&user->refcount, free_user); 1406 - 1407 - return 0; 1408 } 1409 EXPORT_SYMBOL(ipmi_destroy_user); 1410
··· 1398 module_put(owner); 1399 } 1400 1401 + void ipmi_destroy_user(struct ipmi_user *user) 1402 { 1403 _ipmi_destroy_user(user); 1404 1405 kref_put(&user->refcount, free_user); 1406 } 1407 EXPORT_SYMBOL(ipmi_destroy_user); 1408
+1 -5
drivers/char/ipmi/ipmi_poweroff.c
··· 699 #ifdef MODULE 700 static void __exit ipmi_poweroff_cleanup(void) 701 { 702 - int rv; 703 - 704 #ifdef CONFIG_PROC_FS 705 unregister_sysctl_table(ipmi_table_header); 706 #endif ··· 706 ipmi_smi_watcher_unregister(&smi_watcher); 707 708 if (ready) { 709 - rv = ipmi_destroy_user(ipmi_user); 710 - if (rv) 711 - pr_err("could not cleanup the IPMI user: 0x%x\n", rv); 712 pm_power_off = old_poweroff_func; 713 } 714 }
··· 699 #ifdef MODULE 700 static void __exit ipmi_poweroff_cleanup(void) 701 { 702 #ifdef CONFIG_PROC_FS 703 unregister_sysctl_table(ipmi_table_header); 704 #endif ··· 708 ipmi_smi_watcher_unregister(&smi_watcher); 709 710 if (ready) { 711 + ipmi_destroy_user(ipmi_user); 712 pm_power_off = old_poweroff_func; 713 } 714 }
+1 -1
drivers/char/ipmi/ipmi_si_pci.c
··· 118 if (io.irq) 119 io.irq_setup = ipmi_std_irq_setup; 120 121 - dev_info(&pdev->dev, "%pR regsize %d spacing %d irq %d\n", 122 &pdev->resource[0], io.regsize, io.regspacing, io.irq); 123 124 return ipmi_si_add_smi(&io);
··· 118 if (io.irq) 119 io.irq_setup = ipmi_std_irq_setup; 120 121 + dev_info(&pdev->dev, "%pR regsize %u spacing %u irq %d\n", 122 &pdev->resource[0], io.regsize, io.regspacing, io.irq); 123 124 return ipmi_si_add_smi(&io);
+1 -4
drivers/char/ipmi/ipmi_watchdog.c
··· 1064 1065 static void ipmi_unregister_watchdog(int ipmi_intf) 1066 { 1067 - int rv; 1068 struct ipmi_user *loc_user = watchdog_user; 1069 1070 if (!loc_user) ··· 1088 mutex_lock(&ipmi_watchdog_mutex); 1089 1090 /* Disconnect from IPMI. */ 1091 - rv = ipmi_destroy_user(loc_user); 1092 - if (rv) 1093 - pr_warn("error unlinking from IPMI: %d\n", rv); 1094 1095 /* If it comes back, restart it properly. */ 1096 ipmi_start_timer_on_heartbeat = 1;
··· 1064 1065 static void ipmi_unregister_watchdog(int ipmi_intf) 1066 { 1067 struct ipmi_user *loc_user = watchdog_user; 1068 1069 if (!loc_user) ··· 1089 mutex_lock(&ipmi_watchdog_mutex); 1090 1091 /* Disconnect from IPMI. */ 1092 + ipmi_destroy_user(loc_user); 1093 1094 /* If it comes back, restart it properly. */ 1095 ipmi_start_timer_on_heartbeat = 1;
+3 -2
drivers/char/ipmi/ssif_bmc.c
··· 292 ssif_bmc->nbytes_processed = 0; 293 ssif_bmc->remain_len = 0; 294 ssif_bmc->busy = false; 295 - memset(&ssif_bmc->part_buf, 0, sizeof(struct ssif_part_buffer)); 296 wake_up_all(&ssif_bmc->wait_queue); 297 } 298 ··· 743 ssif_bmc->aborting = true; 744 } 745 } else if (ssif_bmc->state == SSIF_RES_SENDING) { 746 - if (ssif_bmc->is_singlepart_read || ssif_bmc->block_num == 0xFF) 747 /* Invalidate response buffer to denote it is sent */ 748 complete_response(ssif_bmc); 749 ssif_bmc->state = SSIF_READY; 750 } 751
··· 292 ssif_bmc->nbytes_processed = 0; 293 ssif_bmc->remain_len = 0; 294 ssif_bmc->busy = false; 295 wake_up_all(&ssif_bmc->wait_queue); 296 } 297 ··· 744 ssif_bmc->aborting = true; 745 } 746 } else if (ssif_bmc->state == SSIF_RES_SENDING) { 747 + if (ssif_bmc->is_singlepart_read || ssif_bmc->block_num == 0xFF) { 748 + memset(&ssif_bmc->part_buf, 0, sizeof(struct ssif_part_buffer)); 749 /* Invalidate response buffer to denote it is sent */ 750 complete_response(ssif_bmc); 751 + } 752 ssif_bmc->state = SSIF_READY; 753 } 754
+1 -1
include/linux/ipmi.h
··· 126 * the users before you destroy the callback structures, it should be 127 * safe, too. 128 */ 129 - int ipmi_destroy_user(struct ipmi_user *user); 130 131 /* Get the IPMI version of the BMC we are talking to. */ 132 int ipmi_get_version(struct ipmi_user *user,
··· 126 * the users before you destroy the callback structures, it should be 127 * safe, too. 128 */ 129 + void ipmi_destroy_user(struct ipmi_user *user); 130 131 /* Get the IPMI version of the BMC we are talking to. */ 132 int ipmi_get_version(struct ipmi_user *user,