From patchwork Tue Jun 13 03:01:44 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sui Jingfeng <15330273260@189.cn> X-Patchwork-Id: 107053 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:994d:0:b0:3d9:f83d:47d9 with SMTP id k13csp274566vqr; Mon, 12 Jun 2023 20:16:27 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ7hQaSttpnuVbLJOUG1HR8nNk6sakJ1/79hYCN4MKn88bmYBQC7KMYN/L6vMxwk4EfDI8lj X-Received: by 2002:a17:907:728a:b0:974:183a:54b6 with SMTP id dt10-20020a170907728a00b00974183a54b6mr11196361ejc.33.1686626187201; Mon, 12 Jun 2023 20:16:27 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1686626187; cv=none; d=google.com; s=arc-20160816; b=UKEYbi+zGHyBSLjwjmd3hViq2DgI8a6ex7mizvvb2Fot2C6FoWmcRU6IJImXMzQlNN I4Lf0imWtdT/9EUfygd3qHA7flzK36I31d0E3VX2PzSnFO3yNOR+VsicklJTuRQxQF8e VpbvkUqqYcRBH5/qNGrAxhjLyLlDwVHjN2Muil6svYaTzPmprPFJn7vOUr+cp5qWqW2+ 9b3UOv1kyt2ZTfXv+9daxDgisWrxt0Aiy8uGuLpBvnZlN/teha2JbsilMNFH1kF2Ut0I 0L/pltDQNAyae1FuYMXcUdfn4hBbmFFxq4mgDX/hrSwFsgB9Es8wt/j5fcUKOhNjdmW3 wXLQ== 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 :references:in-reply-to:message-id:date:subject:cc:to:from:sender :hmm_source_type:hmm_attache_num:hmm_source_ip; bh=238fDL+qYWlIygY8L+jiZcs0vm4Z6TsIfIVyCvmsMuE=; b=ExrrgvV89MlZf1akejGvqlhx9z7W9GADUxx1fYhvXa9wqJ8FRovmiQXa70y0TMNHtU ZORWxAHOH1q9UBfTtoL1D/bG/1y0ASUUbjy0gRjoxwHPpvyOWkang/U7RbkPUSCdwE11 A0GjcZw0+GVkckPNGFuaD5JuangUvkzVVveEL9A+/heRHI7jbYeNtqzHyrtFJE9qvTsb 5Vb/yUAhfNeKjM1EZTBdUNEN2xmwCP9ar6IuB2Z5DYZFNgEsYuw7Lr/3wBv+s5ONZnDv Ce4xK6eD1qz/UuT810xiTRuNGKH3Rn6CK2r7sTFFu5SSl4kHFgnHfWMXfCP7sMsWeHCq d8mw== 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 lf3-20020a170907174300b0096661b3f659si6320396ejc.796.2023.06.12.20.16.03; Mon, 12 Jun 2023 20:16:27 -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 S239470AbjFMDEP (ORCPT + 99 others); Mon, 12 Jun 2023 23:04:15 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:52564 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S239671AbjFMDDs (ORCPT ); Mon, 12 Jun 2023 23:03:48 -0400 Received: from 189.cn (ptr.189.cn [183.61.185.102]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 4A3201BD9; Mon, 12 Jun 2023 20:02:32 -0700 (PDT) HMM_SOURCE_IP: 10.64.8.43:47948.1267835893 HMM_ATTACHE_NUM: 0000 HMM_SOURCE_TYPE: SMTP Received: from clientip-114.242.206.180 (unknown [10.64.8.43]) by 189.cn (HERMES) with SMTP id EAD2B1002F6; Tue, 13 Jun 2023 11:01:56 +0800 (CST) Received: from ([114.242.206.180]) by gateway-151646-dep-75648544bd-7vx9t with ESMTP id f7147316d1f743978c2fb65587fab21b for bhelgaas@google.com; Tue, 13 Jun 2023 11:01:58 CST X-Transaction-ID: f7147316d1f743978c2fb65587fab21b X-Real-From: 15330273260@189.cn X-Receive-IP: 114.242.206.180 X-MEDUSA-Status: 0 Sender: 15330273260@189.cn From: Sui Jingfeng <15330273260@189.cn> To: Bjorn Helgaas Cc: amd-gfx@lists.freedesktop.org, dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org, intel-gfx@lists.freedesktop.org, nouveau@lists.freedesktop.org, linux-pci@vger.kernel.org, kvm@vger.kernel.org, linux-fbdev@vger.kernel.org, Sui Jingfeng , Andi Shyti Subject: [PATCH v7 1/8] PCI/VGA: Use unsigned type for the io_state variable Date: Tue, 13 Jun 2023 11:01:44 +0800 Message-Id: <20230613030151.216625-2-15330273260@189.cn> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20230613030151.216625-1-15330273260@189.cn> References: <20230613030151.216625-1-15330273260@189.cn> MIME-Version: 1.0 X-Spam-Status: No, score=-1.7 required=5.0 tests=BAYES_00, FREEMAIL_ENVFROM_END_DIGIT,FREEMAIL_FROM,FROM_LOCAL_DIGITS, FROM_LOCAL_HEX,SPF_HELO_PASS,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=no 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?1768555740438104759?= X-GMAIL-MSGID: =?utf-8?q?1768555740438104759?= From: Sui Jingfeng 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. Cc: Bjorn Helgaas Signed-off-by: Sui Jingfeng Reviewed-by: Andi Shyti --- 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 */