From patchwork Fri Jun 9 10:33:18 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sui Jingfeng X-Patchwork-Id: 105540 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:994d:0:b0:3d9:f83d:47d9 with SMTP id k13csp852020vqr; Fri, 9 Jun 2023 03:43:46 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ6b3K0wXk7pFN0DX2VvqKYrjcyMGkOIX3pzyQgvx3YHK1CjZsYm2NxaSq3XjOPEXAlLXGzm X-Received: by 2002:a05:6a20:938f:b0:117:c0a5:5f36 with SMTP id x15-20020a056a20938f00b00117c0a55f36mr739086pzh.36.1686307426116; Fri, 09 Jun 2023 03:43:46 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1686307426; cv=none; d=google.com; s=arc-20160816; b=J7XafMR6O+82mtMgSSXqOOJTwkU1fHAiBfI6r1Cd2YzrXYoIT8AYK0x1ptjn4lswug vjyNqjbda0tjqEdANzH1KNL3W7ZVhy2WGvvlcBCbswfbJBpBJTopHqWKx5DCMINA5LNl AiLAhDGfuHURFN2FaJVuUGOyhy4aYlg9falcnBKaZcP9XKXB5AzOLK2xnc3nfpA7H94n PpBO2dp/rl0O6qFEqEhdhLY3IOETpeT4cBFTddj1LX2tjT0bp9OcY6tWEyYk0/4UbZJ+ MJZsk7lvmD6/ykmzwpFErk6PBqLy6anv73wCJAwnQQOogRyGA38VHRUDmcnTEc9/SXpy hvLA== 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=I3/yNRehU6M+EKd5fBgQGGJIHV6/KOHvdFwkWNklZlWqFBz5Ni+lvUKMNqEdxbjJ4d PIXEHpDsAGJH7rpxKfOEJghlXGvgAa0SQKiu5NwEwesaO8rE1XbaeqscC800v+GOjajA QslO0r0Nt8gMJsJZ3Tu4CdthH8gTVGm3hwoPNE3ClREJPN9/sQ8m3XXg1L4BAR7DR7Na zyxnQ0I80YocmeVCE955S/TgpiqTHwG5mmomPMV0BkcEI670zZbefqvTl7Me/OvVde0d SI82lqLDnyCoYyKNljs6676wvKwyJVv8C27dZNTaDXcx0LbZ/tMXbqxe7Ra0oI4kKaKg sMfA== 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 q20-20020a170902e31400b001b0113e102dsi10146plc.365.2023.06.09.03.43.32; Fri, 09 Jun 2023 03:43:46 -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 S238927AbjFIKgk (ORCPT + 99 others); Fri, 9 Jun 2023 06:36:40 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39566 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235894AbjFIKgN (ORCPT ); Fri, 9 Jun 2023 06:36:13 -0400 Received: from mail.loongson.cn (mail.loongson.cn [114.242.206.163]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 0739B1BD3; Fri, 9 Jun 2023 03:33:23 -0700 (PDT) Received: from loongson.cn (unknown [10.20.42.43]) by gateway (Coremail) with SMTP id _____8AxHuvy_4JkoQYBAA--.3142S3; Fri, 09 Jun 2023 18:33:22 +0800 (CST) Received: from openarena.loongson.cn (unknown [10.20.42.43]) by localhost.localdomain (Coremail) with SMTP id AQAAf8DxGOXy_4JkMcQKAA--.32986S2; Fri, 09 Jun 2023 18:33:22 +0800 (CST) From: Sui Jingfeng To: Bjorn Helgaas , David Airlie , Daniel Vetter , Maarten Lankhorst , Maxime Ripard , Thomas Zimmermann Cc: linux-pci@vger.kernel.org, linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org Subject: [PATCH v4 1/4] PCI/VGA: Use unsigned type for the io_state variable Date: Fri, 9 Jun 2023 18:33:18 +0800 Message-Id: <20230609103321.629192-1-suijingfeng@loongson.cn> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 X-CM-TRANSID: AQAAf8DxGOXy_4JkMcQKAA--.32986S2 X-CM-SenderInfo: xvxlyxpqjiv03j6o00pqjv00gofq/ X-Coremail-Antispam: 1Uk129KBj9xXoW7XFW3Wr17Cr1rAr1kWF15Awc_yoWDJrb_u3 92q397Kw4DG3ZF93WDC3yrArWfKw18ZF47Wa4vg3WfAFyjqr4DC3s7Wr98Ka1DXa1akFsx Kry8Jw1F9347uosvyTuYvTs0mTUanT9S1TB71UUUUj7qnTZGkaVYY2UrUUUUj1kv1TuYvT s0mT0YCTnIWjqI5I8CrVACY4xI64kE6c02F40Ex7xfYxn0WfASr-VFAUDa7-sFnT9fnUUI cSsGvfJTRUUUbSAYFVCjjxCrM7AC8VAFwI0_Jr0_Gr1l1xkIjI8I6I8E6xAIw20EY4v20x vaj40_Wr0E3s1l1IIY67AEw4v_Jrv_JF1l8cAvFVAK0II2c7xJM28CjxkF64kEwVA0rcxS w2x7M28EF7xvwVC0I7IYx2IY67AKxVW8JVW5JwA2z4x0Y4vE2Ix0cI8IcVCY1x0267AKxV W8JVWxJwA2z4x0Y4vEx4A2jsIE14v26r4UJVWxJr1l84ACjcxK6I8E87Iv6xkF7I0E14v2 6F4UJVW0owAaw2AFwI0_JF0_Jw1le2I262IYc4CY6c8Ij28IcVAaY2xG8wAqjxCEc2xF0c Ia020Ex4CE44I27wAqx4xG64xvF2IEw4CE5I8CrVC2j2WlYx0E2Ix0cI8IcVAFwI0_JF0_ Jw1lYx0Ex4A2jsIE14v26F4j6r4UJwAm72CE4IkC6x0Yz7v_Jr0_Gr1lF7xvr2IYc2Ij64 vIr41lc7CjxVAaw2AFwI0_JF0_Jw1l42xK82IYc2Ij64vIr41l4I8I3I0E4IkC6x0Yz7v_ Jr0_Gr1l4IxYO2xFxVAFwI0_JF0_Jw1lx2IqxVAqx4xG67AKxVWUJVWUGwC20s026x8Gjc xK67AKxVWUGVWUWwC2zVAF1VAY17CE14v26r1q6r43MIIYrxkI7VAKI48JMIIF0xvE2Ix0 cI8IcVAFwI0_JFI_Gr1lIxAIcVC0I7IYx2IY6xkF7I0E14v26r1j6r4UMIIF0xvE42xK8V AvwI8IcIk0rVWUJVWUCwCI42IY6I8E87Iv67AKxVWxJVW8Jr1lIxAIcVC2z280aVCY1x02 67AKxVW8Jr0_Cr1UYxBIdaVFxhVjvjDU0xZFpf9x07jb_-PUUUUU= 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: 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?1768221495561825747?= 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 --- 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 */