From: Johan Hovold <johan@kernel.org>
To: Johan Hovold <johan@kernel.org>
Cc: linux-usb@vger.kernel.org
Subject: [PATCH 07/10] USB: serial: ti_usb_3410_5052: clean up vendor-request helpers
Date: Mon, 12 Apr 2021 11:47:35 +0200 [thread overview]
Message-ID: <20210412094738.944-8-johan@kernel.org> (raw)
In-Reply-To: <20210412094738.944-1-johan@kernel.org>
Make the vendor-request helpers data parameters be void pointers and
drop the caller casts.
Signed-off-by: Johan Hovold <johan@kernel.org>
---
drivers/usb/serial/ti_usb_3410_5052.c | 15 +++++++--------
1 file changed, 7 insertions(+), 8 deletions(-)
diff --git a/drivers/usb/serial/ti_usb_3410_5052.c b/drivers/usb/serial/ti_usb_3410_5052.c
index 11e6792981b7..25d5a6e83009 100644
--- a/drivers/usb/serial/ti_usb_3410_5052.c
+++ b/drivers/usb/serial/ti_usb_3410_5052.c
@@ -334,9 +334,9 @@ static void ti_stop_read(struct ti_port *tport, struct tty_struct *tty);
static int ti_restart_read(struct ti_port *tport, struct tty_struct *tty);
static int ti_command_out_sync(struct ti_device *tdev, __u8 command,
- __u16 moduleid, __u16 value, __u8 *data, int size);
+ __u16 moduleid, __u16 value, void *data, int size);
static int ti_command_in_sync(struct ti_device *tdev, __u8 command,
- __u16 moduleid, __u16 value, __u8 *data, int size);
+ __u16 moduleid, __u16 value, void *data, int size);
static int ti_write_byte(struct usb_serial_port *port, struct ti_device *tdev,
unsigned long addr, u8 mask, u8 byte);
@@ -999,7 +999,7 @@ static void ti_set_termios(struct tty_struct *tty,
config->wFlags = cpu_to_be16(wflags);
status = ti_command_out_sync(tport->tp_tdev, TI_SET_CONFIG,
- (__u8)(TI_UART1_PORT + port_number), 0, (__u8 *)config,
+ (__u8)(TI_UART1_PORT + port_number), 0, config,
sizeof(*config));
if (status)
dev_err(&port->dev, "%s - cannot set config on port %d, %d\n",
@@ -1376,7 +1376,7 @@ static int ti_get_lsr(struct ti_port *tport, u8 *lsr)
return -ENOMEM;
status = ti_command_in_sync(tdev, TI_GET_PORT_STATUS,
- (__u8)(TI_UART1_PORT+port_number), 0, (__u8 *)data, size);
+ (__u8)(TI_UART1_PORT+port_number), 0, data, size);
if (status) {
dev_err(&port->dev,
"%s - get port status command failed, %d\n",
@@ -1475,7 +1475,7 @@ static int ti_restart_read(struct ti_port *tport, struct tty_struct *tty)
static int ti_command_out_sync(struct ti_device *tdev, __u8 command,
- __u16 moduleid, __u16 value, __u8 *data, int size)
+ __u16 moduleid, __u16 value, void *data, int size)
{
int status;
@@ -1492,7 +1492,7 @@ static int ti_command_out_sync(struct ti_device *tdev, __u8 command,
static int ti_command_in_sync(struct ti_device *tdev, __u8 command,
- __u16 moduleid, __u16 value, __u8 *data, int size)
+ __u16 moduleid, __u16 value, void *data, int size)
{
int status;
@@ -1535,8 +1535,7 @@ static int ti_write_byte(struct usb_serial_port *port,
data->bData[1] = byte;
status = ti_command_out_sync(tdev, TI_WRITE_DATA, TI_RAM_PORT, 0,
- (__u8 *)data, size);
-
+ data, size);
if (status < 0)
dev_err(&port->dev, "%s - failed, %d\n", __func__, status);
--
2.26.3
next prev parent reply other threads:[~2021-04-12 9:53 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-04-12 9:47 [PATCH 00/10] USB: serial: clean up the ti drivers Johan Hovold
2021-04-12 9:47 ` [PATCH 01/10] USB: serial: io_ti: clean up vendor-request helpers Johan Hovold
2021-04-12 9:47 ` [PATCH 02/10] USB: serial: io_ti: add send-port-command helper Johan Hovold
2021-04-12 9:47 ` [PATCH 03/10] USB: serial: io_ti: add read-port-command helper Johan Hovold
2021-04-12 9:47 ` [PATCH 04/10] USB: serial: io_ti: use kernel types consistently Johan Hovold
2021-04-12 9:47 ` [PATCH 05/10] USB: serial: io_ti: drop unnecessary packed attributes Johan Hovold
2021-04-12 9:47 ` [PATCH 06/10] USB: serial: ti_usb_3410_5052: " Johan Hovold
2021-04-12 9:47 ` Johan Hovold [this message]
2021-04-12 9:47 ` [PATCH 08/10] USB: serial: ti_usb_3410_5052: add port-command helpers Johan Hovold
2021-04-12 9:47 ` [PATCH 09/10] USB: serial: ti_usb_3410_5052: use kernel types consistently Johan Hovold
2021-04-12 9:47 ` [PATCH 10/10] USB: serial: ti_usb_3410_5052: clean up termios CSIZE handling Johan Hovold
2021-04-12 10:59 ` [PATCH 00/10] USB: serial: clean up the ti drivers Greg KH
2021-04-13 16:31 ` Johan Hovold
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=20210412094738.944-8-johan@kernel.org \
--to=johan@kernel.org \
--cc=linux-usb@vger.kernel.org \
/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).