Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp1597536pxb; Thu, 4 Feb 2021 18:05:05 -0800 (PST) X-Google-Smtp-Source: ABdhPJwan9k8ytGkbGwfR7oZLr9OV5kWOynAH+PdMrSI4+X8CF/onAJD16dy9tXQnCQ070EsmrrQ X-Received: by 2002:a17:906:c08a:: with SMTP id f10mr1910404ejz.52.1612490705436; Thu, 04 Feb 2021 18:05:05 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1612490705; cv=none; d=google.com; s=arc-20160816; b=jLkVIbjj5q1nV+5CNByMiLxyqE3uh2z6eQtU+ZqgZy1w9aXD4WJC7MEhArmfOSrIhf +Fp9yWtHrgLhrUHxxwMZ9lXPAxordyhUQFCjh5xOFD1yteGSJMsdMaHH54TD2M1wi6lE uMLMX7abeZXQ+aIeyjQLPy9KQRGcdTPrCJ97gGxo28C357E56s9xF4XdAZIxVaA8QkzL YKE6ccsOFzh79GTAWBkLxuPkso4SxIBtR5Qlnzg7VWUI3fA40UcLeHdt+ApBdus5aE9I xd49H6yTg3aQE2uIn7idr1Qmk+AToQgmSvuImxA97cPg9oCQPudJooX5faU8JpGp1oP0 oL8A== 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 :mime-version:user-agent:date:message-id:from:cc:references:to :subject; bh=ZsbBLsEPAV4vowRZ7B+Soim8pIdRk3n2L34osDeSFes=; b=dG0Vm+M90PnRlKznySdTvlMXtGQIFTvATqa4u97C0w+BhXot21+DfKCDn3u4OgSSx9 P/qaht3bfN2/AOD6ju8KWWmIS1tDVZm0UTrlamoI7ebTq34t080dTsx08ncZ++mEphEN /pfmAG5XuatcSEayUcZU/+/HmkWj9j0UO4cM/t9RlWhOR7HaIzDn9GogyFCMuSxTExD2 6XLE2ZKDkguvCkJWp4YhN7JjD/VsqhpfWlzlD7PURYIDCaAVHnCA/1eSYA6xQqwDLRCE oL1S7t0LEnZ2g9w8XDebVbCmnpt10+hrCCwlGpQfRiuuAaGxei0r4Bp8/UAj69OYmjg/ lLmw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id q7si4358688edt.86.2021.02.04.18.04.41; Thu, 04 Feb 2021 18:05:05 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232651AbhBEBVt (ORCPT + 99 others); Thu, 4 Feb 2021 20:21:49 -0500 Received: from szxga05-in.huawei.com ([45.249.212.191]:12076 "EHLO szxga05-in.huawei.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232533AbhBEBVt (ORCPT ); Thu, 4 Feb 2021 20:21:49 -0500 Received: from DGGEMS414-HUB.china.huawei.com (unknown [172.30.72.59]) by szxga05-in.huawei.com (SkyGuard) with ESMTP id 4DWyHx2NfTzMT2x; Fri, 5 Feb 2021 09:19:25 +0800 (CST) Received: from [127.0.0.1] (10.40.192.162) by DGGEMS414-HUB.china.huawei.com (10.3.19.214) with Microsoft SMTP Server id 14.3.498.0; Fri, 5 Feb 2021 09:20:59 +0800 Subject: Re: [PATCH 1/1] PCI/AER: Change to use helper pcie_aer_is_native() in some places To: =?UTF-8?Q?Krzysztof_Wilczy=c5=84ski?= References: <1612420127-6447-1-git-send-email-tanxiaofei@huawei.com> CC: , , , , , , , From: tanxiaofei Message-ID: <064df5a3-3a55-544e-b9d0-314abade1ace@huawei.com> Date: Fri, 5 Feb 2021 09:20:59 +0800 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:45.0) Gecko/20100101 Thunderbird/45.7.1 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset="utf-8"; format=flowed Content-Transfer-Encoding: 8bit X-Originating-IP: [10.40.192.162] X-CFilter-Loop: Reflected Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Krzysztof, On 2021/2/5 5:50, Krzysztof Wilczyński wrote: > Hi Tan, > > This is very nice! Thank you for this. > > [...] >> if (dev->aer_cap && pci_aer_available() && >> - (pcie_ports_native || host->native_aer)) { >> + pcie_aer_is_native(dev)) { >> services |= PCIE_PORT_SERVICE_AER; > [...] > > A suggestion. You could improve this even further, for example: > > if (pci_aer_available() && pcie_aer_is_native(dev)) { > > This is because the pcie_aer_is_native() function performs the > dev->aer_cap check internally, so we could rely on it, and avoid > checking the same thing twice. > > What do you think? > Yes, it's better, i will send v2 patch including this.thanks. > Reviewed-by: Krzysztof Wilczyński > > Krzysztof > > . >