diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2020-08-08 19:32:18 +0300 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2020-08-08 19:32:18 +0300 |
commit | 11030fe96b57ad843518b0e9430f3cd4b3610ce2 (patch) | |
tree | be04f878457543b65eb715ba97a7dd0abe07ab63 /drivers/char | |
parent | 449dc8c97089a6e09fb2dac4d92b1b7ac0eb7c1e (diff) | |
parent | 634b06def11cf7ecf6282c79735f08004e323983 (diff) | |
download | linux-11030fe96b57ad843518b0e9430f3cd4b3610ce2.tar.xz |
Merge tag 'for-linus-5.9-1' of git://github.com/cminyard/linux-ipmi
Pull IPMI updates from Corey Minyard:
"Minor cleanups to the IPMI driver for 5.9
Nothing of any major consequence. Duplicate code, some missing \n's in
sysfs files, some documentation and comment changes"
* tag 'for-linus-5.9-1' of git://github.com/cminyard/linux-ipmi:
ipmi/watchdog: add missing newlines when printing parameters by sysfs
ipmi: remve duplicate code in __ipmi_bmc_register()
ipmi: ssif: Remove finished TODO comment about SMBus alert
Doc: driver-api: ipmi: Add description of alerts_broken module param
Diffstat (limited to 'drivers/char')
-rw-r--r-- | drivers/char/ipmi/ipmi_msghandler.c | 2 | ||||
-rw-r--r-- | drivers/char/ipmi/ipmi_ssif.c | 5 | ||||
-rw-r--r-- | drivers/char/ipmi/ipmi_watchdog.c | 9 |
3 files changed, 7 insertions, 9 deletions
diff --git a/drivers/char/ipmi/ipmi_msghandler.c b/drivers/char/ipmi/ipmi_msghandler.c index e1b22fe0916c..737c0b6b24ea 100644 --- a/drivers/char/ipmi/ipmi_msghandler.c +++ b/drivers/char/ipmi/ipmi_msghandler.c @@ -3080,8 +3080,6 @@ static int __ipmi_bmc_register(struct ipmi_smi *intf, rv = sysfs_create_link(&bmc->pdev.dev.kobj, &intf->si_dev->kobj, intf->my_dev_name); if (rv) { - kfree(intf->my_dev_name); - intf->my_dev_name = NULL; dev_err(intf->si_dev, "Unable to create symlink to bmc: %d\n", rv); goto out_free_my_dev_name; diff --git a/drivers/char/ipmi/ipmi_ssif.c b/drivers/char/ipmi/ipmi_ssif.c index 198b65d45c5e..0416b9c9d410 100644 --- a/drivers/char/ipmi/ipmi_ssif.c +++ b/drivers/char/ipmi/ipmi_ssif.c @@ -22,11 +22,6 @@ * and drives the real SSIF state machine. */ -/* - * TODO: Figure out how to use SMB alerts. This will require a new - * interface into the I2C driver, I believe. - */ - #define pr_fmt(fmt) "ipmi_ssif: " fmt #define dev_fmt(fmt) "ipmi_ssif: " fmt diff --git a/drivers/char/ipmi/ipmi_watchdog.c b/drivers/char/ipmi/ipmi_watchdog.c index 55986e10a124..f78156d93c3f 100644 --- a/drivers/char/ipmi/ipmi_watchdog.c +++ b/drivers/char/ipmi/ipmi_watchdog.c @@ -232,12 +232,17 @@ static int set_param_str(const char *val, const struct kernel_param *kp) static int get_param_str(char *buffer, const struct kernel_param *kp) { action_fn fn = (action_fn) kp->arg; - int rv; + int rv, len; rv = fn(NULL, buffer); if (rv) return rv; - return strlen(buffer); + + len = strlen(buffer); + buffer[len++] = '\n'; + buffer[len] = 0; + + return len; } |