Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 31 Mar 2014 19:37:39 +0000 (UTC)
From:      Warner Losh <imp@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r263975 - head/sys/dev/acpica
Message-ID:  <201403311937.s2VJbdBZ049120@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: imp
Date: Mon Mar 31 19:37:39 2014
New Revision: 263975
URL: http://svnweb.freebsd.org/changeset/base/263975

Log:
  Turns out name was used here when ACPI_DEBUG was defined, so refine my
  previous patch.

Modified:
  head/sys/dev/acpica/acpi_resource.c

Modified: head/sys/dev/acpica/acpi_resource.c
==============================================================================
--- head/sys/dev/acpica/acpi_resource.c	Mon Mar 31 17:04:04 2014	(r263974)
+++ head/sys/dev/acpica/acpi_resource.c	Mon Mar 31 19:37:39 2014	(r263975)
@@ -183,6 +183,9 @@ acpi_parse_resource(ACPI_RESOURCE *res, 
     struct acpi_parse_resource_set *set;
     struct acpi_resource_context *arc;
     UINT64 min, max, length, gran;
+#ifdef ACPI_DEBUG
+    const char *name;
+#endif
     device_t dev;
 
     arc = context;
@@ -299,18 +302,27 @@ acpi_parse_resource(ACPI_RESOURCE *res, 
 	    min = res->Data.Address16.Minimum;
 	    max = res->Data.Address16.Maximum;
 	    length = res->Data.Address16.AddressLength;
+#ifdef ACPI_DEBUG
+	    name = "Address16";
+#endif
 	    break;
 	case ACPI_RESOURCE_TYPE_ADDRESS32:
 	    gran = res->Data.Address32.Granularity;
 	    min = res->Data.Address32.Minimum;
 	    max = res->Data.Address32.Maximum;
 	    length = res->Data.Address32.AddressLength;
+#ifdef ACPI_DEBUG
+	    name = "Address32";
+#endif
 	    break;
 	case ACPI_RESOURCE_TYPE_ADDRESS64:
 	    gran = res->Data.Address64.Granularity;
 	    min = res->Data.Address64.Minimum;
 	    max = res->Data.Address64.Maximum;
 	    length = res->Data.Address64.AddressLength;
+#ifdef ACPI_DEBUG
+	    name = "Address64";
+#endif
 	    break;
 	default:
 	    KASSERT(res->Type == ACPI_RESOURCE_TYPE_EXTENDED_ADDRESS64,
@@ -319,6 +331,9 @@ acpi_parse_resource(ACPI_RESOURCE *res, 
 	    min = res->Data.ExtAddress64.Minimum;
 	    max = res->Data.ExtAddress64.Maximum;
 	    length = res->Data.ExtAddress64.AddressLength;
+#ifdef ACPI_DEBUG
+	    name = "ExtAddress64";
+#endif
 	    break;
 	}
 	if (length <= 0)



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201403311937.s2VJbdBZ049120>