From patchwork Sat May 30 01:48:15 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Changming X-Patchwork-Id: 214970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.8 required=3.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH, MAILING_LIST_MULTI, SIGNED_OFF_BY, SPF_HELO_NONE, SPF_PASS, UNWANTED_LANGUAGE_BODY, USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 15A30C433E1 for ; Sat, 30 May 2020 01:49:05 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id E7ACC2075A for ; Sat, 30 May 2020 01:49:04 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="K7SaSjnZ" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728542AbgE3BtE (ORCPT ); Fri, 29 May 2020 21:49:04 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33730 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727876AbgE3BtD (ORCPT ); Fri, 29 May 2020 21:49:03 -0400 Received: from mail-vs1-xe42.google.com (mail-vs1-xe42.google.com [IPv6:2607:f8b0:4864:20::e42]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 2E09EC03E969 for ; Fri, 29 May 2020 18:49:03 -0700 (PDT) Received: by mail-vs1-xe42.google.com with SMTP id b28so2605433vsa.5 for ; Fri, 29 May 2020 18:49:03 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=FMLoiEoQ3EuVCCkEbhJS/5joUb5vikA3Ups632xnwc4=; b=K7SaSjnZvABaY7Ue+w2uI3UK8YPp3wc71alyZyjLUfrptn+TZdcI6gecl45hvTv2pV mGZ7bwXC7kSFVHEkdS362utEkoyG8ejBdBa1B56qSaQ8jbu6B+ZfO+j68deYOV8hddQO 9U3rvwp8IDTcVQFLXRG/LzacokAP6fjrOcllcku+W3HbpNwbDLuKXMyJ7zYij/C7Cnpl 9GjhrgUbE5SuuULXrlAfdtMlMs6AEmhkjAugZqWQhKRXGaVHA9BjTJ5NG6QI9AURSv/7 pfjIddKzVvwEKiJ73VeN7hgwrgh/2V6LQwB4EGvUJfktmZHOBPSLIwJ6PHnXoT9mTwlc b3hA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=FMLoiEoQ3EuVCCkEbhJS/5joUb5vikA3Ups632xnwc4=; b=YIOxF/kKkT20JGvbPIa6VziYTDYoU3Q61LHrNtqlxQV0jAjZa/BQhLsvPA8yzJ+3me ithwuxkJCYGmWqgbhj3AExGo+20txWExPY5seD3YopCWN5ylw8AX3m9CoAPwB7phqsgD uc7R0bsBHB29ID4QDf+6DOsAXetrKNQ6yKaniSZuiNGfm/nQ8RkLGRfwcYtAcVq1OFwY VQW1gbOCDu0t1Mq2+HdiOZYQpWdQ9W26+UdmVTNfo/mOd/hLMrAwkmDwfFqeTpks+NaZ cjMj5Fz53I8cMXQztk9aJp3eeZIuIZWOCn0b1o5kEwlXQGQMQyD0ax12J6o9hyE9cdSR 1uOg== X-Gm-Message-State: AOAM533CEHF2qFcCJ+pOtsDw/PcWEBO8v9ndyHRZknhC6nykw+RU3qbG HX65IzjYGkYk7+3JCj/7vPU= X-Google-Smtp-Source: ABdhPJwWhLRMVcM0wtC+oAfzFfyLR1FBFpDnX+F6xihy2iY2SMuaGeMMMr7xpu2D8OXZSq0F/yQxdA== X-Received: by 2002:a67:fa50:: with SMTP id j16mr5089700vsq.144.1590803342389; Fri, 29 May 2020 18:49:02 -0700 (PDT) Received: from DESKTOP-2I1VNC3.localdomain (host-128-227-216-118.xlate.ufl.edu. [128.227.216.118]) by smtp.gmail.com with ESMTPSA id z75sm1507759vkd.5.2020.05.29.18.49.01 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 29 May 2020 18:49:02 -0700 (PDT) From: Changming X-Google-Original-From: Changming To: gregkh@linuxfoundation.org Cc: linux-usb@vger.kernel.org, thomas@winischhofer.net, Changming Liu Subject: [PATCH 1/6] USB: sisusbvga: change char to u8 for sisusb_copy_memory Date: Fri, 29 May 2020 21:48:15 -0400 Message-Id: <20200530014820.9967-2-liu.changm@northeastern.edu> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20200530014820.9967-1-liu.changm@northeastern.edu> References: <20200530014820.9967-1-liu.changm@northeastern.edu> Sender: linux-usb-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-usb@vger.kernel.org From: Changming Liu 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 --- 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, From patchwork Sat May 30 01:48:17 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Changming X-Patchwork-Id: 214969 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-9.6 required=3.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH, MAILING_LIST_MULTI, SIGNED_OFF_BY, SPF_HELO_NONE, SPF_PASS, USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id A0ABEC433E0 for ; Sat, 30 May 2020 01:49:06 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 7C4882075A for ; Sat, 30 May 2020 01:49:06 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="gFKvdlyV" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728625AbgE3BtF (ORCPT ); Fri, 29 May 2020 21:49:05 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33736 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727876AbgE3BtE (ORCPT ); Fri, 29 May 2020 21:49:04 -0400 Received: from mail-vs1-xe41.google.com (mail-vs1-xe41.google.com [IPv6:2607:f8b0:4864:20::e41]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 74AC1C03E969 for ; Fri, 29 May 2020 18:49:04 -0700 (PDT) Received: by mail-vs1-xe41.google.com with SMTP id b13so2567636vsm.13 for ; Fri, 29 May 2020 18:49:04 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=UADLbIKSyHzQJvuYhu/QNa7UWKcQefwi+k87ECe2wSA=; b=gFKvdlyVIlYDNQoW8doLMngDj7/J7Uk/k8AUwpBF0dxYSuHTU25UmTFxasyWYSkgyQ lOl7Y4eFFZyiFEQMp8EtgkbRIVUY6hgeWrm8S2P0BYk0ZkvN7IVuGfLtcVpBkuvuHAjq W5Jf2Nt4cB+nDhGN6l0dUpupwTdFN4Rs1+t2XoVk1Av7PDg5pCZXQGs+j5qOVmfM/Oap 7gz4uCRrmQ80Ro6e5hrHhRmjp2YvEwtzEd/wpRrZ4yrNO703QBiT9mqJJp3PjvLBE6jF oeOtubcpoQx9Jv+vjZmuVHqAQh9J7PqtVv4cJxyTpSFjNENQtDmXupHmKvl9alTiqVM2 NiPg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=UADLbIKSyHzQJvuYhu/QNa7UWKcQefwi+k87ECe2wSA=; b=bDVlmPYOGSNWQMadKpwllfOqkXlN9LVcWsfakZUDeyfr1qVQGFDUi05HnHfIR76TVc icCMMQc/DAXvEmijPeu0lrEs9hUav34lK74LrK/6Z7a+rAKfJQvFiWTSlGVw7QFkNhJy wVuVr4yMbFJq5HypHxh0WzHRqQX90UfbrSTdSZ8vvU19X8LYRruPzY86FettDDPJsrMz JGhB4wuALM5xGWiUhPeaNrs+4FRPoNK7vQF4YIPeC3Urbaubrv8P2DiugPTB4qCMtCNN Wi/6RGdY7Kkxi5oCpQK/+sd6Nx8DUH/E3Wthbr+MFGSvGZDrVeQP7JIKBfZlMorPIojh Mx6A== X-Gm-Message-State: AOAM532rirwPMY/ezKr03oxuf8FcgqMKdb7Ev0YFDsxyijNG/of//vxv 5FwxqNIi1H4ef+96btk1B7U= X-Google-Smtp-Source: ABdhPJxra3nqy6WcfFI4bAmksxKHZbhHm6s8JlLNBlHfa4lm48b1ct4IuKGhFQNMOvSm2METvitYUg== X-Received: by 2002:a67:ecc3:: with SMTP id i3mr7616287vsp.170.1590803343723; Fri, 29 May 2020 18:49:03 -0700 (PDT) Received: from DESKTOP-2I1VNC3.localdomain (host-128-227-216-118.xlate.ufl.edu. [128.227.216.118]) by smtp.gmail.com with ESMTPSA id z75sm1507759vkd.5.2020.05.29.18.49.03 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 29 May 2020 18:49:03 -0700 (PDT) From: Changming X-Google-Original-From: Changming To: gregkh@linuxfoundation.org Cc: linux-usb@vger.kernel.org, thomas@winischhofer.net, Changming Liu Subject: [PATCH 3/6] USB: sisusbvga: change sisusb->ibuf,obuf,font_backup Date: Fri, 29 May 2020 21:48:17 -0400 Message-Id: <20200530014820.9967-4-liu.changm@northeastern.edu> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20200530014820.9967-1-liu.changm@northeastern.edu> References: <20200530014820.9967-1-liu.changm@northeastern.edu> Sender: linux-usb-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-usb@vger.kernel.org From: Changming Liu change sisusb->ibuf,obuf,font_backup to u8 and related buf which can be assigned to them Signed-off-by: Changming Liu --- drivers/usb/misc/sisusbvga/sisusb.c | 4 ++-- drivers/usb/misc/sisusbvga/sisusb.h | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/usb/misc/sisusbvga/sisusb.c b/drivers/usb/misc/sisusbvga/sisusb.c index f800a9c7feec..83c3785ce4ab --- a/drivers/usb/misc/sisusbvga/sisusb.c +++ b/drivers/usb/misc/sisusbvga/sisusb.c @@ -335,7 +335,7 @@ static int sisusb_send_bulk_msg(struct sisusb_usb_data *sisusb, int ep, int len, int fromuser = (userbuffer != NULL) ? 1 : 0; int fromkern = (kernbuffer != NULL) ? 1 : 0; unsigned int pipe; - char *buffer; + u8 *buffer; (*bytes_written) = 0; @@ -454,7 +454,7 @@ static int sisusb_recv_bulk_msg(struct sisusb_usb_data *sisusb, int ep, int len, int result = 0, retry, count = len; int bufsize, thispass, transferred_len; unsigned int pipe; - char *buffer; + u8 *buffer; (*bytes_read) = 0; diff --git a/drivers/usb/misc/sisusbvga/sisusb.h b/drivers/usb/misc/sisusbvga/sisusb.h index 8a5e6bb07d05..f761ede77c0b 100644 --- a/drivers/usb/misc/sisusbvga/sisusb.h +++ b/drivers/usb/misc/sisusbvga/sisusb.h @@ -109,7 +109,7 @@ struct sisusb_usb_data { int present; /* !=0 if device is present on the bus */ int ready; /* !=0 if device is ready for userland */ int numobufs; /* number of obufs = number of out urbs */ - char *obuf[NUMOBUFS], *ibuf; /* transfer buffers */ + unsigned char *obuf[NUMOBUFS], *ibuf; /* transfer buffers */ int obufsize, ibufsize; struct urb *sisurbout[NUMOBUFS]; struct urb *sisurbin; @@ -140,7 +140,7 @@ struct sisusb_usb_data { int sisusb_cursor_size_to; int current_font_height, current_font_512; int font_backup_size, font_backup_height, font_backup_512; - char *font_backup; + unsigned char *font_backup; int font_slot; struct vc_data *sisusb_display_fg; int is_gfx; From patchwork Sat May 30 01:48:20 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Changming X-Patchwork-Id: 214968 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-9.6 required=3.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH, MAILING_LIST_MULTI, SIGNED_OFF_BY, SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id E8DD7C433E1 for ; Sat, 30 May 2020 01:49:08 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id C3E952077D for ; Sat, 30 May 2020 01:49:08 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="rNZPjw7P" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728638AbgE3BtH (ORCPT ); Fri, 29 May 2020 21:49:07 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33748 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728642AbgE3BtG (ORCPT ); Fri, 29 May 2020 21:49:06 -0400 Received: from mail-ua1-x944.google.com (mail-ua1-x944.google.com [IPv6:2607:f8b0:4864:20::944]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 70F4EC08C5CA for ; Fri, 29 May 2020 18:49:06 -0700 (PDT) Received: by mail-ua1-x944.google.com with SMTP id g7so1466932uap.7 for ; Fri, 29 May 2020 18:49:06 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=O2zEfHJzja0FYAayQuGq1uzqD7Al76JYJxnGc3Icuto=; b=rNZPjw7PgAkEeqcGHYdoeCzQwiS/wz4pXsP5KXdoK+7S7Xog4VYFYjB9sGD4lfeS6y hC0jr3BPuI8FFq66MI4cDknFq1GPrlMeQqMJDTDqg04NVIp9BmqbrQVGuofLxgf3yym2 sQEWLs3kscB2OPed6SU7nminZdHebua9KInby0HW/HWpN9c8gKHZ52r/z6x9jmGQ8Fz6 R7dCxr+PXqIfA5HNE6K0eePPU96e4vbWdA8C7w0JaP1TErr6j4YnaZjxF5RE9TmUcrjM NZd37MkL3p6kES+ZjSCYfW2xprQLRnmEfw+ts29kiavqr2XShJdOBhPoPZgKeyeWq5C/ pH5A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=O2zEfHJzja0FYAayQuGq1uzqD7Al76JYJxnGc3Icuto=; b=Dt+RdNQMW3C056ZMoKQVDMbMC8LI3XQ+n0u3YaSTX15lvV2S31f0aaUi+Se2L57rDk qJ8sbMZLKSxtosrfs+pJq70LMIGrF6jdu9hFZr74Fr000V16TNq/G9me6570fOVhoJBj qqhJ/f6+0ieKyn2heqhsxVp4AS0jQt4M+iN/ujyRoHJ4O9NWBf8lTpDMDmwznFKZ5yPw uE9LQ43W3lUjN3vK6637BQUcpHwZk9A6P6Ur2bWAhyN/4Fv6GGhbyISD6QekFWAVz1ZT niw775BgnMM/74SLK7h9g5AbaScg5NjyIHQDj0x5fmxQO/aGSy2n9ItEhcubCCQoyl+z yBTQ== X-Gm-Message-State: AOAM530Xu9yNfQpylmcxyEnTORFtYaYe2C4TdY4301ktzFluZi5/Up/+ jEOVVCunbB6SHsz8As2tOgk= X-Google-Smtp-Source: ABdhPJwjZJM86D4AiJgJa0vkvRlLMEJYaxbHefnU48Vsu7lhggfV4XxJamcHb6W6JecxcDcszyQe1w== X-Received: by 2002:ab0:6e8e:: with SMTP id b14mr9765179uav.0.1590803345675; Fri, 29 May 2020 18:49:05 -0700 (PDT) Received: from DESKTOP-2I1VNC3.localdomain (host-128-227-216-118.xlate.ufl.edu. [128.227.216.118]) by smtp.gmail.com with ESMTPSA id z75sm1507759vkd.5.2020.05.29.18.49.05 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 29 May 2020 18:49:05 -0700 (PDT) From: Changming X-Google-Original-From: Changming To: gregkh@linuxfoundation.org Cc: linux-usb@vger.kernel.org, thomas@winischhofer.net, Changming Liu Subject: [PATCH 6/6] USB: sisusbvga: change the local char array to u8 array Date: Fri, 29 May 2020 21:48:20 -0400 Message-Id: <20200530014820.9967-7-liu.changm@northeastern.edu> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20200530014820.9967-1-liu.changm@northeastern.edu> References: <20200530014820.9967-1-liu.changm@northeastern.edu> Sender: linux-usb-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-usb@vger.kernel.org From: Changming Liu These arrays/data elements are used as unsigned. So change them from char to u8. Signed-off-by: Changming Liu --- drivers/usb/misc/sisusbvga/sisusb.c | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/drivers/usb/misc/sisusbvga/sisusb.c b/drivers/usb/misc/sisusbvga/sisusb.c index 1f21db40fdb5..70a10ad9ae0a 100755 --- a/drivers/usb/misc/sisusbvga/sisusb.c +++ b/drivers/usb/misc/sisusbvga/sisusb.c @@ -1752,22 +1752,22 @@ static void sisusb_set_default_mode(struct sisusb_usb_data *sisusb, { int i, j, modex, bpp, du; u8 sr31, cr63, tmp8; - static const char attrdata[] = { + static const u8 attrdata[] = { 0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f, 0x01, 0x00, 0x00, 0x00 }; - static const char crtcrdata[] = { + static const u8 crtcrdata[] = { 0x5f, 0x4f, 0x50, 0x82, 0x54, 0x80, 0x0b, 0x3e, 0x00, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xea, 0x8c, 0xdf, 0x28, 0x40, 0xe7, 0x04, 0xa3, 0xff }; - static const char grcdata[] = { + static const u8 grcdata[] = { 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0x05, 0x0f, 0xff }; - static const char crtcdata[] = { + static const u8 crtcdata[] = { 0x5f, 0x4f, 0x4f, 0x83, 0x55, 0x81, 0x0b, 0x3e, 0xe9, 0x8b, 0xdf, 0xe8, 0x0c, 0x00, 0x00, 0x05, 0x00 @@ -1880,19 +1880,19 @@ static int sisusb_init_gfxcore(struct sisusb_usb_data *sisusb) int ret = 0, i, j, bw, chab, iret, retry = 3; u8 tmp8, ramtype; u32 tmp32; - static const char mclktable[] = { + static const u8 mclktable[] = { 0x3b, 0x22, 0x01, 143, 0x3b, 0x22, 0x01, 143, 0x3b, 0x22, 0x01, 143, 0x3b, 0x22, 0x01, 143 }; - static const char eclktable[] = { + static const u8 eclktable[] = { 0x3b, 0x22, 0x01, 143, 0x3b, 0x22, 0x01, 143, 0x3b, 0x22, 0x01, 143, 0x3b, 0x22, 0x01, 143 }; - static const char ramtypetable1[] = { + static const u8 ramtypetable1[] = { 0x00, 0x04, 0x60, 0x60, 0x0f, 0x0f, 0x1f, 0x1f, 0xba, 0xba, 0xba, 0xba, @@ -1901,7 +1901,7 @@ static int sisusb_init_gfxcore(struct sisusb_usb_data *sisusb) 0x00, 0x00, 0x02, 0x02, 0x30, 0x30, 0x40, 0x40 }; - static const char ramtypetable2[] = { + static const u8 ramtypetable2[] = { 0x77, 0x77, 0x44, 0x44, 0x77, 0x77, 0x44, 0x44, 0x00, 0x00, 0x00, 0x00,