From: Jiri Slaby Date: Tue, 2 Mar 2021 06:21:47 +0000 (+0100) Subject: net: nfc: nci: drop nci_uart_default_recv X-Git-Tag: accepted/tizen/unified/20230118.172025~7413^2~170 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=11771e0bf13c9fefc31481a4ebc9271b4d495892;p=platform%2Fkernel%2Flinux-rpi.git net: nfc: nci: drop nci_uart_default_recv nci_uart_register returns -EINVAL immediately when nu->ops.recv is not set. So the same 'if' later never triggers so nci_uart_default_recv is never used. Drop it. Cc: "David S. Miller" Cc: Jakub Kicinski Cc: netdev@vger.kernel.org Signed-off-by: Jiri Slaby Link: https://lore.kernel.org/r/20210302062214.29627-17-jslaby@suse.cz Signed-off-by: Greg Kroah-Hartman --- diff --git a/net/nfc/nci/uart.c b/net/nfc/nci/uart.c index 5cf7d37..9958b37 100644 --- a/net/nfc/nci/uart.c +++ b/net/nfc/nci/uart.c @@ -387,12 +387,6 @@ static int nci_uart_send(struct nci_uart *nu, struct sk_buff *skb) return 0; } -/* -- Default recv handler -- */ -static int nci_uart_default_recv(struct nci_uart *nu, struct sk_buff *skb) -{ - return nci_recv_frame(nu->ndev, skb); -} - int nci_uart_register(struct nci_uart *nu) { if (!nu || !nu->ops.open || @@ -402,10 +396,6 @@ int nci_uart_register(struct nci_uart *nu) /* Set the send callback */ nu->ops.send = nci_uart_send; - /* Install default handlers if not overridden */ - if (!nu->ops.recv) - nu->ops.recv = nci_uart_default_recv; - /* Add this driver in the driver list */ if (nci_uart_drivers[nu->driver]) { pr_err("driver %d is already registered\n", nu->driver);