Received: by 2002:a05:7412:8d10:b0:f3:1519:9f41 with SMTP id bj16csp5687593rdb; Wed, 13 Dec 2023 16:59:08 -0800 (PST) X-Google-Smtp-Source: AGHT+IEaRdptokgAMX2GgOUBZRoQsX/6R6Rc2V1GEibTazdbZdGbEu1VgDWGO29qOTT1lclJAdUc X-Received: by 2002:a05:6871:a003:b0:1fb:75a:de6c with SMTP id vp3-20020a056871a00300b001fb075ade6cmr10459140oab.90.1702515547755; Wed, 13 Dec 2023 16:59:07 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1702515547; cv=none; d=google.com; s=arc-20160816; b=X9IfZ2b5DzBZ8mds2xVKIWGTV8NamzTPrTJpITZt64FQxA3G+qNUwq04C+Eq5EV46N iJPxCh1jgO1c601LNg6/aknwn64OON6aRR+NugshgheFHHe3rW4AmaT5EUrYcvYnqBJt x+5xNfBA8WKZxjtGjeukW19/8EZEqcgysEmhPe6/3Y+uWnm/tNHrRVs8jNoJT028F3du wfQFBBvpL5ZknNIjOhNWNV6eUu96DJ+BGuDqiHz/P9h4CoB/91NNp0vPOKhPZBejQANo LmUBeCbQifaCkjpWfrjph3U4OziXpDMIuRoK3jSaHNfqJ4IzZnZHGmnEFX21sW+FvaFt CHOw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to:from :references:cc:to:subject:user-agent:mime-version:date:message-id :dkim-signature; bh=kzCDeZo6bmPZ/k4p9dVsUz33D2ERb/LJ1eEhRsL0iEU=; fh=YTmfznrBNBA+w5Xsr8rNCiZzFL1zVnuVu0r2j7yghYo=; b=RRS1MYrK+q126YYxlZYtbVKYy/B/D+s3UPetXr5Ievf53LY4cVMctuTAnQLSMicWl3 V7prniDDXH3ORB7kQLynYffrmw5gOF70V1jUmsIGPqjM2t1+lAtBLJ9+HWtM8Ebrqhdg QXQiRQ0D0KBEVNFb48j9VzVNGYZvKCDcE3Wcm3zIoHLLbBSfIqk1skxUOGMcoQsGTwZT OUo1OWC76N46sJFLVlEQxnIb16B2jfcKHleu2VGQnObTzMZ0wXC3CF1j9rlYPTDfqi8w vYXXgRtehTiK2L5gd3PQjoduaMCGtyOpaY3Kb5pabbFk/KN/pyWYBuZR2oNR3J7+WZva nfeQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=izM2IfdX; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:6 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from pete.vger.email (pete.vger.email. [2620:137:e000::3:6]) by mx.google.com with ESMTPS id p38-20020a634f66000000b005c663b4fcc5si6040676pgl.458.2023.12.13.16.59.07 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 13 Dec 2023 16:59:07 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:6 as permitted sender) client-ip=2620:137:e000::3:6; Authentication-Results: mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=izM2IfdX; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:6 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by pete.vger.email (Postfix) with ESMTP id 29A2681C2019; Wed, 13 Dec 2023 16:59:05 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at pete.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234083AbjLNA6v (ORCPT + 99 others); Wed, 13 Dec 2023 19:58:51 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:34622 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229725AbjLNA6u (ORCPT ); Wed, 13 Dec 2023 19:58:50 -0500 Received: from mgamail.intel.com (mgamail.intel.com [192.55.52.43]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id DE511DB; Wed, 13 Dec 2023 16:58:56 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1702515536; x=1734051536; h=message-id:date:mime-version:subject:to:cc:references: from:in-reply-to:content-transfer-encoding; bh=w4CvfAEx5Otr1z8ctNIsiiCXmkHh9thOmbmC19YRFYY=; b=izM2IfdXp1DUVRrlv+F/kBhdfqewhqTf7XFzrisG6VALGpmxyAwrOelh 4D7SQeYWxbVKNfLctQz1ZZ2ttBOuO2XPno389RVKCxMecdgARZZSpy4N3 fYYULyhChYkSC+qjvqW5a8ncYZIlGCOTxe4mM+dVi/NffJeMU9EjUxqvG LdW7uMEyBLy40A0ea1piY5N5P765eZyNjfKBd+okJBg7/r31dutlHVVCC B2gGyKjn/hR4mlsAGJOZRgAiLP8tYpGbP94A18CWpfBW1lhpLcziXeNxE 7P4wd1MMAMQ253vlG+Zoz+ZudxdqnrLZrtILNeAECwexcBUA91oUokYzt Q==; X-IronPort-AV: E=McAfee;i="6600,9927,10923"; a="481246314" X-IronPort-AV: E=Sophos;i="6.04,274,1695711600"; d="scan'208";a="481246314" Received: from orsmga006.jf.intel.com ([10.7.209.51]) by fmsmga105.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 13 Dec 2023 16:58:56 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10923"; a="750326235" X-IronPort-AV: E=Sophos;i="6.04,274,1695711600"; d="scan'208";a="750326235" Received: from jiqing1x-mobl1.ccr.corp.intel.com (HELO [10.254.210.186]) ([10.254.210.186]) by orsmga006-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 13 Dec 2023 16:58:53 -0800 Message-ID: <31bd82b6-6f7e-4dc4-8cbb-46fa806d699f@linux.intel.com> Date: Thu, 14 Dec 2023 08:58:49 +0800 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH 1/2] PCI: make pci_dev_is_disconnected() helper public for other drivers To: Lukas Wunner Cc: bhelgaas@google.com, baolu.lu@linux.intel.com, dwmw2@infradead.org, will@kernel.org, robin.murphy@arm.com, linux-pci@vger.kernel.org, iommu@lists.linux.dev, linux-kernel@vger.kernel.org, Haorong Ye References: <20231213034637.2603013-1-haifeng.zhao@linux.intel.com> <20231213034637.2603013-2-haifeng.zhao@linux.intel.com> <20231213104930.GB31964@wunner.de> From: Ethan Zhao In-Reply-To: <20231213104930.GB31964@wunner.de> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-0.8 required=5.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on pete.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (pete.vger.email [0.0.0.0]); Wed, 13 Dec 2023 16:59:05 -0800 (PST) On 12/13/2023 6:49 PM, Lukas Wunner wrote: > On Tue, Dec 12, 2023 at 10:46:36PM -0500, Ethan Zhao wrote: >> move pci_dev_is_disconnected() from driver/pci/pci.h to public >> include/linux/pci.h for other driver's reference. >> no function change. > That's merely a prose description of the code. A reader can already > see from the code what it's doing. You need to explain the *reason* > for the change instead. E.g.: "Make pci_dev_is_disconnected() public > so that it can be called from $DRIVER to speed up hot removal > handling which may otherwise take seconds because of $REASONS." Yup, why I made it public. then how about " Make pci_dev_is_disconnected() public so that it can be called from Intel vt-d driver to check the device's hotplug removal state when issue devTLB flush request." Thanks, Ethan > > Thanks, > > Lukas