Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp1467146pxb; Thu, 4 Feb 2021 13:52:45 -0800 (PST) X-Google-Smtp-Source: ABdhPJyLAbxnXql/gcvoPpKwtETmAO+pDputUWZJEygGSi7UgErfj1uiVU7IPy2Wrfqf9bj3EFM7 X-Received: by 2002:a17:906:708f:: with SMTP id b15mr1081355ejk.267.1612475565302; Thu, 04 Feb 2021 13:52:45 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1612475565; cv=none; d=google.com; s=arc-20160816; b=IGFOyUNw9qRVWQxyqxYASwY5FfV8evV0Fl35qcSEHF7O3oZBUV3edsl78VwseuX1u1 bsF7xNdG/qRZbrhNn8SgDbg4BAmKoJws2K4E1W0kTH+HHt4t3PHJN013O/fdTDwfHzhc 26qBBBOcmNcFyS33Ipn8dyGY5dWT4FIwcLWkIW32XUPhPyLycQDrq1G5662BPilPRKH3 ulx4QkGfszmnOYl9Q0ilVprCBWBwzCRumGehb+ziJqVno/zzJho9sHgdqdpzB74rLoIw fy7N8rcixq0us1Zf06fc8Il8rKtXFuSQuzrSoakIKrwcPDAet4t0nyQAn9xbSLknh2oR qzmw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-transfer-encoding :content-disposition:mime-version:references:message-id:subject:cc :to:from:date; bh=teRE6eGwXoeBL8LsCaE2nFvmjdHWwf0/CDf55awZ0Wk=; b=j0HpDx2HqMBvGSVwPzcmPORWJcoPh4efCLIcYpSHFRFFijiFRlgkHBpZ2H2++xJD25 BvdDj+AnRzqztoHoUVCSFhrkvqNEgWDbCZr34zOdoyL4vWyyqIqU+UJplv913haX847V ADB9xTK+I6BhrVeOOw4K7O7BezXSrIPCIxag/wgjzqs2rxGW5l9Ocy9RKesp4CP2K0FO 4fF2egEq4mG6ttx5NNDt0I0Hxuv4JdLA/QDs/0Vo4Vrpys+Nnar0p13F4xj/pHjX/Qfy VOo0VZ2kr8Jfw/279uoNXbYFmvZeNKMjmLTD5qAoOII+EgQf0pwCMOwJhxsxFygW/AuW F0FQ== 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 f16si3829789ejw.361.2021.02.04.13.52.21; Thu, 04 Feb 2021 13:52:45 -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 S230216AbhBDVvd (ORCPT + 99 others); Thu, 4 Feb 2021 16:51:33 -0500 Received: from mail-wr1-f45.google.com ([209.85.221.45]:46206 "EHLO mail-wr1-f45.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230063AbhBDVuo (ORCPT ); Thu, 4 Feb 2021 16:50:44 -0500 Received: by mail-wr1-f45.google.com with SMTP id q7so5267344wre.13; Thu, 04 Feb 2021 13:50:28 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:content-transfer-encoding :in-reply-to; bh=teRE6eGwXoeBL8LsCaE2nFvmjdHWwf0/CDf55awZ0Wk=; b=kAXGAmHpq3aQFeETq+l+4tXLCgr/EqqNstYCKJRnUqPRS+ST6hdK7+A9nPhbdk06S+ BqpXv10lIFfhhLbMrhagy8mEW6NVvf6MdgWXrBFKucwunVL1dxQV4KmEo1KzhdGoxoKF if+LvcUiy+/ISRYaAV40+wmREHzo8jd4DREIcggH1EAc0KbWadv9vdZ2O3Dbq+UBiOVp TgU2i+GmixonMhdA4LwVpcJM+yKTDY5ADZ1zScYf5gq+/8o1gKu3w9jZrOcRx1++eELo U7fDsqMvFgaKFOtmU/qCXoc1zHEutDbJFcvY5aSQz0dgsNg6LcknGkgYexSiQ4HZJr/x N/1Q== X-Gm-Message-State: AOAM532ZeMMzFj18EuZ42BrY5zPVHz+4r51wrSqzYBVWnsLRGlub9VVH OCcCOPCHk99lpuAil0In/0U= X-Received: by 2002:a5d:4206:: with SMTP id n6mr1430877wrq.213.1612475402735; Thu, 04 Feb 2021 13:50:02 -0800 (PST) Received: from rocinante ([95.155.85.46]) by smtp.gmail.com with ESMTPSA id e16sm9607844wrp.24.2021.02.04.13.50.01 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 04 Feb 2021 13:50:02 -0800 (PST) Date: Thu, 4 Feb 2021 22:50:00 +0100 From: Krzysztof =?utf-8?Q?Wilczy=C5=84ski?= To: Xiaofei Tan Cc: helgaas@kernel.org, sathyanarayanan.kuppuswamy@linux.intel.com, sean.v.kelley@intel.com, Jonathan.Cameron@huawei.com, refactormyself@gmail.com, linux-pci@vger.kernel.org, linux-kernel@vger.kernel.org, linuxarm@huawei.com Subject: Re: [PATCH 1/1] PCI/AER: Change to use helper pcie_aer_is_native() in some places Message-ID: References: <1612420127-6447-1-git-send-email-tanxiaofei@huawei.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <1612420127-6447-1-git-send-email-tanxiaofei@huawei.com> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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? Reviewed-by: Krzysztof WilczyƄski Krzysztof