From: "Jiri Slaby (SUSE)" <jirislaby@kernel.org>
To: gregkh@linuxfoundation.org
Cc: linux-serial@vger.kernel.org, linux-kernel@vger.kernel.org,
"Jiri Slaby (SUSE)" <jirislaby@kernel.org>,
Dario Binacchi <dario.binacchi@amarulasolutions.com>,
Wolfgang Grandegger <wg@grandegger.com>,
Marc Kleine-Budde <mkl@pengutronix.de>,
"David S. Miller" <davem@davemloft.net>,
Eric Dumazet <edumazet@google.com>,
Jakub Kicinski <kuba@kernel.org>, Paolo Abeni <pabeni@redhat.com>,
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 [thread overview]
Message-ID: <20230731080244.2698-6-jirislaby@kernel.org> (raw)
In-Reply-To: <20230731080244.2698-1-jirislaby@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) <jirislaby@kernel.org>
Cc: Dario Binacchi <dario.binacchi@amarulasolutions.com>
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: linux-can@vger.kernel.org
Cc: netdev@vger.kernel.org
---
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) {
--
2.41.0
next prev parent reply other threads:[~2023-07-31 8:05 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-07-31 8:02 [PATCH 00/10] tty: minor cleanups Jiri Slaby (SUSE)
2023-07-31 8:02 ` [PATCH 01/10] serial: move WARN_ON() in uart_write() to the condition Jiri Slaby (SUSE)
2023-07-31 8:02 ` [PATCH 02/10] Bluetooth: rfcomm: remove casts from tty->driver_data Jiri Slaby (SUSE)
2023-07-31 8:02 ` [PATCH 03/10] tty: hvsi: remove an extra variable from hvsi_write() Jiri Slaby (SUSE)
2023-07-31 8:02 ` [PATCH 04/10] input: serport: remove casts from tty->disc_data Jiri Slaby (SUSE)
2023-07-31 16:18 ` Dmitry Torokhov
2023-07-31 8:02 ` Jiri Slaby (SUSE) [this message]
2023-07-31 8:16 ` [PATCH 05/10] can: slcan: " Marc Kleine-Budde
2023-07-31 8:02 ` [PATCH 06/10] serial: altera_jtaguart: switch status to u32 Jiri Slaby (SUSE)
2023-08-08 14:34 ` Tobias Klauser
2023-07-31 8:02 ` [PATCH 07/10] speakup: switch to unsigned iterator in spk_ttyio_receive_buf2() Jiri Slaby (SUSE)
2023-07-31 8:02 ` [PATCH 08/10] misc: ti-st: remove forward declarations and make st_int_recv() static Jiri Slaby (SUSE)
2023-07-31 8:02 ` [PATCH 09/10] misc: ti-st: remove ptr from recv functions Jiri Slaby (SUSE)
2023-07-31 8:02 ` [PATCH 10/10] misc: ti-st: don't check for tty data == NULL Jiri Slaby (SUSE)
2023-07-31 8:15 ` [PATCH 00/10] tty: minor cleanups Marc Kleine-Budde
2023-07-31 8:21 ` Jiri Slaby
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20230731080244.2698-6-jirislaby@kernel.org \
--to=jirislaby@kernel.org \
--cc=dario.binacchi@amarulasolutions.com \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=gregkh@linuxfoundation.org \
--cc=kuba@kernel.org \
--cc=linux-can@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-serial@vger.kernel.org \
--cc=mkl@pengutronix.de \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=wg@grandegger.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).