From patchwork Thu Jun 8 11:43:20 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: 104950 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:994d:0:b0:3d9:f83d:47d9 with SMTP id k13csp241284vqr; Thu, 8 Jun 2023 05:23:45 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ6W1cfN4wXTmC6x4Sz1F1jheCsc7XlQsjKey84nkO28JJ2pW32TNn58FXUJ/FVQ0gpWlwsQ X-Received: by 2002:a17:90a:cc3:b0:255:fe76:d13c with SMTP id 3-20020a17090a0cc300b00255fe76d13cmr2285331pjt.15.1686227025391; Thu, 08 Jun 2023 05:23:45 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1686227025; cv=none; d=google.com; s=arc-20160816; b=vM6VP+LKIePXAWlkgvCTYZq97yjgmScI7sR6HKnkxBneYDkE4ibC2ZgJgW6tRWq+C6 qeCgDN0GFG5puiEvXpXK2duHHd90PMQi8s11gdQo66ikwgmv03lz5cZ3vn6XF/E2pe42 I+0mDqB9SKJYzW0YR8JbsaZgL6nHrGEQvKEKeT001B69nKJBkDUa7WcVQiyh4PcV/PZw stP+WSG8Ex0wuzdsQGbD52Kc5HVd9RQEZxfgnbohkFBSUXTGvukL6+dXVnSyvNdu7Ksn Zll2+pNnKGQ45ocTrkwlwrjAFWjQwVnA5NsTqlYYGismwfkV1GbxleJUMJ+uSgn2BEGF Ie8Q== 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=vLGHWg9dzpC3BbwFC8G0tsb5xLtGsnU/QKBjwOhHuqU=; b=v/lOFXrylLnxdWXHgIjM27NB0jYaiAOdJWHD7GgINZT7rEVA5AbUF+ji17yrCvelvA ivDc0Jn1UwFfDpndbukmueG8/BTSIAF0HYdIZYgb4gEYdbHYr/NeG8/UiQw/GO1bVbDU I/VdG49C97pLaebTqMZMCEi9068u3suDD7Cvu0P2/YnaFOymEwqY93gyq04qJ1uAn5Vg ynadxFUT8X9uc42/AR57NVZoNP0+TdEDP+9KAc0dNVUTsgmZEJz8LwNJK8xRaAYye/3U CnMu+e8GKMH221x8kxgZYba8Zxw6p1qa2Kbo9hH+NjfWOCeORo9rtoRD7FYp7Z0aQKL5 LdLg== 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 d6-20020a17090a564600b00250c9a70af9si975749pji.63.2023.06.08.05.23.30; Thu, 08 Jun 2023 05:23:45 -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 S236423AbjFHLno (ORCPT + 99 others); Thu, 8 Jun 2023 07:43:44 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:58106 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236356AbjFHLnj (ORCPT ); Thu, 8 Jun 2023 07:43:39 -0400 Received: from 189.cn (ptr.189.cn [183.61.185.103]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id E181B1FF7; Thu, 8 Jun 2023 04:43:35 -0700 (PDT) HMM_SOURCE_IP: 10.64.8.41:48916.660287130 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 02CCC1002A1; Thu, 8 Jun 2023 19:43:31 +0800 (CST) Received: from ([114.242.206.180]) by gateway-151646-dep-75648544bd-xwndj with ESMTP id 9c387853f0974dd996c75b62ed780623 for alexander.deucher@amd.com; Thu, 08 Jun 2023 19:43:35 CST X-Transaction-ID: 9c387853f0974dd996c75b62ed780623 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 Subject: [PATCH v3 2/4] PCI/VGA: Use unsigned type for the io_state variable Date: Thu, 8 Jun 2023 19:43:20 +0800 Message-Id: <20230608114322.604887-3-15330273260@189.cn> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20230608114322.604887-1-15330273260@189.cn> References: <20230608114322.604887-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?1768137189316439334?= X-GMAIL-MSGID: =?utf-8?q?1768137189316439334?= 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 --- 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 bf2921e3cb06..7f0347f4f6fd 100644 --- a/drivers/pci/vgaarb.c +++ b/drivers/pci/vgaarb.c @@ -76,7 +76,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