All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] net: nfc: Removing unnecessaey code in nci_open_device()
@ 2020-01-16  2:52 Gen Zhang
  2020-01-16  9:17 ` David Miller
  0 siblings, 1 reply; 2+ messages in thread
From: Gen Zhang @ 2020-01-16  2:52 UTC (permalink / raw)
  To: davem, tglx, alexios.zavras, allison; +Cc: netdev, linux-kernel

In nci_open_device(), since we already call clear_bit(), so set ndev->flags
to 0 is not needed.

Signed-off-by: Gen Zhang <blackgod016574@gmail.com>
---
diff --git a/net/nfc/nci/core.c b/net/nfc/nci/core.c
index 7cd5248..25dae74 100644
--- a/net/nfc/nci/core.c
+++ b/net/nfc/nci/core.c
@@ -522,7 +522,6 @@ static int nci_open_device(struct nci_dev *ndev)
 		skb_queue_purge(&ndev->tx_q);
 
 		ndev->ops->close(ndev);
-		ndev->flags = 0;
 	}
 
 done:

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] net: nfc: Removing unnecessaey code in nci_open_device()
  2020-01-16  2:52 [PATCH] net: nfc: Removing unnecessaey code in nci_open_device() Gen Zhang
@ 2020-01-16  9:17 ` David Miller
  0 siblings, 0 replies; 2+ messages in thread
From: David Miller @ 2020-01-16  9:17 UTC (permalink / raw)
  To: blackgod016574; +Cc: tglx, alexios.zavras, allison, netdev, linux-kernel

From: Gen Zhang <blackgod016574@gmail.com>
Date: Thu, 16 Jan 2020 10:52:04 +0800

> In nci_open_device(), since we already call clear_bit(), so set ndev->flags
> to 0 is not needed.
> 
> Signed-off-by: Gen Zhang <blackgod016574@gmail.com>

There are several bits in this flags value, not just the one managed
here in this function (NCI_INIT).

This assignment is harmless and makes the code easier to audit,
therefore I am not applying this patch.

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2020-01-16  9:17 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-01-16  2:52 [PATCH] net: nfc: Removing unnecessaey code in nci_open_device() Gen Zhang
2020-01-16  9:17 ` David Miller

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.