From patchwork Tue Jul 27 20:51:15 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alex Hung X-Patchwork-Id: 1510638 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=none (no SPF record) smtp.mailfrom=lists.ubuntu.com (client-ip=91.189.94.19; helo=huckleberry.canonical.com; envelope-from=fwts-devel-bounces@lists.ubuntu.com; receiver=) Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=canonical.com header.i=@canonical.com header.a=rsa-sha256 header.s=20210705 header.b=W5uiT6Nk; dkim-atps=neutral Received: from huckleberry.canonical.com (huckleberry.canonical.com [91.189.94.19]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4GZ88z4QXdz9sSs for ; Wed, 28 Jul 2021 06:51:30 +1000 (AEST) Received: from localhost ([127.0.0.1] helo=huckleberry.canonical.com) by huckleberry.canonical.com with esmtp (Exim 4.86_2) (envelope-from ) id 1m8U2t-00054J-7P; Tue, 27 Jul 2021 20:51:23 +0000 Received: from smtp-relay-canonical-0.internal ([10.131.114.83] helo=smtp-relay-canonical-0.canonical.com) by huckleberry.canonical.com with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.86_2) (envelope-from ) id 1m8U2r-000547-M1 for fwts-devel@lists.ubuntu.com; Tue, 27 Jul 2021 20:51:21 +0000 Received: from canonical.com (d104-157-108-141.abhsia.telus.net [104.157.108.141]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-256) server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by smtp-relay-canonical-0.canonical.com (Postfix) with ESMTPSA id 168973F231; Tue, 27 Jul 2021 20:51:20 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=canonical.com; s=20210705; t=1627419081; bh=yvWTKvXLDz2dV6dy51rfybrXAhYfyrfbKiQdHpklGCY=; h=From:To:Cc:Subject:Date:Message-Id:MIME-Version; b=W5uiT6NkgXVIyfhi5b7Ypeyw7qidojnofc6QGeXPgpNRoYT6wjD1ikiKKO1CPJJsJ tKcgrGkwDD5F6UDG/9TbHvw9dZlD0elDdyVJyLiZTTUvznYiSUb24xCyLMyQNpMnxs 0zlb5IC/iAFIZk+KbLJ5RNM8UccD60F/TVXFI2NcMr4Ws2iQpfih39tCfYnqiD/j1C Op/mutM2rOoSW/Q3ipyyFUvNxmFZtFve5Fgt3n4MWUqc3vLbBCvQ10unz5SzB5UeuK FclYZ9X4m5oJYJTcuBaT4MBQZo29xSrvGF/623EXTlEuw/iE/szx77o0Npz1x8AdP8 n6usDC+NElNPA== From: Alex Hung To: fwts-devel@lists.ubuntu.com Subject: [PATCH] acpi: dmar: add a warning when PCI device is not found Date: Tue, 27 Jul 2021 14:51:15 -0600 Message-Id: <20210727205115.325019-1-alex.hung@canonical.com> X-Mailer: git-send-email 2.32.0 MIME-Version: 1.0 X-BeenThere: fwts-devel@lists.ubuntu.com X-Mailman-Version: 2.1.20 Precedence: list List-Id: Firmware Test Suite Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: fwts-devel-bounces@lists.ubuntu.com Sender: "fwts-devel" Signed-off-by: Alex Hung Acked-by: Ivan Hu --- src/acpi/dmar/dmar.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/acpi/dmar/dmar.c b/src/acpi/dmar/dmar.c index af9ee277..0f652106 100644 --- a/src/acpi/dmar/dmar.c +++ b/src/acpi/dmar/dmar.c @@ -166,8 +166,10 @@ static int acpi_parse_one_dev_scope(fwts_framework *fw, goto error; dev_type = read_pci_device_secondary_bus_number(seg, bus, path->dev, path->fn, &sec_bus); - if (dev_type < 0) /* no such device */ + if (dev_type < 0) { /* no such device */ + fwts_warning(fw, "PCI device is not found."); goto error; + } path++; count--; bus = sec_bus;