Commit ff1cc2fa authored by Christophe JAILLET's avatar Christophe JAILLET Committed by Kalle Valo
Browse files

wireless: Remove redundant 'flush_workqueue()' calls



'destroy_workqueue()' already drains the queue before destroying it, so
there is no need to flush it explicitly.

Remove the redundant 'flush_workqueue()' calls.

This was generated with coccinelle:

@@
expression E;
@@
- 	flush_workqueue(E);
	destroy_workqueue(E);

Signed-off-by: default avatarChristophe JAILLET <christophe.jaillet@wanadoo.fr>
Signed-off-by: default avatarKalle Valo <kvalo@codeaurora.org>
Link: https://lore.kernel.org/r/0855d51423578ad019c0264dad3fe47a2e8af9c7.1633849511.git.christophe.jaillet@wanadoo.fr
parent 3e4beec5
Loading
Loading
Loading
Loading
+0 −3
Original line number Original line Diff line number Diff line
@@ -3520,13 +3520,10 @@ EXPORT_SYMBOL(ath10k_core_create);


void ath10k_core_destroy(struct ath10k *ar)
void ath10k_core_destroy(struct ath10k *ar)
{
{
	flush_workqueue(ar->workqueue);
	destroy_workqueue(ar->workqueue);
	destroy_workqueue(ar->workqueue);


	flush_workqueue(ar->workqueue_aux);
	destroy_workqueue(ar->workqueue_aux);
	destroy_workqueue(ar->workqueue_aux);


	flush_workqueue(ar->workqueue_tx_complete);
	destroy_workqueue(ar->workqueue_tx_complete);
	destroy_workqueue(ar->workqueue_tx_complete);


	ath10k_debug_destroy(ar);
	ath10k_debug_destroy(ar);
+0 −1
Original line number Original line Diff line number Diff line
@@ -2650,7 +2650,6 @@ static void ath10k_sdio_remove(struct sdio_func *func)


	ath10k_core_destroy(ar);
	ath10k_core_destroy(ar);


	flush_workqueue(ar_sdio->workqueue);
	destroy_workqueue(ar_sdio->workqueue);
	destroy_workqueue(ar_sdio->workqueue);
}
}


+0 −1
Original line number Original line Diff line number Diff line
@@ -3819,7 +3819,6 @@ il3945_pci_remove(struct pci_dev *pdev)
	il3945_unset_hw_params(il);
	il3945_unset_hw_params(il);


	/*netif_stop_queue(dev); */
	/*netif_stop_queue(dev); */
	flush_workqueue(il->workqueue);


	/* ieee80211_unregister_hw calls il3945_mac_stop, which flushes
	/* ieee80211_unregister_hw calls il3945_mac_stop, which flushes
	 * il->workqueue... so we can't take down the workqueue
	 * il->workqueue... so we can't take down the workqueue
+0 −1
Original line number Original line Diff line number Diff line
@@ -6731,7 +6731,6 @@ il4965_pci_remove(struct pci_dev *pdev)
	il_eeprom_free(il);
	il_eeprom_free(il);


	/*netif_stop_queue(dev); */
	/*netif_stop_queue(dev); */
	flush_workqueue(il->workqueue);


	/* ieee80211_unregister_hw calls il_mac_stop, which flushes
	/* ieee80211_unregister_hw calls il_mac_stop, which flushes
	 * il->workqueue... so we can't take down the workqueue
	 * il->workqueue... so we can't take down the workqueue
+0 −1
Original line number Original line Diff line number Diff line
@@ -1525,7 +1525,6 @@ static void iwl_op_mode_dvm_stop(struct iwl_op_mode *op_mode)
	kfree(priv->nvm_data);
	kfree(priv->nvm_data);


	/*netif_stop_queue(dev); */
	/*netif_stop_queue(dev); */
	flush_workqueue(priv->workqueue);


	/* ieee80211_unregister_hw calls iwlagn_mac_stop, which flushes
	/* ieee80211_unregister_hw calls iwlagn_mac_stop, which flushes
	 * priv->workqueue... so we can't take down the workqueue
	 * priv->workqueue... so we can't take down the workqueue
Loading