Message ID | 20230609112417.632313-1-suijingfeng@loongson.cn |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel-owner@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:994d:0:b0:3d9:f83d:47d9 with SMTP id k13csp875596vqr; Fri, 9 Jun 2023 04:31:38 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ5m4QjN/b/nPWC5PpnGLytXqi989lhQ7dZZDASDlcDoYFJ5QzlNhVBlvFPOnl/CAy+dsPQR X-Received: by 2002:a05:6a20:8e28:b0:111:4a86:f70 with SMTP id y40-20020a056a208e2800b001114a860f70mr1297186pzj.6.1686310298484; Fri, 09 Jun 2023 04:31:38 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1686310298; cv=none; d=google.com; s=arc-20160816; b=Jazo2o9bapu/3nKGOuyzv2KGqFYQnoWAZNlLCiE4U2gyn+ne0sY3LE56T9Wnq4as6b j4TWP2ytHMajfYaKFifsghJ0JICtPl+qsaaiuOPz5kDDxUwXagijWcr0d538KCXa2aPX 6KkQfd6BAKe4l6oJsN7AQfeZQYoqpcQQBwekBvk94tGRf4WrPYPcpACt6qPK5Dr50RBs Tc4beBD6aQ/YbOOq8hCxFpXeqehciaAAuwu4O0c3MGG9KvmtDJwYZ6lY7VHpavxurLLY Ad+/qa26m9O6d60nzk336LABAjqRFks6q2nsfZYN4AZ3R/RxjTvjnp53DKsboDev+3+T fFpA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from; bh=8s/I0GeTJP0e9X1uHJE/qgNlWGdVQVOHfRkH8/20HYY=; b=qmb5si/dPoRDGv5rTE/OukStKbKFSo39eHmL/D1HNYc3bBW62jauh/qLHSuNCsPiFl G2RIgw1iKSQCxpI1VJ1ps0/LwNeqeS2i7UUDp5bGbu5e46LB+YCPqyyNGRj5w6hNwc7I k1G8JHD/FGmch59k87+g5MFNkLyvVyL5eW048dqN8pIZdHoJfftUzt3MlKODPaGOi9lb fkfLEcKuxaGdBv05RNl0gHpkH7I4+kQCZzRD1d/87X5DJQ8jdztAQW4cRZ/MmOG1jGT2 DL3xLpEA6D4+zK0tRPoMhdfZei2+PnON7AC3QWOMucaR2043fkMbVyw2UTJxxfkGZFNQ zY7Q== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id b27-20020a63931b000000b005304a8af2adsi2584732pge.392.2023.06.09.04.31.22; Fri, 09 Jun 2023 04:31:38 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S238815AbjFILYX (ORCPT <rfc822;liningstudo@gmail.com> + 99 others); Fri, 9 Jun 2023 07:24:23 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33752 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229808AbjFILYV (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Fri, 9 Jun 2023 07:24:21 -0400 Received: from mail.loongson.cn (mail.loongson.cn [114.242.206.163]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 68B10270F; Fri, 9 Jun 2023 04:24:19 -0700 (PDT) Received: from loongson.cn (unknown [10.20.42.43]) by gateway (Coremail) with SMTP id _____8AxX+vhC4NkOAwBAA--.3213S3; Fri, 09 Jun 2023 19:24:17 +0800 (CST) Received: from openarena.loongson.cn (unknown [10.20.42.43]) by localhost.localdomain (Coremail) with SMTP id AQAAf8AxauXhC4NkbvEKAA--.33393S2; Fri, 09 Jun 2023 19:24:17 +0800 (CST) From: Sui Jingfeng <suijingfeng@loongson.cn> To: Bjorn Helgaas <bhelgaas@google.com>, David Airlie <airlied@gmail.com>, Daniel Vetter <daniel@ffwll.ch>, Maarten Lankhorst <maarten.lankhorst@linux.intel.com>, Maxime Ripard <mripard@kernel.org>, Thomas Zimmermann <tzimmermann@suse.de>, Jani Nikula <jani.nikula@linux.intel.com>, Andi Shyti <andi.shyti@linux.intel.com> Cc: linux-pci@vger.kernel.org, linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org Subject: [PATCH v5 1/4] PCI/VGA: Use unsigned type for the io_state variable Date: Fri, 9 Jun 2023 19:24:14 +0800 Message-Id: <20230609112417.632313-1-suijingfeng@loongson.cn> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-CM-TRANSID: AQAAf8AxauXhC4NkbvEKAA--.33393S2 X-CM-SenderInfo: xvxlyxpqjiv03j6o00pqjv00gofq/ X-Coremail-Antispam: 1Uk129KBj9xXoW7XFW3Wr17Cr1rAr1kWF15Awc_yoWDJrb_u3 92q397Kw4DG3ZF93WDC3yrArWfKw18ZF47Wa4vg3WfAFyjqr4DC3s7Wr98Ka1DXa1akFsx Kry8Jw1F9347uosvyTuYvTs0mTUanT9S1TB71UUUU17qnTZGkaVYY2UrUUUUj1kv1TuYvT s0mT0YCTnIWjqI5I8CrVACY4xI64kE6c02F40Ex7xfYxn0WfASr-VFAUDa7-sFnT9fnUUI cSsGvfJTRUUUbhxYFVCjjxCrM7AC8VAFwI0_Jr0_Gr1l1xkIjI8I6I8E6xAIw20EY4v20x vaj40_Wr0E3s1l1IIY67AEw4v_JF0_JFyl8cAvFVAK0II2c7xJM28CjxkF64kEwVA0rcxS w2x7M28EF7xvwVC0I7IYx2IY67AKxVWUCVW8JwA2z4x0Y4vE2Ix0cI8IcVCY1x0267AKxV W8JVWxJwA2z4x0Y4vEx4A2jsIE14v26r4UJVWxJr1l84ACjcxK6I8E87Iv6xkF7I0E14v2 6F4UJVW0owAaw2AFwI0_Jw0_GFyle2I262IYc4CY6c8Ij28IcVAaY2xG8wAqjxCEc2xF0c Ia020Ex4CE44I27wAqx4xG64xvF2IEw4CE5I8CrVC2j2WlYx0E2Ix0cI8IcVAFwI0_Jw0_ WrylYx0Ex4A2jsIE14v26r4UJVWxJr1lOx8S6xCaFVCjc4AY6r1j6r4UM4x0Y48IcxkI7V AKI48JMxkF7I0En4kS14v26r1q6r43MxAIw28IcxkI7VAKI48JMxC20s026xCaFVCjc4AY 6r1j6r4UMxCIbckI1I0E14v26r126r1DMI8I3I0E5I8CrVAFwI0_Jr0_Jr4lx2IqxVCjr7 xvwVAFwI0_JrI_JrWlx4CE17CEb7AF67AKxVWUtVW8ZwCIc40Y0x0EwIxGrwCI42IY6xII jxv20xvE14v26r1I6r4UMIIF0xvE2Ix0cI8IcVCY1x0267AKxVW8JVWxJwCI42IY6xAIw2 0EY4v20xvaj40_Jr0_JF4lIxAIcVC2z280aVAFwI0_Gr1j6F4UJwCI42IY6I8E87Iv6xkF 7I0E14v26r4UJVWxJrUvcSsGvfC2KfnxnUUI43ZEXa7IU0e6wJUUUUU== X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,SPF_HELO_NONE, SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: <linux-kernel.vger.kernel.org> X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1768221495561825747?= X-GMAIL-MSGID: =?utf-8?q?1768224507386594372?= |
Series |
[v5,1/4] PCI/VGA: Use unsigned type for the io_state variable
|
|
Commit Message
Sui Jingfeng
June 9, 2023, 11:24 a.m. UTC
The io_state variable in the vga_arb_write() function is declared with
unsigned int type, while the vga_str_to_iostate() function takes int *
type. To keep them consistent, replace the third argument of
vga_str_to_iostate() function with the unsigned int * type.
Signed-off-by: Sui Jingfeng <suijingfeng@loongson.cn>
---
drivers/pci/vgaarb.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
Comments
Hi Sui, On Fri, Jun 09, 2023 at 07:24:14PM +0800, Sui Jingfeng wrote: > The io_state variable in the vga_arb_write() function is declared with > unsigned int type, while the vga_str_to_iostate() function takes int * > type. To keep them consistent, replace the third argument of > vga_str_to_iostate() function with the unsigned int * type. > > Signed-off-by: Sui Jingfeng <suijingfeng@loongson.cn> Reviewed-by: Andi Shyti <andi.shyti@linux.intel.com> Andi > --- > drivers/pci/vgaarb.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/drivers/pci/vgaarb.c b/drivers/pci/vgaarb.c > index 5a696078b382..c1bc6c983932 100644 > --- a/drivers/pci/vgaarb.c > +++ b/drivers/pci/vgaarb.c > @@ -77,7 +77,7 @@ static const char *vga_iostate_to_str(unsigned int iostate) > return "none"; > } > > -static int vga_str_to_iostate(char *buf, int str_size, int *io_state) > +static int vga_str_to_iostate(char *buf, int str_size, unsigned int *io_state) > { > /* we could in theory hand out locks on IO and mem > * separately to userspace but it can cause deadlocks */ > -- > 2.25.1
Hi, On 2023/6/9 19:48, Andi Shyti wrote: > Hi Sui, > > On Fri, Jun 09, 2023 at 07:24:14PM +0800, Sui Jingfeng wrote: >> The io_state variable in the vga_arb_write() function is declared with >> unsigned int type, while the vga_str_to_iostate() function takes int * >> type. To keep them consistent, replace the third argument of >> vga_str_to_iostate() function with the unsigned int * type. >> >> Signed-off-by: Sui Jingfeng <suijingfeng@loongson.cn> > Reviewed-by: Andi Shyti <andi.shyti@linux.intel.com> Thanks a lot. > Andi > >> --- >> drivers/pci/vgaarb.c | 2 +- >> 1 file changed, 1 insertion(+), 1 deletion(-) >> >> diff --git a/drivers/pci/vgaarb.c b/drivers/pci/vgaarb.c >> index 5a696078b382..c1bc6c983932 100644 >> --- a/drivers/pci/vgaarb.c >> +++ b/drivers/pci/vgaarb.c >> @@ -77,7 +77,7 @@ static const char *vga_iostate_to_str(unsigned int iostate) >> return "none"; >> } >> >> -static int vga_str_to_iostate(char *buf, int str_size, int *io_state) >> +static int vga_str_to_iostate(char *buf, int str_size, unsigned int *io_state) >> { >> /* we could in theory hand out locks on IO and mem >> * separately to userspace but it can cause deadlocks */ >> -- >> 2.25.1
diff --git a/drivers/pci/vgaarb.c b/drivers/pci/vgaarb.c index 5a696078b382..c1bc6c983932 100644 --- a/drivers/pci/vgaarb.c +++ b/drivers/pci/vgaarb.c @@ -77,7 +77,7 @@ static const char *vga_iostate_to_str(unsigned int iostate) return "none"; } -static int vga_str_to_iostate(char *buf, int str_size, int *io_state) +static int vga_str_to_iostate(char *buf, int str_size, unsigned int *io_state) { /* we could in theory hand out locks on IO and mem * separately to userspace but it can cause deadlocks */