All of lore.kernel.org
 help / color / mirror / Atom feed
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 4/6] USB: sisusbvga: change userbuffer for sisusb_recv_bulk_msg to u8
Date: Fri, 29 May 2020 21:48:18 -0400	[thread overview]
Message-ID: <20200530014820.9967-5-liu.changm@northeastern.edu> (raw)
In-Reply-To: <20200530014820.9967-1-liu.changm@northeastern.edu>

From: Changming Liu <liu.changm@northeastern.edu>

change the userbuffer of sisusb_recv_bulk_msg
also force cast the kernbuffer to u8 when passed in

Signed-off-by: Changming Liu <liu.changm@northeastern.edu>
---
 drivers/usb/misc/sisusbvga/sisusb.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/usb/misc/sisusbvga/sisusb.c b/drivers/usb/misc/sisusbvga/sisusb.c
index 83c3785ce4ab..9e858530c4ed 100755
--- a/drivers/usb/misc/sisusbvga/sisusb.c
+++ b/drivers/usb/misc/sisusbvga/sisusb.c
@@ -448,7 +448,7 @@ static int sisusb_send_bulk_msg(struct sisusb_usb_data *sisusb, int ep, int len,
  */
 
 static int sisusb_recv_bulk_msg(struct sisusb_usb_data *sisusb, int ep, int len,
-		void *kernbuffer, char __user *userbuffer, ssize_t *bytes_read,
+		void *kernbuffer, u8 __user *userbuffer, ssize_t *bytes_read,
 		unsigned int tflags)
 {
 	int result = 0, retry, count = len;
@@ -551,7 +551,7 @@ static int sisusb_send_packet(struct sisusb_usb_data *sisusb, int len,
 		 *    return value and write it to packet->data
 		 */
 		ret = sisusb_recv_bulk_msg(sisusb, SISUSB_EP_GFX_IN, 4,
-				(char *)&tmp, NULL, &bytes_transferred, 0);
+				(u8 *)&tmp, NULL, &bytes_transferred, 0);
 
 		packet->data = le32_to_cpu(tmp);
 	}
@@ -587,7 +587,7 @@ static int sisusb_send_bridge_packet(struct sisusb_usb_data *sisusb, int len,
 		 *    return value and write it to packet->data
 		 */
 		ret = sisusb_recv_bulk_msg(sisusb, SISUSB_EP_BRIDGE_IN, 4,
-				(char *)&tmp, NULL, &bytes_transferred, 0);
+				(u8 *)&tmp, NULL, &bytes_transferred, 0);
 
 		packet->data = le32_to_cpu(tmp);
 	}
-- 
2.17.1


  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 ` [PATCH 1/6] USB: sisusbvga: change char to u8 for sisusb_copy_memory Changming
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 ` Changming [this message]
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-5-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.