Skip to content

Commit

Permalink
Merge tag 'for-linus-5.11-1' of git://github.com/cminyard/linux-ipmi
Browse files Browse the repository at this point in the history
Pull IPMI updates from Corey Minyard:
 "Some very minor changes.

  Nothing functional, just little syntax cleanups and a RCU warning
  suppression"

* tag 'for-linus-5.11-1' of git://github.com/cminyard/linux-ipmi:
  char: ipmi: convert comma to semicolon
  ipmi: msghandler: Suppress suspicious RCU usage warning
  ipmi/watchdog: replace atomic_add() and atomic_sub()
  char: ipmi: remove unneeded break
  • Loading branch information
Linus Torvalds committed Dec 16, 2020
2 parents 84e010e + fad0319 commit f67d662
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 9 deletions.
6 changes: 3 additions & 3 deletions drivers/char/ipmi/bt-bmc.c
Original file line number Diff line number Diff line change
Expand Up @@ -462,9 +462,9 @@ static int bt_bmc_probe(struct platform_device *pdev)
mutex_init(&bt_bmc->mutex);
init_waitqueue_head(&bt_bmc->queue);

bt_bmc->miscdev.minor = MISC_DYNAMIC_MINOR,
bt_bmc->miscdev.name = DEVICE_NAME,
bt_bmc->miscdev.fops = &bt_bmc_fops,
bt_bmc->miscdev.minor = MISC_DYNAMIC_MINOR;
bt_bmc->miscdev.name = DEVICE_NAME;
bt_bmc->miscdev.fops = &bt_bmc_fops;
bt_bmc->miscdev.parent = dev;
rc = misc_register(&bt_bmc->miscdev);
if (rc) {
Expand Down
1 change: 0 additions & 1 deletion drivers/char/ipmi/ipmi_devintf.c
Original file line number Diff line number Diff line change
Expand Up @@ -490,7 +490,6 @@ static long ipmi_ioctl(struct file *file,
}

return ipmi_set_my_address(priv->user, val.channel, val.value);
break;
}

case IPMICTL_GET_MY_CHANNEL_ADDRESS_CMD:
Expand Down
3 changes: 2 additions & 1 deletion drivers/char/ipmi/ipmi_msghandler.c
Original file line number Diff line number Diff line change
Expand Up @@ -747,7 +747,8 @@ int ipmi_smi_watcher_register(struct ipmi_smi_watcher *watcher)
list_add(&watcher->link, &smi_watchers);

index = srcu_read_lock(&ipmi_interfaces_srcu);
list_for_each_entry_rcu(intf, &ipmi_interfaces, link) {
list_for_each_entry_rcu(intf, &ipmi_interfaces, link,
lockdep_is_held(&smi_watchers_mutex)) {
int intf_num = READ_ONCE(intf->intf_num);

if (intf_num == -1)
Expand Down
8 changes: 4 additions & 4 deletions drivers/char/ipmi/ipmi_watchdog.c
Original file line number Diff line number Diff line change
Expand Up @@ -495,7 +495,7 @@ static void panic_halt_ipmi_heartbeat(void)
msg.cmd = IPMI_WDOG_RESET_TIMER;
msg.data = NULL;
msg.data_len = 0;
atomic_add(1, &panic_done_count);
atomic_inc(&panic_done_count);
rv = ipmi_request_supply_msgs(watchdog_user,
(struct ipmi_addr *) &addr,
0,
Expand All @@ -505,7 +505,7 @@ static void panic_halt_ipmi_heartbeat(void)
&panic_halt_heartbeat_recv_msg,
1);
if (rv)
atomic_sub(1, &panic_done_count);
atomic_dec(&panic_done_count);
}

static struct ipmi_smi_msg panic_halt_smi_msg = {
Expand All @@ -529,12 +529,12 @@ static void panic_halt_ipmi_set_timeout(void)
/* Wait for the messages to be free. */
while (atomic_read(&panic_done_count) != 0)
ipmi_poll_interface(watchdog_user);
atomic_add(1, &panic_done_count);
atomic_inc(&panic_done_count);
rv = __ipmi_set_timeout(&panic_halt_smi_msg,
&panic_halt_recv_msg,
&send_heartbeat_now);
if (rv) {
atomic_sub(1, &panic_done_count);
atomic_dec(&panic_done_count);
pr_warn("Unable to extend the watchdog timeout\n");
} else {
if (send_heartbeat_now)
Expand Down

0 comments on commit f67d662

Please sign in to comment.