Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp22092063rwd; Fri, 30 Jun 2023 03:54:43 -0700 (PDT) X-Google-Smtp-Source: APBJJlHF1Ln+ar2y1K2qHfJNCHgMQdyuoB2E6WqGYjW6MLLxF0RZl9yJ17u+71xQnwkYfIJVyy6r X-Received: by 2002:a81:7109:0:b0:56d:790:6b2b with SMTP id m9-20020a817109000000b0056d07906b2bmr2028222ywc.46.1688122483004; Fri, 30 Jun 2023 03:54:43 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1688122482; cv=none; d=google.com; s=arc-20160816; b=LWeoZdkt12Z1YLKzLZvJgE0mXZFM2FPLQq002/iRUvmsqVEfKaY9CdsAGLCnydIE1a Ud7xFJXjwqRSC+jUmXjh0ElO/bgwfpsaPXumTc8NkF1E6EbJHnUTZoamSv4//LYSYiiF vByFbTxsBMTSxPsoxliuYeV28a18z6MKuLAaMBpi6FCLtCzT0UdlWPeiwv7R2Ja05RRM st/oqoc/XmHULEky2RrFCuO3uoW+CcFoSr1aOWffQLAGs08iR5t0RP1QMXwQTfdRHCFa 4Fe/ogngNWa85hK/mXMYNlm2/ex0aC1fPTX80OwJnSK+bAo0rIfVsXboaRjEw1kqrUsf EWUg== 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 :message-id:date:subject:cc:to:from:dkim-signature; bh=8Qdp9pUoNDY5Mvuaf7+DmACBXhNJIeFau8zbx4GIwY4=; fh=t9UHDBAL4n5Wk0IuJNme4Bussxb2u0dTQQaTsoa3lto=; b=gmGif4PIYGlZXQkcNP5RqGRM77jF8RfcRBCyrKmDf5P3ZPUfimaUoyMJ4EzZPunIEe 6LSVuXMel9HaLXibQDpj3Zc73LyW606Cl7tFdoEKhP9GSJLFKeOWNFBUQnroBF1QySLE EqgImOAT5UHXFDb1lw6AiVy7z+1El4kvT1SMKXV/IXaJCE/ZUSoNCJRJf9JSC10KHgbW W1RT7bThaDsaQr4igMsTgnIDQSGCfqIshtNrzH223I07h/XvtGONOIjWLBTlGePgmV8s zKAR2DJFxeGuP6EovEHKvNGzkQe4YvRkZb9YAaHf13ifMhVDeXbCw1zMZ+N8Hzo6JsOm gCug== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linux.dev header.s=key1 header.b="i/whvion"; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linux.dev Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id q23-20020a635c17000000b00540102a876csi11841990pgb.73.2023.06.30.03.54.30; Fri, 30 Jun 2023 03:54:42 -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; dkim=pass header.i=@linux.dev header.s=key1 header.b="i/whvion"; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linux.dev Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231617AbjF3Kdf (ORCPT + 99 others); Fri, 30 Jun 2023 06:33:35 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:34970 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231634AbjF3Kdd (ORCPT ); Fri, 30 Jun 2023 06:33:33 -0400 X-Greylist: delayed 549 seconds by postgrey-1.37 at lindbergh.monkeyblade.net; Fri, 30 Jun 2023 03:33:32 PDT Received: from out-49.mta1.migadu.com (out-49.mta1.migadu.com [IPv6:2001:41d0:203:375::31]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 569F8359E for ; Fri, 30 Jun 2023 03:33:32 -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=1688120662; 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; bh=8Qdp9pUoNDY5Mvuaf7+DmACBXhNJIeFau8zbx4GIwY4=; b=i/whvionwp7XeBI50BDtNvMp+ngKCUEzRxZds9j4ahAqhJmK6r1FRei7sRHniau8/OIylZ vkYcn7T9RIFYd2FTAJqNJPdp94Cw0Lh9dxWuAgFxtU0saOFKiEWU6uaZLWtLzP7g28/nL7 Tzv1xubl9tHNvhORMxE04c8sI/Lclpo= From: Sui Jingfeng To: Bjorn Helgaas Cc: linux-pci@vger.kernel.org, linux-kernel@vger.kernel.org, Sui Jingfeng Subject: [PATCH 2/2] PCI/VGA: drop the inline of vga_update_device_decodes() function Date: Fri, 30 Jun 2023 18:24:12 +0800 Message-Id: <20230630102412.134977-1-sui.jingfeng@linux.dev> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Migadu-Flow: FLOW_OUT X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_NONE,SPF_PASS, T_SCC_BODY_TEXT_LINE,URIBL_BLOCKED autolearn=unavailable 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 vga_update_device_decodes() is NOT a trivial function, nor performance critical. So drop the inline. Also keep the parameter and argument consistent. The second argument should declared as 'unsigned int' type. Signed-off-by: Sui Jingfeng --- drivers/pci/vgaarb.c | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/drivers/pci/vgaarb.c b/drivers/pci/vgaarb.c index cbd06bbf9dd7..17bd1268c36a 100644 --- a/drivers/pci/vgaarb.c +++ b/drivers/pci/vgaarb.c @@ -877,21 +877,21 @@ static bool vga_arbiter_del_pci_device(struct pci_dev *pdev) } /* This is called with the lock */ -static inline void vga_update_device_decodes(struct vga_device *vgadev, - int new_decodes) +static void vga_update_device_decodes(struct vga_device *vgadev, + unsigned int new_decodes) { struct device *dev = &vgadev->pdev->dev; - int old_decodes, decodes_removed, decodes_unlocked; + unsigned int old_decodes = vgadev->decodes; + unsigned int decodes_removed = ~new_decodes & old_decodes; + unsigned int decodes_unlocked = vgadev->locks & decodes_removed; - old_decodes = vgadev->decodes; - decodes_removed = ~new_decodes & old_decodes; - decodes_unlocked = vgadev->locks & decodes_removed; vgadev->decodes = new_decodes; - vgaarb_info(dev, "changed VGA decodes: olddecodes=%s,decodes=%s:owns=%s\n", - vga_iostate_to_str(old_decodes), - vga_iostate_to_str(vgadev->decodes), - vga_iostate_to_str(vgadev->owns)); + vgaarb_info(dev, + "VGA decodes changed: olddecodes=%s,decodes=%s:owns=%s\n", + vga_iostate_to_str(old_decodes), + vga_iostate_to_str(vgadev->decodes), + vga_iostate_to_str(vgadev->owns)); /* If we removed locked decodes, lock count goes to zero, and release */ if (decodes_unlocked) { -- 2.25.1