summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authordim <dim@FreeBSD.org>2011-12-31 12:37:07 +0000
committerdim <dim@FreeBSD.org>2011-12-31 12:37:07 +0000
commit21c9c8f9bc530abe04f437b584b590b8ad325671 (patch)
treef5242e41c099865d0f7902313276015fc80603cc
parentf6346713079680d80245405ac41d4f6362f443ac (diff)
downloadFreeBSD-src-21c9c8f9bc530abe04f437b584b590b8ad325671.zip
FreeBSD-src-21c9c8f9bc530abe04f437b584b590b8ad325671.tar.gz
In sys/dev/hwpmc/hwpmc_amd.c, fix a clang warning about invalid enum
conversions. Reviewed by: jkoshy MFC after: 1 week
-rw-r--r--sys/dev/hwpmc/hwpmc_amd.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/sys/dev/hwpmc/hwpmc_amd.c b/sys/dev/hwpmc/hwpmc_amd.c
index 268904b..9ffa62f 100644
--- a/sys/dev/hwpmc/hwpmc_amd.c
+++ b/sys/dev/hwpmc/hwpmc_amd.c
@@ -889,7 +889,6 @@ pmc_amd_initialize(void)
* field returned by CPUID for instruction family >= 6.
*/
- class = cputype = -1;
name = NULL;
switch (cpu_id & 0xF00) {
#if defined(__i386__)
@@ -906,9 +905,8 @@ pmc_amd_initialize(void)
class = PMC_CLASS_K8;
name = "K8";
break;
- }
- if ((int) cputype == -1) {
+ default:
(void) printf("pmc: Unknown AMD CPU.\n");
return NULL;
}
OpenPOWER on IntegriCloud