From patchwork Mon Jun 12 19:25:43 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: 106775 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:994d:0:b0:3d9:f83d:47d9 with SMTP id k13csp92456vqr; Mon, 12 Jun 2023 12:39:38 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ5kF5ALRoErRnhVl8Y/tSRF2x8xNxXuSv2mV8qZP4NTsEtjdi5gLWxe3wAxPmdCE6PtGtEN X-Received: by 2002:a19:5f55:0:b0:4f4:cebe:a7a3 with SMTP id a21-20020a195f55000000b004f4cebea7a3mr5731587lfj.30.1686598778117; Mon, 12 Jun 2023 12:39:38 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1686598778; cv=none; d=google.com; s=arc-20160816; b=Yv+zidZx9xIaTS1jw2/+RAHEzP9mSELSlrMomZbIc+wEq8Pg7+c08GeDgycs5fvfxs HRwOVH/QEtcEup0VBEeLyBOyxdvGYLdfl4b0wCI0Tnpz/zJfut9Fs9WkUER+0vZbHcjW qjg5meKZgJwnQ9s970g5TldaFZ6in8PLA7TD4MC6zdZ4hvPpacZ2xcO7zRVTQxbV6s1r oUEoTVE1xvPRN/UcYVvXQkJLRFhelF5w79piWnphnkR9/tCsJXGMsOazUjIBEb9px/d9 QYXl/MblNdLd3WvL9zEMANGXv7h/02eMLiy2qFK1pJleThWIlqOdKjCTpIxccMWcJ9Da mZ8Q== 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=L3CqUWHTXt9YKLludIAE9Vu171FOQTMffySfHpYiVKE=; b=W+2tgQIUCfxVLRSja3N82VUiS5849yCFy4gfUXA2o0ysOsxOaO7LErYfP6MH1aGHF+ rCTrwAuXqyc87DTAJQo0QVwUAsi11dvhifJRre3eTKJwfw8qfDMRg7nx6NcqIfgGFDzz 5Wl76OcM27ZhUsI2hLhu/xaBcViBAeqYfpd0IE+OEjr/UVyBE9uLeLIFWxHrSDOks3B5 unfcTNQfUqWxCKaV6Q+p113SMisGChNgDHCJgaOOkv4sbFSkJoQgHbth91fCCO7ziXmj wSmNJmwSRjmHxQJHe6v9FGgNLWl3xZm6MF+JL7kQxQ9AYHt3fkaSoCCM0gIsZ+20VWvS uU0g== 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 y15-20020a50e60f000000b0051496e9e348si6592108edm.156.2023.06.12.12.39.09; Mon, 12 Jun 2023 12:39: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 S237000AbjFLT0E (ORCPT + 99 others); Mon, 12 Jun 2023 15:26:04 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:51054 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232673AbjFLT0B (ORCPT ); Mon, 12 Jun 2023 15:26:01 -0400 Received: from 189.cn (ptr.189.cn [183.61.185.102]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 1EAE0E62; Mon, 12 Jun 2023 12:25:59 -0700 (PDT) HMM_SOURCE_IP: 10.64.8.41:42778.1249123675 HMM_ATTACHE_NUM: 0000 HMM_SOURCE_TYPE: SMTP Received: from clientip-114.242.206.180 (unknown [10.64.8.41]) by 189.cn (HERMES) with SMTP id 5A37E10028A; Tue, 13 Jun 2023 03:25:55 +0800 (CST) Received: from ([114.242.206.180]) by gateway-151646-dep-75648544bd-xwndj with ESMTP id 0cae6c450a124e588c27eedcae701e9b for alexander.deucher@amd.com; Tue, 13 Jun 2023 03:25:59 CST X-Transaction-ID: 0cae6c450a124e588c27eedcae701e9b 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: Alex Deucher , Christian Konig , Pan Xinhui , David Airlie , Daniel Vetter , Jani Nikula , Joonas Lahtinen , Rodrigo Vivi , Tvrtko Ursulin , Ben Skeggs , Karol Herbst , Lyude Paul , Bjorn Helgaas , Alex Williamson , Maarten Lankhorst , Maxime Ripard , Thomas Zimmermann , Hawking Zhang , Mario Limonciello , Lijo Lazar , YiPeng Chai , Andrey Grodzovsky , Somalapuram Amaranath , Bokun Zhang , Ville Syrjala , Li Yi , Sui Jingfeng , Jason Gunthorpe , Kevin Tian , Cornelia Huck , Yishai Hadas , Abhishek Sahu , Yi Liu 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, loongson-kernel@lists.loongnix.cn, Andi Shyti Subject: [PATCH v6 1/8] PCI/VGA: Use unsigned type for the io_state variable Date: Tue, 13 Jun 2023 03:25:43 +0800 Message-Id: <20230612192550.197053-2-15330273260@189.cn> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20230612192550.197053-1-15330273260@189.cn> References: <20230612192550.197053-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?1768527000481204449?= X-GMAIL-MSGID: =?utf-8?q?1768527000481204449?= 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. 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 */