From patchwork Mon Jul 31 08:02:39 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jiri Slaby X-Patchwork-Id: 13333991 X-Patchwork-Delegate: kuba@kernel.org Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 40F6C11C84 for ; Mon, 31 Jul 2023 08:02:57 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id ECEAAC43395; Mon, 31 Jul 2023 08:02:54 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1690790577; bh=t10N72oEfrdWvctrgvxTa70mihQMypTsXP5is3fxQas=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=YFMtHrIhFzDSxjMCDs1WdZHEIKSx1+VX1YOY/dFgDZvmbzMGfH3RP0d+HhZhoU19t hZlT/E0OjVoFFCdn2M8gZRsVrZNFE2xg83Ly7od1GPm5C1479rkTdgj2CLZwfW4StB Twg4NRjSSaCFE4FsvZnKpqxXBAEeeD+q1lGqu2NjPqo2pBNKFOQ5tJgchlY82DRpY/ y7G0cT1PMK0AtF+xJ/BnB89INOyuzs3Ym2JPcAl0VlkWU7chVbYhaAI4cIrdI563VT p2H/YQNsB5sSXBMzPudyFIfUmPr6nK0XXZhNJbJcf8VxCiGpnxOSlqz7nQVXFZT6aP dJpIUIMMVM3Cw== From: "Jiri Slaby (SUSE)" To: gregkh@linuxfoundation.org Cc: linux-serial@vger.kernel.org, linux-kernel@vger.kernel.org, "Jiri Slaby (SUSE)" , Dario Binacchi , Wolfgang Grandegger , Marc Kleine-Budde , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , linux-can@vger.kernel.org, netdev@vger.kernel.org Subject: [PATCH 05/10] can: slcan: remove casts from tty->disc_data Date: Mon, 31 Jul 2023 10:02:39 +0200 Message-ID: <20230731080244.2698-6-jirislaby@kernel.org> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20230731080244.2698-1-jirislaby@kernel.org> References: <20230731080244.2698-1-jirislaby@kernel.org> Precedence: bulk X-Mailing-List: netdev@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-Patchwork-Delegate: kuba@kernel.org 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: Jiri Slaby (SUSE) Cc: Dario Binacchi Cc: Wolfgang Grandegger Cc: Marc Kleine-Budde Cc: "David S. Miller" Cc: Eric Dumazet Cc: Jakub Kicinski Cc: Paolo Abeni Cc: linux-can@vger.kernel.org Cc: netdev@vger.kernel.org Acked-by: Marc Kleine-Budde --- drivers/net/can/slcan/slcan-core.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/net/can/slcan/slcan-core.c b/drivers/net/can/slcan/slcan-core.c index f4db77007c13..371af9d17b14 100644 --- a/drivers/net/can/slcan/slcan-core.c +++ b/drivers/net/can/slcan/slcan-core.c @@ -583,7 +583,7 @@ static void slcan_transmit(struct work_struct *work) */ static void slcan_write_wakeup(struct tty_struct *tty) { - struct slcan *sl = (struct slcan *)tty->disc_data; + struct slcan *sl = tty->disc_data; schedule_work(&sl->tx_work); } @@ -778,7 +778,7 @@ static void slcan_receive_buf(struct tty_struct *tty, const unsigned char *cp, const char *fp, int count) { - struct slcan *sl = (struct slcan *)tty->disc_data; + struct slcan *sl = tty->disc_data; if (!netif_running(sl->dev)) return; @@ -862,7 +862,7 @@ static int slcan_open(struct tty_struct *tty) */ static void slcan_close(struct tty_struct *tty) { - struct slcan *sl = (struct slcan *)tty->disc_data; + struct slcan *sl = tty->disc_data; unregister_candev(sl->dev); @@ -886,7 +886,7 @@ static void slcan_close(struct tty_struct *tty) static int slcan_ioctl(struct tty_struct *tty, unsigned int cmd, unsigned long arg) { - struct slcan *sl = (struct slcan *)tty->disc_data; + struct slcan *sl = tty->disc_data; unsigned int tmp; switch (cmd) {