From owner-svn-src-all@FreeBSD.ORG Mon Feb 16 22:18:44 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id A3A82920; Mon, 16 Feb 2015 22:18:44 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 8E0DFA93; Mon, 16 Feb 2015 22:18:44 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t1GMIise081236; Mon, 16 Feb 2015 22:18:44 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t1GMIiim081235; Mon, 16 Feb 2015 22:18:44 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201502162218.t1GMIiim081235@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Mon, 16 Feb 2015 22:18:44 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r278871 - head/sys/dev/acpica X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 16 Feb 2015 22:18:44 -0000 Author: kib Date: Mon Feb 16 22:18:43 2015 New Revision: 278871 URL: https://svnweb.freebsd.org/changeset/base/278871 Log: Array cannot be NULL, remove always true comparision. ACPI spec identifies the tested condition for _PRT as "BYTE value of 0", so the remaining part of the conditionals is sufficient. Sponsored by: The FreeBSD Foundation MFC after: 1 week Modified: head/sys/dev/acpica/acpi_pcib.c Modified: head/sys/dev/acpica/acpi_pcib.c ============================================================================== --- head/sys/dev/acpica/acpi_pcib.c Mon Feb 16 22:13:03 2015 (r278870) +++ head/sys/dev/acpica/acpi_pcib.c Mon Feb 16 22:18:43 2015 (r278871) @@ -95,7 +95,7 @@ prt_attach_devices(ACPI_PCI_ROUTING_TABL int error; /* We only care about entries that reference a link device. */ - if (entry->Source == NULL || entry->Source[0] == '\0') + if (entry->Source[0] == '\0') return; /* @@ -222,7 +222,7 @@ acpi_pcib_route_interrupt(device_t pcib, if (bootverbose) { device_printf(pcib, "matched entry for %d.%d.INT%c", pci_get_bus(dev), pci_get_slot(dev), 'A' + pin); - if (prt->Source != NULL && prt->Source[0] != '\0') + if (prt->Source[0] != '\0') printf(" (src %s:%u)", prt->Source, prt->SourceIndex); printf("\n"); } @@ -234,8 +234,7 @@ acpi_pcib_route_interrupt(device_t pcib, * XXX: If the source index is non-zero, ignore the source device and * assume that this is a hard-wired entry. */ - if (prt->Source == NULL || prt->Source[0] == '\0' || - prt->SourceIndex != 0) { + if (prt->Source[0] == '\0' || prt->SourceIndex != 0) { if (bootverbose) device_printf(pcib, "slot %d INT%c hardwired to IRQ %d\n", pci_get_slot(dev), 'A' + pin, prt->SourceIndex);