aboutsummaryrefslogtreecommitdiff
path: root/drivers/usb/serial
diff options
context:
space:
mode:
authorJohan Hovold2020-07-08 14:50:00 +0200
committerJohan Hovold2020-07-09 09:20:17 +0200
commiteb0c68ea4246252ba56951c6cf5e5d544a342e9e (patch)
treed837e62125dbad71e2f393ff95ad8009eeb66d1c /drivers/usb/serial
parent7aab96d6e3c54128f9e335fa8b11a0bd8815e118 (diff)
USB: serial: drop redundant transfer-buffer casts
Drop redundant URB transfer-buffer casts. Reviewed-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> Signed-off-by: Johan Hovold <johan@kernel.org>
Diffstat (limited to 'drivers/usb/serial')
-rw-r--r--drivers/usb/serial/aircable.c2
-rw-r--r--drivers/usb/serial/ftdi_sio.c2
-rw-r--r--drivers/usb/serial/generic.c2
-rw-r--r--drivers/usb/serial/option.c3
-rw-r--r--drivers/usb/serial/sierra.c3
-rw-r--r--drivers/usb/serial/ssu100.c2
6 files changed, 6 insertions, 8 deletions
diff --git a/drivers/usb/serial/aircable.c b/drivers/usb/serial/aircable.c
index 84d52953dd0a..a1df686c3066 100644
--- a/drivers/usb/serial/aircable.c
+++ b/drivers/usb/serial/aircable.c
@@ -117,7 +117,7 @@ static int aircable_process_packet(struct usb_serial_port *port,
static void aircable_process_read_urb(struct urb *urb)
{
struct usb_serial_port *port = urb->context;
- char *data = (char *)urb->transfer_buffer;
+ char *data = urb->transfer_buffer;
int has_headers;
int count;
int len;
diff --git a/drivers/usb/serial/ftdi_sio.c b/drivers/usb/serial/ftdi_sio.c
index ade68405b015..871cdccf3a5f 100644
--- a/drivers/usb/serial/ftdi_sio.c
+++ b/drivers/usb/serial/ftdi_sio.c
@@ -2584,7 +2584,7 @@ static void ftdi_process_read_urb(struct urb *urb)
{
struct usb_serial_port *port = urb->context;
struct ftdi_private *priv = usb_get_serial_port_data(port);
- char *data = (char *)urb->transfer_buffer;
+ char *data = urb->transfer_buffer;
int i;
int len;
int count = 0;
diff --git a/drivers/usb/serial/generic.c b/drivers/usb/serial/generic.c
index e60f74f11acc..d10aa3d2ee49 100644
--- a/drivers/usb/serial/generic.c
+++ b/drivers/usb/serial/generic.c
@@ -345,7 +345,7 @@ EXPORT_SYMBOL_GPL(usb_serial_generic_submit_read_urbs);
void usb_serial_generic_process_read_urb(struct urb *urb)
{
struct usb_serial_port *port = urb->context;
- char *ch = (char *)urb->transfer_buffer;
+ char *ch = urb->transfer_buffer;
int i;
if (!urb->actual_length)
diff --git a/drivers/usb/serial/option.c b/drivers/usb/serial/option.c
index 254a8bbeea67..8e74903352e7 100644
--- a/drivers/usb/serial/option.c
+++ b/drivers/usb/serial/option.c
@@ -2151,8 +2151,7 @@ static void option_instat_callback(struct urb *urb)
dev_dbg(dev, "%s: urb %p port %p has data %p\n", __func__, urb, port, portdata);
if (status == 0) {
- struct usb_ctrlrequest *req_pkt =
- (struct usb_ctrlrequest *)urb->transfer_buffer;
+ struct usb_ctrlrequest *req_pkt = urb->transfer_buffer;
if (!req_pkt) {
dev_dbg(dev, "%s: NULL req_pkt\n", __func__);
diff --git a/drivers/usb/serial/sierra.c b/drivers/usb/serial/sierra.c
index e8b130157b57..a862aa788a19 100644
--- a/drivers/usb/serial/sierra.c
+++ b/drivers/usb/serial/sierra.c
@@ -570,8 +570,7 @@ static void sierra_instat_callback(struct urb *urb)
urb, port, portdata);
if (status == 0) {
- struct usb_ctrlrequest *req_pkt =
- (struct usb_ctrlrequest *)urb->transfer_buffer;
+ struct usb_ctrlrequest *req_pkt = urb->transfer_buffer;
if (!req_pkt) {
dev_dbg(&port->dev, "%s: NULL req_pkt\n",
diff --git a/drivers/usb/serial/ssu100.c b/drivers/usb/serial/ssu100.c
index 01472b96bf38..7d39d35e52a1 100644
--- a/drivers/usb/serial/ssu100.c
+++ b/drivers/usb/serial/ssu100.c
@@ -495,7 +495,7 @@ static void ssu100_update_lsr(struct usb_serial_port *port, u8 lsr,
static void ssu100_process_read_urb(struct urb *urb)
{
struct usb_serial_port *port = urb->context;
- char *packet = (char *)urb->transfer_buffer;
+ char *packet = urb->transfer_buffer;
char flag = TTY_NORMAL;
u32 len = urb->actual_length;
int i;