diff mbox series

[net-next] net: nfc: nci: Change the NCI close sequence

Message ID 20201228014631.5557-1-bongsu.jeon@samsung.com (mailing list archive)
State Superseded
Delegated to: Netdev Maintainers
Headers show
Series [net-next] net: nfc: nci: Change the NCI close sequence | expand

Checks

Context Check Description
netdev/cover_letter success Link
netdev/fixes_present success Link
netdev/patch_count success Link
netdev/tree_selection success Clearly marked for net-next
netdev/subject_prefix success Link
netdev/cc_maintainers warning 2 maintainers not CCed: andrew@lunn.ch wanghai38@huawei.com
netdev/source_inline success Was 0 now: 0
netdev/verify_signedoff success Link
netdev/module_param success Was 0 now: 0
netdev/build_32bit success Errors and warnings before: 0 this patch: 0
netdev/kdoc success Errors and warnings before: 0 this patch: 0
netdev/verify_fixes success Link
netdev/checkpatch success total: 0 errors, 0 warnings, 0 checks, 13 lines checked
netdev/build_allmodconfig_warn success Errors and warnings before: 0 this patch: 0
netdev/header_inline success Link
netdev/stable success Stable not CCed

Commit Message

Bongsu Jeon Dec. 28, 2020, 1:46 a.m. UTC
From: Bongsu Jeon <bongsu.jeon@samsung.com>

Change the NCI close sequence because the NCI Command timer should be
deleted after flushing the NCI command work queue.

Signed-off-by: Bongsu Jeon <bongsu.jeon@samsung.com>
---
 net/nfc/nci/core.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

Comments

Jakub Kicinski Dec. 28, 2020, 9:21 p.m. UTC | #1
On Mon, 28 Dec 2020 10:46:31 +0900 Bongsu Jeon wrote:
> From: Bongsu Jeon <bongsu.jeon@samsung.com>
> 
> Change the NCI close sequence because the NCI Command timer should be
> deleted after flushing the NCI command work queue.

The commit message should describe the reason - why new order is
better than the old one. The existing sentence describes what is
changing more than why.
David Miller Jan. 6, 2021, 12:07 a.m. UTC | #2
From: Bongsu Jeon <bongsu.jeon2@gmail.com>
Date: Mon, 28 Dec 2020 10:46:31 +0900

> From: Bongsu Jeon <bongsu.jeon@samsung.com>
> 
> Change the NCI close sequence because the NCI Command timer should be
> deleted after flushing the NCI command work queue.
> 
> Signed-off-by: Bongsu Jeon <bongsu.jeon@samsung.com>

Applied.
diff mbox series

Patch

diff --git a/net/nfc/nci/core.c b/net/nfc/nci/core.c
index e64727e1a72f..79bebf4b0796 100644
--- a/net/nfc/nci/core.c
+++ b/net/nfc/nci/core.c
@@ -579,11 +579,11 @@  static int nci_close_device(struct nci_dev *ndev)
 
 	clear_bit(NCI_INIT, &ndev->flags);
 
-	del_timer_sync(&ndev->cmd_timer);
-
 	/* Flush cmd wq */
 	flush_workqueue(ndev->cmd_wq);
 
+	del_timer_sync(&ndev->cmd_timer);
+
 	/* Clear flags */
 	ndev->flags = 0;