USB: sisusbvga: change char to u8 for sisusb_copy_memory
authorChangming Liu <liu.changm@northeastern.edu>
Sat, 30 May 2020 01:48:15 +0000 (21:48 -0400)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 18 Jun 2020 08:33:55 +0000 (10:33 +0200)
sisusb_copy_memory is called in several places.

sisusb_copy_memory calls sisusb_write_mem_bulk which
is called by sisusb_write and sisusb_send_bulk_msg.

change the related parameters from char to u8 accordingly

Signed-off-by: Changming Liu <liu.changm@northeastern.edu>
Link: https://lore.kernel.org/r/20200530014820.9967-2-liu.changm@northeastern.edu
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/usb/misc/sisusbvga/sisusb.c
drivers/usb/misc/sisusbvga/sisusb_con.c
drivers/usb/misc/sisusbvga/sisusb_init.h

index fc8a5da..88c4975 100644 (file)
@@ -1283,7 +1283,7 @@ int sisusb_readb(struct sisusb_usb_data *sisusb, u32 adr, u8 *data)
        return sisusb_read_memio_byte(sisusb, SISUSB_TYPE_MEM, adr, data);
 }
 
-int sisusb_copy_memory(struct sisusb_usb_data *sisusb, char *src,
+int sisusb_copy_memory(struct sisusb_usb_data *sisusb, u8 *src,
                u32 dest, int length)
 {
        size_t dummy;
@@ -1307,7 +1307,7 @@ static int sisusb_read_memory(struct sisusb_usb_data *sisusb, char *dest,
 #ifdef SISUSBENDIANTEST
 static void sisusb_testreadwrite(struct sisusb_usb_data *sisusb)
 {
-       static char srcbuffer[] = { 0x11, 0x22, 0x33, 0x44, 0x55, 0x66, 0x77 };
+       static u8 srcbuffer[] = { 0x11, 0x22, 0x33, 0x44, 0x55, 0x66, 0x77 };
        char destbuffer[10];
        int i, j;
 
@@ -2340,7 +2340,7 @@ int sisusb_reset_text_mode(struct sisusb_usb_data *sisusb, int init)
                }
 
        } else if (sisusb->scrbuf) {
-               ret |= sisusb_copy_memory(sisusb, (char *)sisusb->scrbuf,
+               ret |= sisusb_copy_memory(sisusb, (u8 *)sisusb->scrbuf,
                                sisusb->vrambase, sisusb->scrbuf_size);
        }
 
index 586d6b0..15e62a2 100644 (file)
@@ -509,7 +509,7 @@ sisusbcon_switch(struct vc_data *c)
        /* Restore the screen contents */
        memcpy((u16 *)c->vc_origin, (u16 *)c->vc_screenbuf, length);
 
-       sisusb_copy_memory(sisusb, (char *)c->vc_origin,
+       sisusb_copy_memory(sisusb, (u8 *)c->vc_origin,
                        sisusb_haddr(sisusb, c, 0, 0), length);
 
        mutex_unlock(&sisusb->lock);
@@ -615,7 +615,7 @@ sisusbcon_blank(struct vc_data *c, int blank, int mode_switch)
                sisusbcon_memsetw((u16 *)c->vc_origin,
                                c->vc_video_erase_char,
                                c->vc_screenbuf_size);
-               sisusb_copy_memory(sisusb, (char *)c->vc_origin,
+               sisusb_copy_memory(sisusb, (u8 *)c->vc_origin,
                                sisusb_haddr(sisusb, c, 0, 0),
                                c->vc_screenbuf_size);
                sisusb->con_blanked = 1;
@@ -897,18 +897,18 @@ sisusbcon_scroll(struct vc_data *c, unsigned int t, unsigned int b,
 
        if (copyall)
                sisusb_copy_memory(sisusb,
-                       (char *)c->vc_origin,
+                       (u8 *)c->vc_origin,
                        sisusb_haddr(sisusb, c, 0, 0),
                        c->vc_screenbuf_size);
        else if (dir == SM_UP)
                sisusb_copy_memory(sisusb,
-                       (char *)c->vc_origin + c->vc_screenbuf_size - delta,
+                       (u8 *)c->vc_origin + c->vc_screenbuf_size - delta,
                        sisusb_haddr(sisusb, c, 0, 0) +
                                        c->vc_screenbuf_size - delta,
                        delta);
        else
                sisusb_copy_memory(sisusb,
-                       (char *)c->vc_origin,
+                       (u8 *)c->vc_origin,
                        sisusb_haddr(sisusb, c, 0, 0),
                        delta);
 
index aa33bc8..b79bdf9 100644 (file)
@@ -828,7 +828,7 @@ extern int sisusb_setidxregand(struct sisusb_usb_data *sisusb, u32 port,
 void sisusb_delete(struct kref *kref);
 int sisusb_writeb(struct sisusb_usb_data *sisusb, u32 adr, u8 data);
 int sisusb_readb(struct sisusb_usb_data *sisusb, u32 adr, u8 * data);
-int sisusb_copy_memory(struct sisusb_usb_data *sisusb, char *src,
+int sisusb_copy_memory(struct sisusb_usb_data *sisusb, u8 *src,
                       u32 dest, int length);
 int sisusb_reset_text_mode(struct sisusb_usb_data *sisusb, int init);
 int sisusbcon_do_font_op(struct sisusb_usb_data *sisusb, int set, int slot,