Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp610224rwd; Thu, 8 Jun 2023 05:35:22 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ596XqCmZi1KdKk1AEQiiU0nYTQVJfXLUEbnWZ6KuQYA8K+YUOpbhSFgJBJwpNecaKM2PTA X-Received: by 2002:a17:90a:357:b0:252:7372:460c with SMTP id 23-20020a17090a035700b002527372460cmr2475489pjf.4.1686227722076; Thu, 08 Jun 2023 05:35:22 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1686227722; cv=none; d=google.com; s=arc-20160816; b=tq6eoZ6lPXRCW+89vX6MeXA8vBmeFMcELlOERp+jLXvLCimfT8/LZXAyouUVmpQGoP 44wOsjqHhjz9TjFRHx7nLiX+RMPr0aYSzFx3YomT7eB6COPAuIhMK8xYdkYMobFCRZ1b 9kd2d2suzLCuAiFdsggbwbwWsofMljMFLVxQ7CsQorEhBqrrh2XF5XcHbodrX9f77hSS hx9etXJh/izxZD+BREc0qgTrv2rc+NQ2/8XRuZC4Vb3mUDeE2WJXs2WaiS5r0isHX+XH pNtD4SXPLIYUPwqVJya7n927mk1g433VoHMEdNCd4o0ki0+8dBVnQUu/aB5Q88wMIBqV vXQQ== 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 Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id s61-20020a17090a69c300b002477fad79d5si2738023pjj.63.2023.06.08.05.35.09; Thu, 08 Jun 2023 05:35:22 -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 S236412AbjFHLnn (ORCPT + 99 others); Thu, 8 Jun 2023 07:43:43 -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 Content-Transfer-Encoding: 8bit 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 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 -- 2.25.1