Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

workqueue: avoid using deprecated functions

The network merge brought in a few users of functions that got
deprecated by the workqueue cleanups: the 'system_nrt_wq' is now the
same as the regular system_wq, since all workqueues are now non-
reentrant.

Similarly, remove one use of flush_work_sync() - the regular
flush_work() has become synchronous, and the "_sync()" version is thus
deprecated as being superfluous.

Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>

+19 -19
+1 -1
drivers/net/ieee802154/mrf24j40.c
··· 718 718 dev_dbg(printdev(devrec), "remove\n"); 719 719 720 720 free_irq(spi->irq, devrec); 721 - flush_work_sync(&devrec->irqwork); /* TODO: Is this the right call? */ 721 + flush_work(&devrec->irqwork); /* TODO: Is this the right call? */ 722 722 ieee802154_unregister_device(devrec->dev); 723 723 ieee802154_free_device(devrec->dev); 724 724 /* TODO: Will ieee802154_free_device() wait until ->xmit() is
+1 -1
net/nfc/core.c
··· 715 715 { 716 716 struct nfc_dev *dev = (struct nfc_dev *)data; 717 717 718 - queue_work(system_nrt_wq, &dev->check_pres_work); 718 + schedule_work(&dev->check_pres_work); 719 719 } 720 720 721 721 struct class nfc_class = {
+3 -3
net/nfc/hci/core.c
··· 141 141 kfree(hdev->cmd_pending_msg); 142 142 hdev->cmd_pending_msg = NULL; 143 143 144 - queue_work(system_nrt_wq, &hdev->msg_tx_work); 144 + schedule_work(&hdev->msg_tx_work); 145 145 } 146 146 147 147 void nfc_hci_resp_received(struct nfc_hci_dev *hdev, u8 result, ··· 326 326 { 327 327 struct nfc_hci_dev *hdev = (struct nfc_hci_dev *)data; 328 328 329 - queue_work(system_nrt_wq, &hdev->msg_tx_work); 329 + schedule_work(&hdev->msg_tx_work); 330 330 } 331 331 332 332 static int hci_dev_connect_gates(struct nfc_hci_dev *hdev, u8 gate_count, ··· 714 714 nfc_hci_hcp_message_rx(hdev, pipe, type, instruction, hcp_skb); 715 715 } else { 716 716 skb_queue_tail(&hdev->msg_rx_queue, hcp_skb); 717 - queue_work(system_nrt_wq, &hdev->msg_rx_work); 717 + schedule_work(&hdev->msg_rx_work); 718 718 } 719 719 } 720 720
+1 -1
net/nfc/hci/hcp.c
··· 108 108 list_add_tail(&cmd->msg_l, &hdev->msg_tx_queue); 109 109 mutex_unlock(&hdev->msg_tx_mutex); 110 110 111 - queue_work(system_nrt_wq, &hdev->msg_tx_work); 111 + schedule_work(&hdev->msg_tx_work); 112 112 113 113 return 0; 114 114
+8 -8
net/nfc/hci/llc_shdlc.c
··· 588 588 589 589 pr_debug("\n"); 590 590 591 - queue_work(system_nrt_wq, &shdlc->sm_work); 591 + schedule_work(&shdlc->sm_work); 592 592 } 593 593 594 594 static void llc_shdlc_t1_timeout(unsigned long data) ··· 597 597 598 598 pr_debug("SoftIRQ: need to send ack\n"); 599 599 600 - queue_work(system_nrt_wq, &shdlc->sm_work); 600 + schedule_work(&shdlc->sm_work); 601 601 } 602 602 603 603 static void llc_shdlc_t2_timeout(unsigned long data) ··· 606 606 607 607 pr_debug("SoftIRQ: need to retransmit\n"); 608 608 609 - queue_work(system_nrt_wq, &shdlc->sm_work); 609 + schedule_work(&shdlc->sm_work); 610 610 } 611 611 612 612 static void llc_shdlc_sm_work(struct work_struct *work) ··· 646 646 case SHDLC_NEGOTIATING: 647 647 if (timer_pending(&shdlc->connect_timer) == 0) { 648 648 shdlc->state = SHDLC_CONNECTING; 649 - queue_work(system_nrt_wq, &shdlc->sm_work); 649 + schedule_work(&shdlc->sm_work); 650 650 } 651 651 652 652 llc_shdlc_handle_rcv_queue(shdlc); ··· 711 711 712 712 mutex_unlock(&shdlc->state_mutex); 713 713 714 - queue_work(system_nrt_wq, &shdlc->sm_work); 714 + schedule_work(&shdlc->sm_work); 715 715 716 716 wait_event(connect_wq, shdlc->connect_result != 1); 717 717 ··· 728 728 729 729 mutex_unlock(&shdlc->state_mutex); 730 730 731 - queue_work(system_nrt_wq, &shdlc->sm_work); 731 + schedule_work(&shdlc->sm_work); 732 732 } 733 733 734 734 /* ··· 746 746 skb_queue_tail(&shdlc->rcv_q, skb); 747 747 } 748 748 749 - queue_work(system_nrt_wq, &shdlc->sm_work); 749 + schedule_work(&shdlc->sm_work); 750 750 } 751 751 752 752 static void *llc_shdlc_init(struct nfc_hci_dev *hdev, xmit_to_drv_t xmit_to_drv, ··· 837 837 838 838 skb_queue_tail(&shdlc->send_q, skb); 839 839 840 - queue_work(system_nrt_wq, &shdlc->sm_work); 840 + schedule_work(&shdlc->sm_work); 841 841 842 842 return 0; 843 843 }
+5 -5
net/nfc/llcp/llcp.c
··· 181 181 182 182 pr_err("SYMM timeout\n"); 183 183 184 - queue_work(system_nrt_wq, &local->timeout_work); 184 + schedule_work(&local->timeout_work); 185 185 } 186 186 187 187 struct nfc_llcp_local *nfc_llcp_find_local(struct nfc_dev *dev) ··· 1101 1101 1102 1102 } 1103 1103 1104 - queue_work(system_nrt_wq, &local->tx_work); 1104 + schedule_work(&local->tx_work); 1105 1105 kfree_skb(local->rx_pending); 1106 1106 local->rx_pending = NULL; 1107 1107 ··· 1120 1120 1121 1121 local->rx_pending = skb_get(skb); 1122 1122 del_timer(&local->link_timer); 1123 - queue_work(system_nrt_wq, &local->rx_work); 1123 + schedule_work(&local->rx_work); 1124 1124 1125 1125 return; 1126 1126 } ··· 1135 1135 1136 1136 local->rx_pending = skb_get(skb); 1137 1137 del_timer(&local->link_timer); 1138 - queue_work(system_nrt_wq, &local->rx_work); 1138 + schedule_work(&local->rx_work); 1139 1139 1140 1140 return 0; 1141 1141 } ··· 1170 1170 if (rf_mode == NFC_RF_INITIATOR) { 1171 1171 pr_debug("Queueing Tx work\n"); 1172 1172 1173 - queue_work(system_nrt_wq, &local->tx_work); 1173 + schedule_work(&local->tx_work); 1174 1174 } else { 1175 1175 mod_timer(&local->link_timer, 1176 1176 jiffies + msecs_to_jiffies(local->remote_lto));