diff options
Diffstat (limited to 'sys')
-rw-r--r-- | sys/arch/amd64/amd64/est.c | 8 | ||||
-rw-r--r-- | sys/arch/i386/i386/est.c | 8 |
2 files changed, 8 insertions, 8 deletions
diff --git a/sys/arch/amd64/amd64/est.c b/sys/arch/amd64/amd64/est.c index 0bf7f364a4c..7d0a0172c0f 100644 --- a/sys/arch/amd64/amd64/est.c +++ b/sys/arch/amd64/amd64/est.c @@ -1,4 +1,4 @@ -/* $OpenBSD: est.c,v 1.17 2009/12/01 18:59:13 jsg Exp $ */ +/* $OpenBSD: est.c,v 1.18 2010/03/28 03:09:50 marco Exp $ */ /* * Copyright (c) 2003 Michael Eriksson. * All rights reserved. @@ -265,7 +265,7 @@ void est_acpi_pss_changed(struct acpicpu_pss *pss, int npss) { struct fqlist *acpilist; - int needtran = 1, nstates, i; + int needtran = 1, i; u_int64_t msr; u_int16_t cur; @@ -279,7 +279,7 @@ est_acpi_pss_changed(struct acpicpu_pss *pss, int npss) return; } - if ((acpilist->table = malloc(sizeof(struct est_op) * nstates, + if ((acpilist->table = malloc(sizeof(struct est_op) * npss, M_DEVBUF, M_NOWAIT)) == NULL) { printf("est_acpi_pss_changed: cannot allocate memory for new" " operating points"); @@ -287,7 +287,7 @@ est_acpi_pss_changed(struct acpicpu_pss *pss, int npss) return; } - for (i = 0; i < nstates; i++) { + for (i = 0; i < npss; i++) { acpilist->table[i].mhz = pss[i].pss_core_freq; acpilist->table[i].ctrl = pss[i].pss_ctrl; if (pss[i].pss_ctrl == cur) diff --git a/sys/arch/i386/i386/est.c b/sys/arch/i386/i386/est.c index 2c52ac78d4c..e8d331ccb6d 100644 --- a/sys/arch/i386/i386/est.c +++ b/sys/arch/i386/i386/est.c @@ -1,4 +1,4 @@ -/* $OpenBSD: est.c,v 1.33 2009/12/01 18:31:36 jsg Exp $ */ +/* $OpenBSD: est.c,v 1.34 2010/03/28 03:09:50 marco Exp $ */ /* * Copyright (c) 2003 Michael Eriksson. * All rights reserved. @@ -1005,7 +1005,7 @@ void est_acpi_pss_changed(struct acpicpu_pss *pss, int npss) { struct fqlist *acpilist; - int needtran = 1, nstates, i; + int needtran = 1, i; u_int64_t msr; u_int16_t cur; @@ -1019,7 +1019,7 @@ est_acpi_pss_changed(struct acpicpu_pss *pss, int npss) return; } - if ((acpilist->table = malloc(sizeof( struct est_op) * nstates, + if ((acpilist->table = malloc(sizeof( struct est_op) * npss, M_DEVBUF, M_NOWAIT)) == NULL) { printf("est_acpi_pss_changed: cannot allocate memory for new " "operating points"); @@ -1027,7 +1027,7 @@ est_acpi_pss_changed(struct acpicpu_pss *pss, int npss) return; } - for (i = 0; i < nstates; i++) { + for (i = 0; i < npss; i++) { acpilist->table[i].mhz = pss[i].pss_core_freq; acpilist->table[i].ctrl = pss[i].pss_ctrl; if (pss[i].pss_ctrl == cur) |