USB: serial: drop redundant transfer-buffer casts
authorJohan Hovold <johan@kernel.org>
Wed, 8 Jul 2020 12:50:00 +0000 (14:50 +0200)
committerJohan Hovold <johan@kernel.org>
Thu, 9 Jul 2020 07:20:17 +0000 (09:20 +0200)
Drop redundant URB transfer-buffer casts.

Reviewed-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Johan Hovold <johan@kernel.org>
drivers/usb/serial/aircable.c
drivers/usb/serial/ftdi_sio.c
drivers/usb/serial/generic.c
drivers/usb/serial/option.c
drivers/usb/serial/sierra.c
drivers/usb/serial/ssu100.c

index 84d52953dd0a1df9f60bb0c0d008269639cdbd62..a1df686c306648ec68471ead3d6dca0ee8a62771 100644 (file)
@@ -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;
index ade68405b01551b94e802a390a45832bb8f9e98d..871cdccf3a5f1c6ec69d30ad0bd0bd2fa33f3af5 100644 (file)
@@ -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;
index e60f74f11acce76ec065f9ec8eb2cefb3f7f9c3a..d10aa3d2ee490976182483b21399806bfee768cd 100644 (file)
@@ -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)
index 254a8bbeea676c3e3395c2685c878a1b8366f650..8e74903352e722fa7df0133c9d4fda109b28fc78 100644 (file)
@@ -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__);
index e8b130157b572bd9038226ab33d9b992bd3afc86..a862aa788a19db99893c10afcc15780f9f509956 100644 (file)
@@ -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",
index 01472b96bf385df081482fa98a50c51b4a69ff85..7d39d35e52a130aedc6acc462b8ba26bfae6b99c 100644 (file)
@@ -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;