提交 f67d6620 编写于 作者: L Linus Torvalds

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

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
...@@ -462,9 +462,9 @@ static int bt_bmc_probe(struct platform_device *pdev) ...@@ -462,9 +462,9 @@ static int bt_bmc_probe(struct platform_device *pdev)
mutex_init(&bt_bmc->mutex); mutex_init(&bt_bmc->mutex);
init_waitqueue_head(&bt_bmc->queue); init_waitqueue_head(&bt_bmc->queue);
bt_bmc->miscdev.minor = MISC_DYNAMIC_MINOR, bt_bmc->miscdev.minor = MISC_DYNAMIC_MINOR;
bt_bmc->miscdev.name = DEVICE_NAME, bt_bmc->miscdev.name = DEVICE_NAME;
bt_bmc->miscdev.fops = &bt_bmc_fops, bt_bmc->miscdev.fops = &bt_bmc_fops;
bt_bmc->miscdev.parent = dev; bt_bmc->miscdev.parent = dev;
rc = misc_register(&bt_bmc->miscdev); rc = misc_register(&bt_bmc->miscdev);
if (rc) { if (rc) {
......
...@@ -490,7 +490,6 @@ static long ipmi_ioctl(struct file *file, ...@@ -490,7 +490,6 @@ static long ipmi_ioctl(struct file *file,
} }
return ipmi_set_my_address(priv->user, val.channel, val.value); return ipmi_set_my_address(priv->user, val.channel, val.value);
break;
} }
case IPMICTL_GET_MY_CHANNEL_ADDRESS_CMD: case IPMICTL_GET_MY_CHANNEL_ADDRESS_CMD:
......
...@@ -747,7 +747,8 @@ int ipmi_smi_watcher_register(struct ipmi_smi_watcher *watcher) ...@@ -747,7 +747,8 @@ int ipmi_smi_watcher_register(struct ipmi_smi_watcher *watcher)
list_add(&watcher->link, &smi_watchers); list_add(&watcher->link, &smi_watchers);
index = srcu_read_lock(&ipmi_interfaces_srcu); 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); int intf_num = READ_ONCE(intf->intf_num);
if (intf_num == -1) if (intf_num == -1)
......
...@@ -495,7 +495,7 @@ static void panic_halt_ipmi_heartbeat(void) ...@@ -495,7 +495,7 @@ static void panic_halt_ipmi_heartbeat(void)
msg.cmd = IPMI_WDOG_RESET_TIMER; msg.cmd = IPMI_WDOG_RESET_TIMER;
msg.data = NULL; msg.data = NULL;
msg.data_len = 0; msg.data_len = 0;
atomic_add(1, &panic_done_count); atomic_inc(&panic_done_count);
rv = ipmi_request_supply_msgs(watchdog_user, rv = ipmi_request_supply_msgs(watchdog_user,
(struct ipmi_addr *) &addr, (struct ipmi_addr *) &addr,
0, 0,
...@@ -505,7 +505,7 @@ static void panic_halt_ipmi_heartbeat(void) ...@@ -505,7 +505,7 @@ static void panic_halt_ipmi_heartbeat(void)
&panic_halt_heartbeat_recv_msg, &panic_halt_heartbeat_recv_msg,
1); 1);
if (rv) if (rv)
atomic_sub(1, &panic_done_count); atomic_dec(&panic_done_count);
} }
static struct ipmi_smi_msg panic_halt_smi_msg = { static struct ipmi_smi_msg panic_halt_smi_msg = {
...@@ -529,12 +529,12 @@ static void panic_halt_ipmi_set_timeout(void) ...@@ -529,12 +529,12 @@ static void panic_halt_ipmi_set_timeout(void)
/* Wait for the messages to be free. */ /* Wait for the messages to be free. */
while (atomic_read(&panic_done_count) != 0) while (atomic_read(&panic_done_count) != 0)
ipmi_poll_interface(watchdog_user); ipmi_poll_interface(watchdog_user);
atomic_add(1, &panic_done_count); atomic_inc(&panic_done_count);
rv = __ipmi_set_timeout(&panic_halt_smi_msg, rv = __ipmi_set_timeout(&panic_halt_smi_msg,
&panic_halt_recv_msg, &panic_halt_recv_msg,
&send_heartbeat_now); &send_heartbeat_now);
if (rv) { if (rv) {
atomic_sub(1, &panic_done_count); atomic_dec(&panic_done_count);
pr_warn("Unable to extend the watchdog timeout\n"); pr_warn("Unable to extend the watchdog timeout\n");
} else { } else {
if (send_heartbeat_now) if (send_heartbeat_now)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册