Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/dev/acpi Add a missing case value in a switch statement.



details:   https://anonhg.NetBSD.org/src/rev/7936bfe74657
branches:  trunk
changeset: 764479:7936bfe74657
user:      jruoho <jruoho%NetBSD.org@localhost>
date:      Mon Apr 25 05:30:21 2011 +0000

description:
Add a missing case value in a switch statement.

diffstat:

 sys/dev/acpi/acpi_cpu.c |  25 +++++++++++++------------
 1 files changed, 13 insertions(+), 12 deletions(-)

diffs (51 lines):

diff -r b3fcd125fe2f -r 7936bfe74657 sys/dev/acpi/acpi_cpu.c
--- a/sys/dev/acpi/acpi_cpu.c   Mon Apr 25 04:54:53 2011 +0000
+++ b/sys/dev/acpi/acpi_cpu.c   Mon Apr 25 05:30:21 2011 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: acpi_cpu.c,v 1.39 2011/03/24 05:10:06 jruoho Exp $ */
+/* $NetBSD: acpi_cpu.c,v 1.40 2011/04/25 05:30:21 jruoho Exp $ */
 
 /*-
  * Copyright (c) 2010, 2011 Jukka Ruohonen <jruohonen%iki.fi@localhost>
@@ -27,7 +27,7 @@
  * SUCH DAMAGE.
  */
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: acpi_cpu.c,v 1.39 2011/03/24 05:10:06 jruoho Exp $");
+__KERNEL_RCSID(0, "$NetBSD: acpi_cpu.c,v 1.40 2011/04/25 05:30:21 jruoho Exp $");
 
 #include <sys/param.h>
 #include <sys/cpu.h>
@@ -903,21 +903,22 @@
 acpicpu_debug_print_method(uint8_t val)
 {
 
-       switch (val) {
+       if (val == ACPICPU_C_STATE_FFH)
+               return "FFH";
 
-       case ACPICPU_C_STATE_HALT:
+       if (val == ACPICPU_C_STATE_HALT)
                return "HLT";
 
-       case ACPICPU_C_STATE_FFH:
-       case ACPI_ADR_SPACE_FIXED_HARDWARE:
+       if (val == ACPICPU_C_STATE_SYSIO)
+               return "I/O";
+
+       if (val == ACPI_ADR_SPACE_SYSTEM_IO)
+               return "I/O";
+
+       if (val == ACPI_ADR_SPACE_FIXED_HARDWARE)
                return "FFH";
 
-       case ACPICPU_C_STATE_SYSIO:             /* ACPI_ADR_SPACE_SYSTEM_IO */
-               return "I/O";
-
-       default:
-               return "???";
-       }
+       return "???";
 }
 
 static const char *



Home | Main Index | Thread Index | Old Index