Received: by 2002:a05:6a10:5bc5:0:0:0:0 with SMTP id os5csp151950pxb; Wed, 20 Oct 2021 18:44:53 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxTkTv0PLySI4babZKjlKHcmMOiQPLV7k3BtfYNKoYdXN4hVjNQ79ewYFdgp4MKkRvjVR2D X-Received: by 2002:a17:907:75c1:: with SMTP id jl1mr3650697ejc.288.1634780692855; Wed, 20 Oct 2021 18:44:52 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1634780692; cv=none; d=google.com; s=arc-20160816; b=FqmuTamXLXy/uolV6q+NSDV7ZTqiXU+SHBopRA7rsJELbJshVzpYRWsVuzFCY+X91+ J2yWjtvrp219gnVeXR+7kq6xY2r/R0613pVrpzxcTXTp+ncNAeGeG3tt7wtdLm8Ccjy7 2iyC1zto5lFWtAmD14cWqm56euKeyYHjqdPl1Mtj4DvgUQc/bAHJR+fmsAnf5LFNpww+ f3omY6kUUgudmhS0a12zSeTwHlM7WoOebJ76uZthatNZbR4vbe6RypdkgbT8VMjQfqre 1nJzcSIln6+X6nwjJBDuJizuNg2s8lCdHKsanBXB2rJ9qEcMzTbUsp7QuQygHNs+u4hz WQ4w== 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-disposition:mime-version :message-id:subject:cc:to:from:date:dkim-signature; bh=3x5AjZVB5guTf2V8x14HLJVoe3SeLVo1gg7MTiSJ2zw=; b=LnVzekJEL8dmdnlLuMr1mIvU20u+vIrDMSZ+qMgFBz1haP8O9mjefKzzrIMsQuEVSE eMXrq0J8iRYa74/jPGlnP+44KLtTypyuc/WIaWTI3burapEmt93CuOKx/hbRgsw92gTI 5bji76QXs0Fc+ISBW71kEuo/P9Ch8Z/uwLB8JAV+WrRM8x5JYBA2kttb6oYHicahnMDV kJzrUDIOYu9WyUu7S4Fr9P0SQWwZrViD+1UVAwjFor5Letw7Vf8lMUcT9Nd+YDQ6Ei3D /RW6YvcT+LPZpAjWpQePA8wh9sOh7sQN621Nzd4biVJsnRlArqzE4gWw4TOCAL4gtjdI LUmQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=Gwao20C+; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id hb35si5962358ejc.559.2021.10.20.18.44.28; Wed, 20 Oct 2021 18:44:52 -0700 (PDT) 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; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=Gwao20C+; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230366AbhJUBmr (ORCPT + 99 others); Wed, 20 Oct 2021 21:42:47 -0400 Received: from mail.kernel.org ([198.145.29.99]:58888 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229771AbhJUBmp (ORCPT ); Wed, 20 Oct 2021 21:42:45 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 8A5E2610A3; Thu, 21 Oct 2021 01:40:30 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1634780430; bh=EUralENv330ewn9XRHZ1BpnRh5NsqZGkLbfXk4z3Pp4=; h=Date:From:To:Cc:Subject:In-Reply-To:From; b=Gwao20C+ItQvfrCBBPmm3C7nTwca5rnymIgfSohDSW6Pc4PPCRFrYTr436hrKPK1z aMhokgwHFzO+bAKE/Ts92ViYsQRHRUMq8twvA1r0ojQyXEf0FtjLlLsHUVFsL4k9PA WT/vW7LD6FQEI8OGTSWU/FqPEQFUd0hKkAx2u1zLU7/4Y07jgIFzZScMfWgwZp+a/F sjLQ5xwSZIrzPzbryfd0scaNOoGG1hCwjDxSZCPbCM+pFhsRILPQEcdi3Brop4gelq d4Msy2g3KmodJnhCtUHDoJlkw3SlMfICN4vjz+sXoXtHkOCi0P8whDMQv5M+qDJ/NT 4C8ff3ITwinOw== Date: Wed, 20 Oct 2021 20:40:29 -0500 From: Bjorn Helgaas To: Naveen Naidu Cc: bhelgaas@google.com, ruscur@russell.cc, oohall@gmail.com, linux-pci@vger.kernel.org, linux-kernel@vger.kernel.org, linuxppc-dev@lists.ozlabs.org, linux-kernel-mentees@lists.linuxfoundation.org Subject: Re: [PATCH v4 4/8] PCI/DPC: Use pci_aer_clear_status() in dpc_process_error() Message-ID: <20211021014029.GA2657684@bhelgaas> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Oct 05, 2021 at 10:48:11PM +0530, Naveen Naidu wrote: > dpc_process_error() clears both AER fatal and non fatal status > registers. Instead of clearing each status registers via a different > function call use pci_aer_clear_status(). > > This helps clean up the code a bit. > > Signed-off-by: Naveen Naidu > --- > drivers/pci/pcie/dpc.c | 3 +-- > 1 file changed, 1 insertion(+), 2 deletions(-) > > diff --git a/drivers/pci/pcie/dpc.c b/drivers/pci/pcie/dpc.c > index df3f3a10f8bc..faf4a1e77fab 100644 > --- a/drivers/pci/pcie/dpc.c > +++ b/drivers/pci/pcie/dpc.c > @@ -288,8 +288,7 @@ void dpc_process_error(struct pci_dev *pdev) > dpc_get_aer_uncorrect_severity(pdev, &info) && > aer_get_device_error_info(pdev, &info)) { > aer_print_error(pdev, &info); > - pci_aer_clear_nonfatal_status(pdev); > - pci_aer_clear_fatal_status(pdev); > + pci_aer_clear_status(pdev); The commit log suggests that this is a simple cleanup that doesn't change any behavior, but that's not quite true: - The new code would clear PCI_ERR_ROOT_STATUS, but the old code does not. - The old code masks the status bits with the severity bits before clearing, but the new code does not. The commit log needs to show why these changes are what we want. > } > } > > -- > 2.25.1 > > _______________________________________________ > Linux-kernel-mentees mailing list > Linux-kernel-mentees@lists.linuxfoundation.org > https://lists.linuxfoundation.org/mailman/listinfo/linux-kernel-mentees