Commit 8a76d8b0 authored by Jiri Slaby's avatar Jiri Slaby Committed by Greg Kroah-Hartman
Browse files

net: nfc: remove casts from tty->disc_data



tty->disc_data is 'void *', so there is no need to cast from that.
Therefore remove the casts and assign the pointer directly.

Signed-off-by: default avatarJiri Slaby (SUSE) <jirislaby@kernel.org>
Cc: Max Staudt <max@enpas.org>
Cc: Wolfgang Grandegger <wg@grandegger.com>
Cc: Marc Kleine-Budde <mkl@pengutronix.de>
Cc: "David S. Miller" <davem@davemloft.net>
Cc: Eric Dumazet <edumazet@google.com>
Cc: Jakub Kicinski <kuba@kernel.org>
Cc: Paolo Abeni <pabeni@redhat.com>
Cc: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Cc: linux-can@vger.kernel.org
Cc: netdev@vger.kernel.org
Reviewed-by: default avatarSimon Horman <horms@kernel.org>
Reviewed-by: default avatarMax Staudt <max@enpas.org>
Link: https://lore.kernel.org/r/20230801062237.2687-3-jirislaby@kernel.org


Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent a35f3899
Loading
Loading
Loading
Loading
+4 −4
Original line number Diff line number Diff line
@@ -172,7 +172,7 @@ static int nci_uart_tty_open(struct tty_struct *tty)
 */
static void nci_uart_tty_close(struct tty_struct *tty)
{
	struct nci_uart *nu = (void *)tty->disc_data;
	struct nci_uart *nu = tty->disc_data;

	/* Detach from the tty */
	tty->disc_data = NULL;
@@ -204,7 +204,7 @@ static void nci_uart_tty_close(struct tty_struct *tty)
 */
static void nci_uart_tty_wakeup(struct tty_struct *tty)
{
	struct nci_uart *nu = (void *)tty->disc_data;
	struct nci_uart *nu = tty->disc_data;

	if (!nu)
		return;
@@ -298,7 +298,7 @@ static int nci_uart_default_recv_buf(struct nci_uart *nu, const u8 *data,
static void nci_uart_tty_receive(struct tty_struct *tty, const u8 *data,
				 const char *flags, int count)
{
	struct nci_uart *nu = (void *)tty->disc_data;
	struct nci_uart *nu = tty->disc_data;

	if (!nu || tty != nu->tty)
		return;
@@ -325,7 +325,7 @@ static void nci_uart_tty_receive(struct tty_struct *tty, const u8 *data,
static int nci_uart_tty_ioctl(struct tty_struct *tty, unsigned int cmd,
			      unsigned long arg)
{
	struct nci_uart *nu = (void *)tty->disc_data;
	struct nci_uart *nu = tty->disc_data;
	int err = 0;

	switch (cmd) {