Received: by 2002:ab2:6c55:0:b0:1fd:c486:4f03 with SMTP id v21csp78901lqp; Tue, 11 Jun 2024 15:34:28 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCWoNcP7qEJaFnnLaJ6+hDe76y26U02i3y48Ng9XsROfXwSYO6r+YyD7Nx0JLSbtS0pk6mGQYLlYaZyUEyVsiVHzQYsFrbDvc7bqXl/2dg== X-Google-Smtp-Source: AGHT+IHoxWMhR52n+lQAOf+/aw5uYB/yiU46eRid3WIjcW1wTKmVJ4YQe3dwaNz3U+bKP390fWDL X-Received: by 2002:a05:6602:6d8a:b0:7eb:85f7:601 with SMTP id ca18e2360f4ac-7ebccfaa7bcmr38886539f.0.1718145268274; Tue, 11 Jun 2024 15:34:28 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1718145268; cv=pass; d=google.com; s=arc-20160816; b=ZmOuUPgsDK/Lw62mits2tUG1s0f6VpiNzRHqHv58LzTZlukOfM2YYxfv+ojdThJCmA JD4j/LBq40G5XCvs2rZeF+ua0TIIgAbhDIiuzTVrCtWOdvHSFNqiEJBLib6FB0KUkXp0 IgZ/emYjfvp77q+rm51pjhstc4QoU1PuIABDFdJ8l/FnnqCXTnXgGNMEFdFCoGP/ZT61 ZmZpZCrg56vgWEut3TKfWgItG+2yhaYZ4UuMfIWZuTOfrAI5IUcgIlgHY3sKQ/CfW0IM Y14/MP6hLmCFkpfQx3eq0RJEeX308WT7dh9rcTx0euDbcHtb7dHg6OGOVCDO44Ol8nQg temw== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=in-reply-to:content-disposition:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:message-id:subject:cc:to:from :date:dkim-signature; bh=XWkZtGkEC6sFAWkQHjYOva+0nEDrRlqwPTFEsQ2ZDxc=; fh=jt6Pg+CqN/j3pJv1u7q45E41yWYCrCg0ofI0Cto1lxk=; b=sNMiCWzCKdVF7Wt9Qd0e0l74RBxR0mPKI5W/lmesz7NFe0JSSptaISOCsZuX0hSlIc a1OHqXl9Nq2c8b7OkjX3T+019XDxy1Y0nNvAK2cowMmf5tuDFYVwaR19eF6WlMqPc9OY QZ98rnYhG+WbZ6tBE5BjtaNrSrC4b/5Ah8I+oytAABgf9Ac5o/8sbpykYL9/CkITzo3e uS4EdfSfnYwB5/yXu3YhOCj3v6j7QwLuH7Oqg1snO7zp7EN5j/0eosV3iBmM2m2eajKG hN98aymn/B6MaB0EUEiprOe1tqXPaPtnkekgmsDqsPz1+doy1ltMXM1Yzz/thbZkeSHG /cAw==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=BwDqETpD; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-210667-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-210667-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [2604:1380:45e3:2400::1]) by mx.google.com with ESMTPS id 41be03b00d2f7-6eb106d1482si5565895a12.109.2024.06.11.15.34.27 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 11 Jun 2024 15:34:28 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-210667-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) client-ip=2604:1380:45e3:2400::1; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=BwDqETpD; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-210667-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-210667-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sv.mirrors.kernel.org (Postfix) with ESMTPS id BF312284DCE for ; Tue, 11 Jun 2024 22:34:27 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 78D491553A1; Tue, 11 Jun 2024 22:34:21 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="BwDqETpD" Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id A39B715278E; Tue, 11 Jun 2024 22:34:20 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1718145260; cv=none; b=OBSdnU6jBUD39uCf6R2bUC8gkEPxiKOKSeb2jaFKxgPCpIOL+7c718mlHnw5sRR9FnaeVvuuhF4EOhGjBVWH84DyzLY+PUyN1qKJF1iJBseS329TTAovIh5Ht1zMz2emF19uN7BwTrSRMa2x02Q3+CqZPYrSknwMODfLoSCZRWI= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1718145260; c=relaxed/simple; bh=6GordRBuWLTh8oc2MWZSDiy0M1wmL4hf/uHeNjmS/ro=; h=Date:From:To:Cc:Subject:Message-ID:MIME-Version:Content-Type: Content-Disposition:In-Reply-To; b=YebBnHKSi5v94dqZWCraWtdgh5satUW4dL+2sYQdtVUAXVtTbTDM2VCSdXkgyjhfH8LwIardUUyzcQpt/vVLjMQmcmqcGURSrsvu1+MuBXvHd9XiZNpHjfJ9FaB22rLF8DkMXw1WUiUb5rFxjYZxB01ZAhtAMXfFCIbTa/1IWuU= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=BwDqETpD; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id 04546C2BD10; Tue, 11 Jun 2024 22:34:19 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1718145260; bh=6GordRBuWLTh8oc2MWZSDiy0M1wmL4hf/uHeNjmS/ro=; h=Date:From:To:Cc:Subject:In-Reply-To:From; b=BwDqETpDWwUBovAPWXpDW0NWycNLHqut/W54RAkDadU2ysbnSKfG8jfuPWiOxC9RT fihJ7LbCHoeS8bDWXwxEEsHeE2Qfk4yS9B42OcNlPWy+rTCKuU5YfkqIJp/OE/GYsa 87KR+LgL7ZecOBrpudO1rRMvyYdjEbXgRYRw6PVHZpKmSZanRBWN5sCQfr9tKegf8A 4t+hlUbPvq0ZSpiOvA9agaOkeI29qb0e71OJohWUsaFADjYZyY/k06IxSjcqlP/uDh KF94o4U27nN5yvWu2q/7i68L10Eb5KLsoFtqQgUgLox94fvA/RQaukzntOSMxb1kF3 rSBh7eArWpcMw== Date: Tue, 11 Jun 2024 17:34:18 -0500 From: Bjorn Helgaas To: Songyang Li Cc: bhelgaas@google.com, linux-pci@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] PCI: Cancel compilation restrictions on function pcie_clear_device_status Message-ID: <20240611223418.GA1005201@bhelgaas> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: On Tue, Jun 11, 2024 at 11:15:10PM +0800, Songyang Li wrote: > Some PCIe devices do not have AER capabilities, but they have device > status registers. > > Signed-off-by: Songyang Li Unindent this. Add "()" after function names. Please explain what this patch does and why we want it. I can see from the patch that it makes it so pcie_clear_device_status() is always compiled, but the commit log should say that and should say why we need that. > --- > drivers/pci/pci.c | 8 ++++++-- > 1 file changed, 6 insertions(+), 2 deletions(-) > mode change 100644 => 100755 drivers/pci/pci.c > > diff --git a/drivers/pci/pci.c b/drivers/pci/pci.c > old mode 100644 > new mode 100755 > index 35fb1f17a589..e6de55be4c45 > --- a/drivers/pci/pci.c > +++ b/drivers/pci/pci.c > @@ -2263,7 +2263,12 @@ int pci_set_pcie_reset_state(struct pci_dev *dev, enum pcie_reset_state state) > } > EXPORT_SYMBOL_GPL(pci_set_pcie_reset_state); > > -#ifdef CONFIG_PCIEAER > +/** > + * pcie_clear_device_status - Clear device status. > + * @dev: the PCI device. > + * > + * Clear the device status for the PCI device. > + */ > void pcie_clear_device_status(struct pci_dev *dev) > { > u16 sta; > @@ -2271,7 +2276,6 @@ void pcie_clear_device_status(struct pci_dev *dev) > pcie_capability_read_word(dev, PCI_EXP_DEVSTA, &sta); > pcie_capability_write_word(dev, PCI_EXP_DEVSTA, sta); > } > -#endif > > /** > * pcie_clear_root_pme_status - Clear root port PME interrupt status. > -- > 2.34.1 >