svn commit: r334598 - head/sys/dev/hwpmc

Matt Macy mmacy at FreeBSD.org
Mon Jun 4 04:49:07 UTC 2018


Author: mmacy
Date: Mon Jun  4 04:49:06 2018
New Revision: 334598
URL: https://svnweb.freebsd.org/changeset/base/334598

Log:
  hwpmc: fix fixed counters checks

Modified:
  head/sys/dev/hwpmc/hwpmc_core.c

Modified: head/sys/dev/hwpmc/hwpmc_core.c
==============================================================================
--- head/sys/dev/hwpmc/hwpmc_core.c	Mon Jun  4 03:16:24 2018	(r334597)
+++ head/sys/dev/hwpmc/hwpmc_core.c	Mon Jun  4 04:49:06 2018	(r334598)
@@ -251,13 +251,12 @@ iaf_allocate_pmc(int cpu, int ri, struct pmc *pm,
 	if (ev == 0xC0 && ri != 0)
 		return (EINVAL);
 	/* CPU_CLK_UNHALTED.THREAD */
-	else if (ev == 0x3C && ri != 1)
+	if (ev == 0x3C && ri != 1)
 		return (EINVAL);
 	/* CPU_CLK_UNHALTED.REF */
-	else if (ev == 0x0 && umask == 0x3 && ri != 2)
+	if (ev == 0x0 && umask == 0x3 && ri != 2)
 		return (EINVAL);
-	else
-		return (EINVAL);
+
 
 	flags = 0;
 	if (config & IAP_OS)


More information about the svn-src-head mailing list