mirror of
git://git.yoctoproject.org/linux-yocto.git
synced 2025-10-22 23:13:01 +02:00
ipmi: Minor fixes and update my email address
I'm switching to a new email address, so update that. This is a new commit, but shouldn't be an issue. Minor fixes for formats and return values and missing ifdefs. A fix for some error handling that causes a loss of messages. -----BEGIN PGP SIGNATURE----- iQIzBAABCgAdFiEE/Q1c5nzg9ZpmiCaGYfOMkJGb/4EFAmePqW0ACgkQYfOMkJGb /4Emww//SvcTgLWEz8+HoFHiFiaYmtY1e2Hq3G9pxZC8MlCQlglSU9qfM2W+Iug1 97HmOI9KhN0oJy1jJLLkvCeFee9LoLfVLFwbuB1HVUWRS9y6bpJ+rc9C4zzvd1Vu ZvCPXpHeqQO6u+ZMpEVz87cG8bQ0zYxdVmE0xhNmRjJLTpw6fM3Ad8INS6rffm3r 4L5b0NptQgjn7anJ+336RsuCE21T9m9qErrZ5pYJptN9eiJ2ITaTWuz3ghoLm4WA WgiMoD/Z857EcYtAn9V7mBpHs2uJ8Xw4kcZ1HAeGI8d69G1gw7TQHU3mp3atU+p5 wOGGWGxLfJyI1w7nZQfbiFI76ja3mQk1wIN3TXm56QL7iPKsppsAqWrZwDjx6TJG +XBADoKdhTdRiYmqW7y8HD4lw7qX2NcPeDur4EKaM287L8MUrGh+pb6pm7kaf9Lr i6PFG328K63kiSNbr1WdzPgHGsM+j5wr5YGcWAVtYtuT4l90LEdgS2JhLjQVk3OS b153ksL47/QvKse7H/piLQUsuwca9Xpg58KsjqmNCl0Cpzqo+YxbCC6RI/AweX/i Q/Qaw0Tdo3/I6SE1yLdKbY8sYBE9ppRSnJkBHlmJhjhTcUSm+iujVpVZeBpCga27 lKS8R9uLoMM4vhrWfuJ9iO4GUfSrbrEff4Si3fWJ6mHrJD+ECCo= =DhcZ -----END PGP SIGNATURE----- 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
This commit is contained in:
commit
df60eac9ef
|
@ -12118,7 +12118,7 @@ F: include/uapi/linux/io_uring.h
|
|||
F: io_uring/
|
||||
|
||||
IPMI SUBSYSTEM
|
||||
M: Corey Minyard <minyard@acm.org>
|
||||
M: Corey Minyard <corey@minyard.net>
|
||||
L: openipmi-developer@lists.sourceforge.net (moderated for non-subscribers)
|
||||
S: Supported
|
||||
W: http://openipmi.sourceforge.net/
|
||||
|
|
|
@ -321,6 +321,9 @@ static int ipmb_probe(struct i2c_client *client)
|
|||
ipmb_dev->miscdev.name = devm_kasprintf(&client->dev, GFP_KERNEL,
|
||||
"%s%d", "ipmb-",
|
||||
client->adapter->nr);
|
||||
if (!ipmb_dev->miscdev.name)
|
||||
return -ENOMEM;
|
||||
|
||||
ipmb_dev->miscdev.fops = &ipmb_fops;
|
||||
ipmb_dev->miscdev.parent = &client->dev;
|
||||
ret = misc_register(&ipmb_dev->miscdev);
|
||||
|
@ -355,11 +358,13 @@ static const struct i2c_device_id ipmb_id[] = {
|
|||
};
|
||||
MODULE_DEVICE_TABLE(i2c, ipmb_id);
|
||||
|
||||
#ifdef CONFIG_ACPI
|
||||
static const struct acpi_device_id acpi_ipmb_id[] = {
|
||||
{ "IPMB0001", 0 },
|
||||
{},
|
||||
};
|
||||
MODULE_DEVICE_TABLE(acpi, acpi_ipmb_id);
|
||||
#endif
|
||||
|
||||
static struct i2c_driver ipmb_driver = {
|
||||
.driver = {
|
||||
|
|
|
@ -122,12 +122,9 @@ out:
|
|||
static int ipmi_release(struct inode *inode, struct file *file)
|
||||
{
|
||||
struct ipmi_file_private *priv = file->private_data;
|
||||
int rv;
|
||||
struct ipmi_recv_msg *msg, *next;
|
||||
|
||||
rv = ipmi_destroy_user(priv->user);
|
||||
if (rv)
|
||||
return rv;
|
||||
ipmi_destroy_user(priv->user);
|
||||
|
||||
list_for_each_entry_safe(msg, next, &priv->recv_msgs, link)
|
||||
ipmi_free_recv_msg(msg);
|
||||
|
|
|
@ -1398,13 +1398,11 @@ static void _ipmi_destroy_user(struct ipmi_user *user)
|
|||
module_put(owner);
|
||||
}
|
||||
|
||||
int ipmi_destroy_user(struct ipmi_user *user)
|
||||
void ipmi_destroy_user(struct ipmi_user *user)
|
||||
{
|
||||
_ipmi_destroy_user(user);
|
||||
|
||||
kref_put(&user->refcount, free_user);
|
||||
|
||||
return 0;
|
||||
}
|
||||
EXPORT_SYMBOL(ipmi_destroy_user);
|
||||
|
||||
|
|
|
@ -699,8 +699,6 @@ static int __init ipmi_poweroff_init(void)
|
|||
#ifdef MODULE
|
||||
static void __exit ipmi_poweroff_cleanup(void)
|
||||
{
|
||||
int rv;
|
||||
|
||||
#ifdef CONFIG_PROC_FS
|
||||
unregister_sysctl_table(ipmi_table_header);
|
||||
#endif
|
||||
|
@ -708,9 +706,7 @@ static void __exit ipmi_poweroff_cleanup(void)
|
|||
ipmi_smi_watcher_unregister(&smi_watcher);
|
||||
|
||||
if (ready) {
|
||||
rv = ipmi_destroy_user(ipmi_user);
|
||||
if (rv)
|
||||
pr_err("could not cleanup the IPMI user: 0x%x\n", rv);
|
||||
ipmi_destroy_user(ipmi_user);
|
||||
pm_power_off = old_poweroff_func;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -118,7 +118,7 @@ static int ipmi_pci_probe(struct pci_dev *pdev,
|
|||
if (io.irq)
|
||||
io.irq_setup = ipmi_std_irq_setup;
|
||||
|
||||
dev_info(&pdev->dev, "%pR regsize %d spacing %d irq %d\n",
|
||||
dev_info(&pdev->dev, "%pR regsize %u spacing %u irq %d\n",
|
||||
&pdev->resource[0], io.regsize, io.regspacing, io.irq);
|
||||
|
||||
return ipmi_si_add_smi(&io);
|
||||
|
|
|
@ -1064,7 +1064,6 @@ static void ipmi_register_watchdog(int ipmi_intf)
|
|||
|
||||
static void ipmi_unregister_watchdog(int ipmi_intf)
|
||||
{
|
||||
int rv;
|
||||
struct ipmi_user *loc_user = watchdog_user;
|
||||
|
||||
if (!loc_user)
|
||||
|
@ -1089,9 +1088,7 @@ static void ipmi_unregister_watchdog(int ipmi_intf)
|
|||
mutex_lock(&ipmi_watchdog_mutex);
|
||||
|
||||
/* Disconnect from IPMI. */
|
||||
rv = ipmi_destroy_user(loc_user);
|
||||
if (rv)
|
||||
pr_warn("error unlinking from IPMI: %d\n", rv);
|
||||
ipmi_destroy_user(loc_user);
|
||||
|
||||
/* If it comes back, restart it properly. */
|
||||
ipmi_start_timer_on_heartbeat = 1;
|
||||
|
|
|
@ -292,7 +292,6 @@ static void complete_response(struct ssif_bmc_ctx *ssif_bmc)
|
|||
ssif_bmc->nbytes_processed = 0;
|
||||
ssif_bmc->remain_len = 0;
|
||||
ssif_bmc->busy = false;
|
||||
memset(&ssif_bmc->part_buf, 0, sizeof(struct ssif_part_buffer));
|
||||
wake_up_all(&ssif_bmc->wait_queue);
|
||||
}
|
||||
|
||||
|
@ -744,9 +743,11 @@ static void on_stop_event(struct ssif_bmc_ctx *ssif_bmc, u8 *val)
|
|||
ssif_bmc->aborting = true;
|
||||
}
|
||||
} else if (ssif_bmc->state == SSIF_RES_SENDING) {
|
||||
if (ssif_bmc->is_singlepart_read || ssif_bmc->block_num == 0xFF)
|
||||
if (ssif_bmc->is_singlepart_read || ssif_bmc->block_num == 0xFF) {
|
||||
memset(&ssif_bmc->part_buf, 0, sizeof(struct ssif_part_buffer));
|
||||
/* Invalidate response buffer to denote it is sent */
|
||||
complete_response(ssif_bmc);
|
||||
}
|
||||
ssif_bmc->state = SSIF_READY;
|
||||
}
|
||||
|
||||
|
|
|
@ -126,7 +126,7 @@ int ipmi_create_user(unsigned int if_num,
|
|||
* the users before you destroy the callback structures, it should be
|
||||
* safe, too.
|
||||
*/
|
||||
int ipmi_destroy_user(struct ipmi_user *user);
|
||||
void ipmi_destroy_user(struct ipmi_user *user);
|
||||
|
||||
/* Get the IPMI version of the BMC we are talking to. */
|
||||
int ipmi_get_version(struct ipmi_user *user,
|
||||
|
|
Loading…
Reference in New Issue
Block a user