Source-Changes-HG archive

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

[src/trunk]: src/sys/dev/acpi Instead of packing structures that do not need ...



details:   https://anonhg.NetBSD.org/src/rev/1f4f50286bba
branches:  trunk
changeset: 757075:1f4f50286bba
user:      jruoho <jruoho%NetBSD.org@localhost>
date:      Fri Aug 13 19:48:25 2010 +0000

description:
Instead of packing structures that do not need to be __packed, remove two
CTASSERT(9) macros.  Fixes build failure on AMD64 noted by cegger@.

diffstat:

 sys/dev/acpi/acpi_cpu_pstate.c |  7 ++-----
 sys/dev/acpi/acpi_cpu_tstate.c |  7 ++-----
 2 files changed, 4 insertions(+), 10 deletions(-)

diffs (56 lines):

diff -r 9f3d7cefcecb -r 1f4f50286bba sys/dev/acpi/acpi_cpu_pstate.c
--- a/sys/dev/acpi/acpi_cpu_pstate.c    Fri Aug 13 19:28:26 2010 +0000
+++ b/sys/dev/acpi/acpi_cpu_pstate.c    Fri Aug 13 19:48:25 2010 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: acpi_cpu_pstate.c,v 1.16 2010/08/13 18:44:24 jruoho Exp $ */
+/* $NetBSD: acpi_cpu_pstate.c,v 1.17 2010/08/13 19:48:25 jruoho Exp $ */
 
 /*-
  * Copyright (c) 2010 Jukka Ruohonen <jruohonen%iki.fi@localhost>
@@ -27,7 +27,7 @@
  * SUCH DAMAGE.
  */
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: acpi_cpu_pstate.c,v 1.16 2010/08/13 18:44:24 jruoho Exp $");
+__KERNEL_RCSID(0, "$NetBSD: acpi_cpu_pstate.c,v 1.17 2010/08/13 19:48:25 jruoho Exp $");
 
 #include <sys/param.h>
 #include <sys/evcnt.h>
@@ -363,9 +363,6 @@
                val[i] = elm[i].Integer.Value;
        }
 
-       CTASSERT(sizeof(val) == sizeof(struct acpicpu_pstate) -
-                offsetof(struct acpicpu_pstate, ps_freq));
-
        p = &ps->ps_freq;
 
        for (i = 0; i < 6; i++, p++)
diff -r 9f3d7cefcecb -r 1f4f50286bba sys/dev/acpi/acpi_cpu_tstate.c
--- a/sys/dev/acpi/acpi_cpu_tstate.c    Fri Aug 13 19:28:26 2010 +0000
+++ b/sys/dev/acpi/acpi_cpu_tstate.c    Fri Aug 13 19:48:25 2010 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: acpi_cpu_tstate.c,v 1.2 2010/08/13 18:44:24 jruoho Exp $ */
+/* $NetBSD: acpi_cpu_tstate.c,v 1.3 2010/08/13 19:48:25 jruoho Exp $ */
 
 /*-
  * Copyright (c) 2010 Jukka Ruohonen <jruohonen%iki.fi@localhost>
@@ -27,7 +27,7 @@
  * SUCH DAMAGE.
  */
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: acpi_cpu_tstate.c,v 1.2 2010/08/13 18:44:24 jruoho Exp $");
+__KERNEL_RCSID(0, "$NetBSD: acpi_cpu_tstate.c,v 1.3 2010/08/13 19:48:25 jruoho Exp $");
 
 #include <sys/param.h>
 #include <sys/kmem.h>
@@ -389,9 +389,6 @@
                val[i] = elm[i].Integer.Value;
        }
 
-       CTASSERT(sizeof(val) == sizeof(struct acpicpu_tstate) -
-                offsetof(struct acpicpu_tstate, ts_percent));
-
        p = &ts->ts_percent;
 
        for (i = 0; i < 5; i++, p++)



Home | Main Index | Thread Index | Old Index