From: Changming <charley.ashbringer@gmail.com>
To: gregkh@linuxfoundation.org
Cc: linux-usb@vger.kernel.org, thomas@winischhofer.net,
Changming Liu <liu.changm@northeastern.edu>
Subject: [PATCH 1/6] USB: sisusbvga: change char to u8 for sisusb_copy_memory
Date: Fri, 29 May 2020 21:48:15 -0400 [thread overview]
Message-ID: <20200530014820.9967-2-liu.changm@northeastern.edu> (raw)
In-Reply-To: <20200530014820.9967-1-liu.changm@northeastern.edu>
From: Changming Liu <liu.changm@northeastern.edu>
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>
---
drivers/usb/misc/sisusbvga/sisusb.c | 6 +++---
drivers/usb/misc/sisusbvga/sisusb_con.c | 10 +++++-----
drivers/usb/misc/sisusbvga/sisusb_init.h | 2 +-
3 files changed, 9 insertions(+), 9 deletions(-)
diff --git a/drivers/usb/misc/sisusbvga/sisusb.c b/drivers/usb/misc/sisusbvga/sisusb.c
index fc8a5da4a07c..88c4975e303d 100644
--- a/drivers/usb/misc/sisusbvga/sisusb.c
+++ b/drivers/usb/misc/sisusbvga/sisusb.c
@@ -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);
}
diff --git a/drivers/usb/misc/sisusbvga/sisusb_con.c b/drivers/usb/misc/sisusbvga/sisusb_con.c
index cd0155310fea..85a324b658ab 100644
--- a/drivers/usb/misc/sisusbvga/sisusb_con.c
+++ b/drivers/usb/misc/sisusbvga/sisusb_con.c
@@ -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);
diff --git a/drivers/usb/misc/sisusbvga/sisusb_init.h b/drivers/usb/misc/sisusbvga/sisusb_init.h
index ace09985dae4..d0154394ba12 100644
--- a/drivers/usb/misc/sisusbvga/sisusb_init.h
+++ b/drivers/usb/misc/sisusbvga/sisusb_init.h
@@ -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,
--
2.17.1
next prev parent reply other threads:[~2020-05-30 1:49 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-05-30 1:48 [PATCH 0/6] USB: sisusbvga: series of changes char to u8 Changming
2020-05-30 1:48 ` Changming [this message]
2020-05-30 1:48 ` [PATCH 2/6] USB: sisusbvga: change sisusb_write_mem_bulk Changming
2020-05-31 21:14 ` kbuild test robot
2020-05-31 21:14 ` kbuild test robot
2020-05-31 21:35 ` kbuild test robot
2020-05-31 21:35 ` kbuild test robot
2020-05-31 21:37 ` kbuild test robot
2020-05-31 21:37 ` kbuild test robot
2020-05-30 1:48 ` [PATCH 3/6] USB: sisusbvga: change sisusb->ibuf,obuf,font_backup Changming
2020-05-30 1:48 ` [PATCH 4/6] USB: sisusbvga: change userbuffer for sisusb_recv_bulk_msg to u8 Changming
2020-05-30 1:48 ` [PATCH 5/6] USB: sisusbvga: change sisusb_read_mem_bulk Changming
2020-05-31 22:26 ` kbuild test robot
2020-05-31 22:26 ` kbuild test robot
2020-05-31 22:43 ` kbuild test robot
2020-05-31 22:43 ` kbuild test robot
2020-05-31 22:47 ` kbuild test robot
2020-05-31 22:47 ` kbuild test robot
2020-05-30 1:48 ` [PATCH 6/6] USB: sisusbvga: change the local char array to u8 array Changming
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=20200530014820.9967-2-liu.changm@northeastern.edu \
--to=charley.ashbringer@gmail.com \
--cc=gregkh@linuxfoundation.org \
--cc=linux-usb@vger.kernel.org \
--cc=liu.changm@northeastern.edu \
--cc=thomas@winischhofer.net \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.