Received: by 2002:a05:6359:c8b:b0:c7:702f:21d4 with SMTP id go11csp1480544rwb; Tue, 27 Sep 2022 13:51:13 -0700 (PDT) X-Google-Smtp-Source: AMsMyM4RIJj4Vz7mrKpbKSIADbD8PPzorCjtQS/D7GsKTCpoBwf4rXJtl1a3K/fzEzw7nZrhk4lW X-Received: by 2002:aa7:cd76:0:b0:457:cada:6cb7 with SMTP id ca22-20020aa7cd76000000b00457cada6cb7mr3308022edb.369.1664311872913; Tue, 27 Sep 2022 13:51:12 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1664311872; cv=none; d=google.com; s=arc-20160816; b=eeuz+wA+wZL/HE+XpduhizW3Wxb99g9z98KDsRyWCMmKZSVxITUDKuxSUi1sDCyjTu 8QoqY6c3nOoiXR9pdSYolCBeUNBqcLByAsxE5Sk4gmxEzT3pmUsi6wReLu0j27wzLeWf CBYVwE5PEL3GC6ZktndCFAETZzkZ8EzNhdiEn4qJwkqpJLbGGWFTDmqvvLJ/9sZ3QAEd spTU2tuoYhYVF/POC4huNIsHHiBK1sVvxI//OjlGa3h2Z6142+GHipcvmUWH91JBXic/ 1dS0vd7ntIpA2T1wKm8JYv9tqbHatXqLsm9AkG3C7CRvMN7VFUz/z9ySoIRDS6APcSM7 xygw== 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:content-language:subject:user-agent:mime-version :date:message-id:dkim-signature; bh=zu6YJOq2IOyLqzKWv3QUmdQO5vmcNThxN7DaJpPp/Rc=; b=scBkWITV2PKN/jMfbk+gyszWVqqa5/2oBTveACEWGfw3JIE2ysbiCx28GIHGFCJSDL 16FkcKZ+mG2+dDdYBt7jlRZv1vtTvGgBt3goKLhhVTmQ3L/hoSCOHTLhAdEQMoSa3SMK kitdEvFYz3VLOqrSQLLIXoWj6JMm2bRRhwWqyPu2uOaOyffHUQLs0P0bbeGRnn5FYPGt DBXSpmWY0CFYU5mbeectNEwnmCIEOFOMZ/aVB0+JHjs5iTiThByen+si2Z/q8rZ55uG8 FFVHOzUv19y0m3KuTdqyL8ffhNaviVFi6iiuR77Ot6aia5JPqWrjd3xTZs+LVHFcfaEe dwzA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=HkjBZn39; 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=intel.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id z95-20020a509e68000000b004519cd16132si2227357ede.61.2022.09.27.13.50.46; Tue, 27 Sep 2022 13:51:12 -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=@intel.com header.s=Intel header.b=HkjBZn39; 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=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232654AbiI0UAn (ORCPT + 99 others); Tue, 27 Sep 2022 16:00:43 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:53906 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232142AbiI0T7i (ORCPT ); Tue, 27 Sep 2022 15:59:38 -0400 Received: from mga06.intel.com (mga06b.intel.com [134.134.136.31]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E844E1C483D; Tue, 27 Sep 2022 12:59:29 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1664308770; x=1695844770; h=message-id:date:mime-version:subject:to:cc:references: from:in-reply-to:content-transfer-encoding; bh=hHMW6dKcSr50LmzJxBbJqerolMIPg6Gn2+JmAaKAzHQ=; b=HkjBZn39TzCR4sNt6SAAne2GnMObisw+JDT9ogoCVOPz9I0B42IClLBE jw0ap1E0VATm9PrwrlDIMF23cbxiY8ig+ZlTWR1c2qQBks3c+EVZx7LSt P2MxgAtLPYIjuuFACPBznDNLQ4680QNo49zAnZtbDCXq+moleNH1wXZBt nN/a8u/xRsxDk3V5XV3aQA2z72GkNj9W9R5MYaQwHPUGkoehCIkU76VT5 CHlj+7g9ZcSfNeouJ9eqMtRUaSsE4gdSQFVqI3mxUORSdJZP42LRg9Fh1 yJpNUuCncnnv1tAX/h+BtPh9ViZLdQracOlDl6Q6aYH/MFtszE3uw0wHE A==; X-IronPort-AV: E=McAfee;i="6500,9779,10483"; a="363256903" X-IronPort-AV: E=Sophos;i="5.93,350,1654585200"; d="scan'208";a="363256903" Received: from fmsmga008.fm.intel.com ([10.253.24.58]) by orsmga104.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 27 Sep 2022 12:59:29 -0700 X-IronPort-AV: E=McAfee;i="6500,9779,10483"; a="684116462" X-IronPort-AV: E=Sophos;i="5.93,350,1654585200"; d="scan'208";a="684116462" Received: from weimingg-mobl.amr.corp.intel.com (HELO [10.212.244.112]) ([10.212.244.112]) by fmsmga008-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 27 Sep 2022 12:59:28 -0700 Message-ID: <8bf3e3c0-78b6-7121-1951-300175ede3b9@linux.intel.com> Date: Tue, 27 Sep 2022 12:59:27 -0700 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Firefox/91.0 Thunderbird/91.11.0 Subject: Re: [PATCH v2 5/9] PCI/AER: Unexport pci_aer_clear_nonfatal_status() Content-Language: en-US To: Zhuo Chen , bhelgaas@google.com, ruscur@russell.cc, oohall@gmail.com, fancer.lancer@gmail.com, jdmason@kudzu.us, dave.jiang@intel.com, allenbh@gmail.com, james.smart@broadcom.com, dick.kennedy@broadcom.com, jejb@linux.ibm.com, martin.petersen@oracle.com Cc: linuxppc-dev@lists.ozlabs.org, linux-pci@vger.kernel.org, linux-kernel@vger.kernel.org, ntb@lists.linux.dev, linux-scsi@vger.kernel.org References: <20220927153524.49172-1-chenzhuo.1@bytedance.com> <20220927153524.49172-6-chenzhuo.1@bytedance.com> From: Sathyanarayanan Kuppuswamy In-Reply-To: <20220927153524.49172-6-chenzhuo.1@bytedance.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-6.7 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_EF,NICE_REPLY_A,RCVD_IN_DNSWL_MED, SPF_HELO_NONE,SPF_NONE autolearn=ham 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 On 9/27/22 8:35 AM, Zhuo Chen wrote: > Since pci_aer_clear_nonfatal_status() is used only internally, move > its declaration to the PCI internal header file. Also, no one cares > about return value of pci_aer_clear_nonfatal_status(), so make it void. > > Signed-off-by: Zhuo Chen > --- Looks good to me. > drivers/pci/pci.h | 2 ++ > drivers/pci/pcie/aer.c | 7 ++----- > include/linux/aer.h | 5 ----- > 3 files changed, 4 insertions(+), 10 deletions(-) > > diff --git a/drivers/pci/pci.h b/drivers/pci/pci.h > index 785f31086313..a114175d08e4 100644 > --- a/drivers/pci/pci.h > +++ b/drivers/pci/pci.h > @@ -684,6 +684,7 @@ void pci_aer_init(struct pci_dev *dev); > void pci_aer_exit(struct pci_dev *dev); > extern const struct attribute_group aer_stats_attr_group; > void pci_aer_clear_fatal_status(struct pci_dev *dev); > +void pci_aer_clear_nonfatal_status(struct pci_dev *dev); > int pci_aer_clear_status(struct pci_dev *dev); > int pci_aer_raw_clear_status(struct pci_dev *dev); > #else > @@ -691,6 +692,7 @@ static inline void pci_no_aer(void) { } > static inline void pci_aer_init(struct pci_dev *d) { } > static inline void pci_aer_exit(struct pci_dev *d) { } > static inline void pci_aer_clear_fatal_status(struct pci_dev *dev) { } > +static inline void pci_aer_clear_nonfatal_status(struct pci_dev *dev) { } > static inline int pci_aer_clear_status(struct pci_dev *dev) { return -EINVAL; } > static inline int pci_aer_raw_clear_status(struct pci_dev *dev) { return -EINVAL; } > #endif > diff --git a/drivers/pci/pcie/aer.c b/drivers/pci/pcie/aer.c > index 4e637121be23..e2ebd108339d 100644 > --- a/drivers/pci/pcie/aer.c > +++ b/drivers/pci/pcie/aer.c > @@ -251,13 +251,13 @@ int pci_disable_pcie_error_reporting(struct pci_dev *dev) > } > EXPORT_SYMBOL_GPL(pci_disable_pcie_error_reporting); > > -int pci_aer_clear_nonfatal_status(struct pci_dev *dev) > +void pci_aer_clear_nonfatal_status(struct pci_dev *dev) > { > int aer = dev->aer_cap; > u32 status, sev; > > if (!pcie_aer_is_native(dev)) > - return -EIO; > + return; > > /* Clear status bits for ERR_NONFATAL errors only */ > pci_read_config_dword(dev, aer + PCI_ERR_UNCOR_STATUS, &status); > @@ -265,10 +265,7 @@ int pci_aer_clear_nonfatal_status(struct pci_dev *dev) > status &= ~sev; > if (status) > pci_write_config_dword(dev, aer + PCI_ERR_UNCOR_STATUS, status); > - > - return 0; > } > -EXPORT_SYMBOL_GPL(pci_aer_clear_nonfatal_status); > > void pci_aer_clear_fatal_status(struct pci_dev *dev) > { > diff --git a/include/linux/aer.h b/include/linux/aer.h > index 154690c278cb..f638ad955deb 100644 > --- a/include/linux/aer.h > +++ b/include/linux/aer.h > @@ -44,7 +44,6 @@ struct aer_capability_regs { > /* PCIe port driver needs this function to enable AER */ > int pci_enable_pcie_error_reporting(struct pci_dev *dev); > int pci_disable_pcie_error_reporting(struct pci_dev *dev); > -int pci_aer_clear_nonfatal_status(struct pci_dev *dev); > int pci_aer_clear_uncorrect_error_status(struct pci_dev *dev); > void pci_save_aer_state(struct pci_dev *dev); > void pci_restore_aer_state(struct pci_dev *dev); > @@ -57,10 +56,6 @@ static inline int pci_disable_pcie_error_reporting(struct pci_dev *dev) > { > return -EINVAL; > } > -static inline int pci_aer_clear_nonfatal_status(struct pci_dev *dev) > -{ > - return -EINVAL; > -} > static inline int pci_aer_clear_uncorrect_error_status(struct pci_dev *dev) > { > return -EINVAL; -- Sathyanarayanan Kuppuswamy Linux Kernel Developer