From patchwork Tue Aug 8 22:34:02 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Sui Jingfeng X-Patchwork-Id: 13347097 X-Patchwork-Delegate: bhelgaas@google.com Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 37B56C41513 for ; Tue, 8 Aug 2023 22:34:29 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230270AbjHHWe2 (ORCPT ); Tue, 8 Aug 2023 18:34:28 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50336 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230230AbjHHWe2 (ORCPT ); Tue, 8 Aug 2023 18:34:28 -0400 Received: from out-89.mta1.migadu.com (out-89.mta1.migadu.com [95.215.58.89]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 787BB103 for ; Tue, 8 Aug 2023 15:34:27 -0700 (PDT) X-Report-Abuse: Please report any abuse attempt to abuse@migadu.com and include these headers. DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.dev; s=key1; t=1691534065; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=kMZFiXLbvuUKqAxgf3kGEHVuig7HKmYmUGlXimZwqh0=; b=gYYYZz7sgbjkXiOvct7Hq2K9qMFVYi6dEUWlDONqX31wbF397lhaoHM3Gu25Ys7eZvako7 sYZPMfyIWVfvIbJjpAJLLiU9lLXTr2G54lAaEnB4MeUCQBwZcDHl5k+G/QwNGqjjikkze3 sR6CG5IdMwL+A7es2aH1iHntSoZprGQ= From: Sui Jingfeng To: Bjorn Helgaas Cc: Dave Airlie , Daniel Vetter , linux-pci@vger.kernel.org, dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org, Sui Jingfeng , Andi Shyti Subject: [PATCH v2 01/11] PCI/VGA: Use unsigned type for the io_state variable Date: Wed, 9 Aug 2023 06:34:02 +0800 Message-Id: <20230808223412.1743176-2-sui.jingfeng@linux.dev> In-Reply-To: <20230808223412.1743176-1-sui.jingfeng@linux.dev> References: <20230808223412.1743176-1-sui.jingfeng@linux.dev> MIME-Version: 1.0 X-Migadu-Flow: FLOW_OUT Precedence: bulk List-ID: X-Mailing-List: linux-pci@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, this patch replaceis the third argument of vga_str_to_iostate() function with 'unsigned int *' type. Reviewed-by: Andi Shyti Signed-off-by: Sui Jingfeng Reviewed-by: Ilpo Järvinen --- 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 */