Skip to contentSkip to conversation

nfc: hci: Remove unused nfc_llc_unregister

PATCH Applied [email protected] 4 participants 4 messages Feb 19, 2025 – Feb 20, 2025

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 nfc: hci: Remove unused nfc_llc_unregister

From: "Dr. David Alan Gilbert" <[email protected]>

nfc_llc_unregister() has been unused since it was added in 2012's commit 67cccfe17d1b ("NFC: Add an LLC Core layer to HCI")

Remove it.

---
 net/nfc/hci/llc.c | 11 -----------
 net/nfc/hci/llc.h |  1 -
 2 files changed, 12 deletions(-)
net/nfc/hci/llc.c +0 -11
index ba91284f4086..e6cf4eb06b46 100644
@@ -78,17 +78,6 @@ static struct nfc_llc_engine *nfc_llc_name_to_engine(const char *name)
 	return NULL;
 }
 
-void nfc_llc_unregister(const char *name)
-{
-	struct nfc_llc_engine *llc_engine;
-
-	llc_engine = nfc_llc_name_to_engine(name);
-	if (llc_engine == NULL)
-		return;
-
-	nfc_llc_del_engine(llc_engine);
-}
-
 struct nfc_llc *nfc_llc_allocate(const char *name, struct nfc_hci_dev *hdev,
 				 xmit_to_drv_t xmit_to_drv,
 				 rcv_to_hci_t rcv_to_hci, int tx_headroom,
net/nfc/hci/llc.h +0 -1
index d66271d211a5..09914608ec43 100644
@@ -40,7 +40,6 @@ struct nfc_llc {
 void *nfc_llc_get_data(struct nfc_llc *llc);
 
 int nfc_llc_register(const char *name, const struct nfc_llc_ops *ops);
-void nfc_llc_unregister(const char *name);
 
 int nfc_llc_nop_register(void);
 
Signature · 1 line
2.48.1
Reviewed-by on v1 1/1
#2 lore raw
In reply to [email protected]
Quoted 4 lines · On 19/02/2025 03:02, [email protected] wrote:

From: "Dr. David Alan Gilbert" <[email protected]>

nfc_llc_unregister() has been unused since it was added in 2012's commit 67cccfe17d1b ("NFC: Add an LLC Core layer to HCI")

... and it is basically part of nfc_llc_exit() already, so no need to call it.

I would like to see that you actually investigated that this cleanup should not be called, instead of just blindly removing code.

Best regards,
Krzysztof

#3 lore raw
In reply to [email protected]
This patch was applied to netdev/net-next.git (main) by Jakub Kicinski <[email protected]>:

Hello:

This patch was applied to netdev/net-next.git (main) by Jakub Kicinski <[email protected]>:

Quoted 8 lines · On Wed, 19 Feb 2025 02:02:58 +0000 you wrote:

From: "Dr. David Alan Gilbert" <[email protected]>

nfc_llc_unregister() has been unused since it was added in 2012's commit 67cccfe17d1b ("NFC: Add an LLC Core layer to HCI")

Remove it.

[...]

Here is the summary with links:
- [net-next] nfc: hci: Remove unused nfc_llc_unregister

    https://git.kernel.org/netdev/net-next/c/9a6c2b2bdd5e

You are awesome, thank you!

Signature · 2 lines
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html