Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 4 Jun 2018 04:49:06 +0000 (UTC)
From:      Matt Macy <mmacy@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r334598 - head/sys/dev/hwpmc
Message-ID:  <201806040449.w544n6Kc054852@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
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)



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201806040449.w544n6Kc054852>