Received: by 2002:ac0:a5a7:0:0:0:0:0 with SMTP id m36-v6csp905921imm; Wed, 18 Jul 2018 12:49:59 -0700 (PDT) X-Google-Smtp-Source: AAOMgpcBeS6qVqdKx+k7aKXpRsly2Ornf0UIQcsg6ANZL3X8CQdw/NXuwzbuIa5qzxQL2QRFCVc/ X-Received: by 2002:a63:bf08:: with SMTP id v8-v6mr6902053pgf.3.1531943399007; Wed, 18 Jul 2018 12:49:59 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1531943398; cv=none; d=google.com; s=arc-20160816; b=HYga/94U/cTDHXVrnNOH/UCocVZespPiOi5v/OACGrviibTGIS+Eys3mqoSM0o2vJa JjJVao1CRtLz3og7YMbqLnR1cIfVQ9chaUBSj8GniyDmlX6qH8KeIX1WL7CYC5BfR5GR Xa9IJr9KjpIc4KuS84t7rOGvlozgz6NG6WLgDWaMgqCMjX9455B06wrnnF7ggfforb3r BOrz4O1YSFVMpTUdMM60SoRS0DcN8NRme6ddYoQk+0rqz3mm6B9q0vRZvrfirnksODp5 PTJ+jolp3MJT03KvwsYvfg0s7/xSgJWSFlPDxL4F5TG8d9ljQEjqc8LLNTohfOFm3537 Pkuw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:cc:to:from :subject:dkim-signature:arc-authentication-results; bh=/r6H+HEjaT8Ao+H3vY2qb17ls+pKhVI2T0NOPyxLSlI=; b=HLA9h7mugizwZUtG8odB40UdQ56kIKsnGQAuxD44CGnY3LkIwee7Ua9aHidbbqXZrr /hdaFtFtThFFn1oG8sCaQbhuH5y16uG7Kw7pU27Qr/NiwNHACdCAJP/8LkaywDMaAWgz J1s8Nei4xl8JMbsY9HcJxyGP7vO5VkSFpeCPHmWbX7d/s3KORLXezM4EaJ14/n2E0Q5p 5RyLuriQS+pruyUw+UQFm9QaGL5ERGJCZns8fJRijWjLTm3rwVdwHsrpF9IphpQgySKk dMV9OgoBrX/qL601zbOCzi7ckOWMkeUyVTzRoALuitgCdCROrAOH5L3MDoex6oBqwSC+ NpYg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=OIh8FsfJ; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 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. [209.132.180.67]) by mx.google.com with ESMTP id w71-v6si4123933pgd.667.2018.07.18.12.49.21; Wed, 18 Jul 2018 12:49:58 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=OIh8FsfJ; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 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 S1730828AbeGRUYJ (ORCPT + 99 others); Wed, 18 Jul 2018 16:24:09 -0400 Received: from mail.kernel.org ([198.145.29.99]:33860 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729667AbeGRUYI (ORCPT ); Wed, 18 Jul 2018 16:24:08 -0400 Received: from localhost (unknown [69.71.4.100]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id CE9D12084E; Wed, 18 Jul 2018 19:44:45 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1531943086; bh=YUo7/kHOGtfB3qn/rWY+Y/8GchpMynmdIqbaHOGlDmg=; h=Subject:From:To:Cc:Date:In-Reply-To:References:From; b=OIh8FsfJapVBZV5XTcXKYX+Ty5sG/r+FwvhdJIyRPohXGdFVHVf04ygxIM/sxbZeB Ea8Wyl0I3u4GrTBD50lkWf2zg46w6qmHb92FXo0j/9R1wg8nIMFGS0OlVUy6XQphcw s7X4oiF3FcNAXYy+cPcGPsLbyIhTEN5SubOEJC1M= Subject: [PATCH v3 4/7] PCI/AER: Remove ERR_FATAL code from ERR_NONFATAL path From: Bjorn Helgaas To: Oza Pawandeep Cc: Philippe Ombredanne , Thomas Gleixner , Greg Kroah-Hartman , Kate Stewart , Dongdong Liu , Keith Busch , Wei Zhang , Sinan Kaya , Timur Tabi , linux-pci@vger.kernel.org, linux-kernel@vger.kernel.org Date: Wed, 18 Jul 2018 14:44:44 -0500 Message-ID: <153194308474.191586.9278078670184747650.stgit@bhelgaas-glaptop.roam.corp.google.com> In-Reply-To: <153194245964.191586.14782253252654776509.stgit@bhelgaas-glaptop.roam.corp.google.com> References: <153194245964.191586.14782253252654776509.stgit@bhelgaas-glaptop.roam.corp.google.com> User-Agent: StGit/0.18 MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Oza Pawandeep broadcast_error_message() is only used for ERR_NONFATAL events, when the state is always pci_channel_io_normal, so remove the unused alternate path. Signed-off-by: Oza Pawandeep [bhelgaas: changelog] Signed-off-by: Bjorn Helgaas --- drivers/pci/pcie/err.c | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) diff --git a/drivers/pci/pcie/err.c b/drivers/pci/pcie/err.c index 0539518f9861..638eda5c1d79 100644 --- a/drivers/pci/pcie/err.c +++ b/drivers/pci/pcie/err.c @@ -259,15 +259,10 @@ static pci_ers_result_t broadcast_error_message(struct pci_dev *dev, /* * If the error is reported by an end point, we think this * error is related to the upstream link of the end point. + * The error is non fatal so the bus is ok; just invoke + * the callback for the function that logged the error. */ - if (state == pci_channel_io_normal) - /* - * the error is non fatal so the bus is ok, just invoke - * the callback for the function that logged the error. - */ - cb(dev, &result_data); - else - pci_walk_bus(dev->bus, cb, &result_data); + cb(dev, &result_data); } return result_data.result;