Received: by 2002:a05:6a10:d5a5:0:0:0:0 with SMTP id gn37csp3824101pxb; Mon, 4 Oct 2021 10:21:52 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyWbzk3LX79gT9Hctg0VNd997p7Hn662Ash4wfeSCqBz5Q2CaVxGup5vC1Hx8JsC2XNXkCX X-Received: by 2002:a05:6402:16d9:: with SMTP id r25mr19262820edx.80.1633368112193; Mon, 04 Oct 2021 10:21:52 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1633368112; cv=none; d=google.com; s=arc-20160816; b=wEdj1RruUrkGdMt0LDkJISEWfB9pbe6Y1c4a9TmB2WVo4ZIyvK/nc6XuxU8W5IUTVL Qb/Dh3407taw/h5ClTf/uKs+ECWaB+9kFohSzMSBnC5HM8KCGXR0fu2sfrFRQBHYf5Ra bFg3nz2jwUKwMQwSFSElnmJYmagTGv4x9TzErEMCAmBIufgQdu1q5oPc23XYPx2HzK8i bjoF1NN6dDKGVgeWA0NrXTF4/mnjO1NR7zNmctvIb1suReVin4Ukhmt2YlOmsfvMsxnB JEFLFbL1KjcWOOosd+9l9I5cHAHo9FAvqyUXkTCS7q6/Y0LYZ3F+1ocGl2qr/UrrYOlE u0bA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=WgoZ9+KpQrZR7tDkQXfhNUVljLBFuOfZzG3U49+7PlA=; b=dmXICnp9bPwi3jurs1DebRwXEmiBGEhzBLXf74S63QuwvEkc/fHi9TY8mWUM+v/kuk FZwgFp2lZuA6TIgyHHjFGWjBvrkqnXLobr0xzFGDojH/lt2zjolg2BSHTf/TPJLz24ot 4CsFC5BqhYmKWO7scVJh2VhkGTzOwg3cwL/9e9cir9lotorlUBip2Bfix5boSgMSJwKF qjMXaHzL2K2RmS+DFn48wzjbnJ/yhz58/3sYiBj/5Q3EOAEE+vlL1IlQBYD0o2tNLtKy jlttVuQDMpgXoPAhHVXnGDG8K8fo9KuOH4eP3RWdpHFm5vTzS60Le5S1krUvALj8MiGR RWNA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=WJdx7P1T; 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=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id y8si23967684eda.141.2021.10.04.10.21.27; Mon, 04 Oct 2021 10:21: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=@gmail.com header.s=20210112 header.b=WJdx7P1T; 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=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234426AbhJDOee (ORCPT + 99 others); Mon, 4 Oct 2021 10:34:34 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49974 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234383AbhJDOeb (ORCPT ); Mon, 4 Oct 2021 10:34:31 -0400 Received: from mail-pl1-x62e.google.com (mail-pl1-x62e.google.com [IPv6:2607:f8b0:4864:20::62e]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 6E2A7C061745; Mon, 4 Oct 2021 07:32:42 -0700 (PDT) Received: by mail-pl1-x62e.google.com with SMTP id j4so17495plx.4; Mon, 04 Oct 2021 07:32:42 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=WgoZ9+KpQrZR7tDkQXfhNUVljLBFuOfZzG3U49+7PlA=; b=WJdx7P1TcAyVmEBiXMfx3i9JFf4eNjyW5Vq4oC9/fr/nJcEBpUnxCpI18WECXbYHf/ KB0FXtM9rD6QyJDHR1zVnlxE6P4XVj8uhGsKSNaP+QdsP3oGBF7fsZcQGjOtCIGFAuZl 8IyyhVKmRUEZzn8r6VE20PgzYSuV7j4ULaVauXMsqj3kjQetN3trtemqs1QXNMkPh7Ck rQEK80gn8TSK+com0w/V2PsVKRY3D5UyJNqo6SPhnAUSfeAhEDsOTWKWQ2ym4UnUGw53 RLjTjWvlr9RUBdPDUiSj4Tqn6XWMh+eALMls0QIVsiNPuUn6GEDyb4kQ/aYbEJDb0fc5 ORuw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=WgoZ9+KpQrZR7tDkQXfhNUVljLBFuOfZzG3U49+7PlA=; b=vH/ZyQsvtir3MgoDyrMwcOYReg2/ik6ewdvcfasnDRYJgV28EKniW8RWSwnAyb0Mt5 OHzxATAVjsuf1eIwDqHt8G0xhpoZ8QBJkoDxujHB3CGRTVuD1u7LVys0VauZHUulmBwD U7ZdAGsOSNbOgb00WkC/zJgWjHrZgNNqY2pakH8N7GG9VcsP9tLnRsEn+tAf3MdlmJ9v knU8l/T92sr0ULj6jFzWW8KQsnJrQdMUG+J+Z+EvcA9UgGZqbxoisd6ZJqQCH6WIE0RI k0LsJ2VeHhPWNBdLkggkSTWscRWQdftrquUDyfcodU6OobpIwNMxJ7AG5XeSG84rHlqF 2l9g== X-Gm-Message-State: AOAM531WXGq5gLY3TDHaYH5hMBsXXTn0lo9lquObR2MH3TxvNkt30vZx tzvKabiDbTlx9anaD73qXzk= X-Received: by 2002:a17:90a:1db:: with SMTP id 27mr37619533pjd.106.1633357961959; Mon, 04 Oct 2021 07:32:41 -0700 (PDT) Received: from localhost.localdomain ([2406:7400:63:e8f0:c2a7:3579:5fe8:31d9]) by smtp.gmail.com with ESMTPSA id q3sm14489146pgf.18.2021.10.04.07.32.38 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 04 Oct 2021 07:32:41 -0700 (PDT) From: Naveen Naidu To: bhelgaas@google.com, ruscur@russell.cc, oohall@gmail.com Cc: Naveen Naidu , linux-kernel-mentees@lists.linuxfoundation.org, skhan@linuxfoundation.org, linux-kernel@vger.kernel.org, linux-pci@vger.kernel.org, linuxppc-dev@lists.ozlabs.org Subject: [PATCH v3 4/8] PCI/DPC: Use pci_aer_clear_status() in dpc_process_error() Date: Mon, 4 Oct 2021 20:00:00 +0530 Message-Id: <71cec6aef2535b48911bd98bd010012643eb0bd0.1633357368.git.naveennaidu479@gmail.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: References: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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); } } -- 2.25.1