From nobody Fri Jun 09 19:58:13 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4QdBhj6v4Hz4cK5M; Fri, 9 Jun 2023 19:58:13 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4QdBhj5ZPpz4JxC; Fri, 9 Jun 2023 19:58:13 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1686340693; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=adGPeJZJDTqJmAweItvDt1I0vzXeYcCcYEFBOXAmRSU=; b=tupf9qHYwBi+PWhHXDFPgKWEzJbUMz9VDiwi+Y33EsCo6Sxk5Xe5l6U/IfO2O9G/7dD77z rk+i30OpRqC7RnB4HPmxQWMKGcTn5HxFQTVpn4AW/86UFrlS0ADd+pwTC2knPTlIOhDza4 CnGHDML2Us/kJyruDKJIX+O3eVGxlvVWVKWCskP5gtTAfIIR0WjNxUT8z+ui1Va+Vm4qDO WZbjWmDQ7BxgzGNSnNvl01kiQxCLTeU1sh5WcRcnoUT738OkZDNYJRMNp8uRg0TZXCb4UZ 9qWQyc2nJpP1JwRmot6y8tElrTDj38WK0slkTsbHM1jdXZtmsjAUgzkcu9ge8Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1686340693; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=adGPeJZJDTqJmAweItvDt1I0vzXeYcCcYEFBOXAmRSU=; b=tuYmTWZINf1YKkppoaVyam/ci2BtJpalMlren/gELkRIHTmh913CKaIVGaTHXopqCs6i8y fQAJh5WNuarzSu2GOU+39WnocfwIInFAazgddHVdgOaeL/nxk7L+ZEIEvUMSaw57yN/11m nLEQr/KD+gOYkF9hGMPs6AmludN0ZBejCKd7jlVD9w90Ut5gSgEmYp/sTI3cUSa7wRQMHr +mjT+OEzaOEJVn9sPqpmiSq+viUaM1M6ujKKClTNPT3aTEzeq4kDf7EraJpi8qBm77mtu9 7+kTKjelob0ZSIe/Rj3IoBnD0ONsRyoZOXmVUuw/rZmLdO/6guae5Ek4oXNmFw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1686340693; a=rsa-sha256; cv=none; b=Yed4f+0XC21RJNEwWfjQhf77IwcdY/bhe+Ntf3npDzr60i89DQZodn7pt4Xu4eYmXnPGbC 2qQCzxznO04I0yZd6PL3k3ljGBQg3dVR4V6F8BWPXHbEnEdSQaoWY6SqJgGTn+ZvUbYMEl Zsz+WTF+JC/WCcqkpa91nzJNDu4S0VooPTnI3JegUWTrZfmcamoDc52p1qxgk/El1JuVfV 5Cz9Eh7taI8zKPnvLpKcfXVHOkU4dlndpcybeF+MbZq6nChvBTwaOid5dg+vKjT1utUQwj Uec5kik1h5pz/2swk3o2rCW5bT6Ci/mRN/gPqlWJGCEepCk8GPoPajmSGM885Q== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4QdBhj4047znW2; Fri, 9 Jun 2023 19:58:13 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 359JwDXa072258; Fri, 9 Jun 2023 19:58:13 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 359JwDQR072257; Fri, 9 Jun 2023 19:58:13 GMT (envelope-from git) Date: Fri, 9 Jun 2023 19:58:13 GMT Message-Id: <202306091958.359JwDQR072257@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Mitchell Horne Subject: git: e6b3aaa3e68d - stable/13 - hwpmc: unused/diagused annotations in tsc class List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: mhorne X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: e6b3aaa3e68db10ef4ef7ae25cefb04b3d61b5d2 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch stable/13 has been updated by mhorne: URL: https://cgit.FreeBSD.org/src/commit/?id=e6b3aaa3e68db10ef4ef7ae25cefb04b3d61b5d2 commit e6b3aaa3e68db10ef4ef7ae25cefb04b3d61b5d2 Author: Mitchell Horne AuthorDate: 2023-05-05 21:59:53 +0000 Commit: Mitchell Horne CommitDate: 2023-06-09 18:14:59 +0000 hwpmc: unused/diagused annotations in tsc class These are preferred over casts to void. No functional change. Reviewed by: jkoshy MFC after: 2 weeks Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D39914 (cherry picked from commit a35453b9c7644f11df83d0c7e73da488f521e56e) --- sys/dev/hwpmc/hwpmc_tsc.c | 27 ++++++++------------------- 1 file changed, 8 insertions(+), 19 deletions(-) diff --git a/sys/dev/hwpmc/hwpmc_tsc.c b/sys/dev/hwpmc/hwpmc_tsc.c index 25b2e9f8fd57..3c95ceb080a5 100644 --- a/sys/dev/hwpmc/hwpmc_tsc.c +++ b/sys/dev/hwpmc/hwpmc_tsc.c @@ -70,10 +70,9 @@ struct tsc_cpu { static struct tsc_cpu **tsc_pcpu; static int -tsc_allocate_pmc(int cpu, int ri, struct pmc *pm, +tsc_allocate_pmc(int cpu __diagused, int ri __diagused, struct pmc *pm __unused, const struct pmc_op_pmcallocate *a) { - (void) cpu; KASSERT(cpu >= 0 && cpu < pmc_cpu_max(), ("[tsc,%d] illegal CPU value %d", __LINE__, cpu)); @@ -140,9 +139,8 @@ tsc_describe(int cpu, int ri, struct pmc_info *pi, struct pmc **ppmc) } static int -tsc_get_config(int cpu, int ri, struct pmc **ppm) +tsc_get_config(int cpu, int ri __diagused, struct pmc **ppm) { - (void) ri; KASSERT(cpu >= 0 && cpu < pmc_cpu_max(), ("[tsc,%d] illegal CPU %d", __LINE__, cpu)); @@ -154,9 +152,8 @@ tsc_get_config(int cpu, int ri, struct pmc **ppm) } static int -tsc_get_msr(int ri, uint32_t *msr) +tsc_get_msr(int ri __diagused, uint32_t *msr) { - (void) ri; KASSERT(ri >= 0 && ri < TSC_NPMCS, ("[tsc,%d] ri %d out of range", __LINE__, ri)); @@ -252,12 +249,10 @@ tsc_read_pmc(int cpu, int ri, pmc_value_t *v) } static int -tsc_release_pmc(int cpu, int ri, struct pmc *pmc) +tsc_release_pmc(int cpu, int ri __diagused, struct pmc *pmc __unused) { struct pmc_hw *phw __diagused; - (void) pmc; - KASSERT(cpu >= 0 && cpu < pmc_cpu_max(), ("[tsc,%d] illegal CPU value %d", __LINE__, cpu)); KASSERT(ri == 0, @@ -275,9 +270,8 @@ tsc_release_pmc(int cpu, int ri, struct pmc *pmc) } static int -tsc_start_pmc(int cpu, int ri) +tsc_start_pmc(int cpu __diagused, int ri __diagused) { - (void) cpu; KASSERT(cpu >= 0 && cpu < pmc_cpu_max(), ("[tsc,%d] illegal CPU value %d", __LINE__, cpu)); @@ -287,9 +281,8 @@ tsc_start_pmc(int cpu, int ri) } static int -tsc_stop_pmc(int cpu, int ri) +tsc_stop_pmc(int cpu __diagused, int ri __diagused) { - (void) cpu; (void) ri; KASSERT(cpu >= 0 && cpu < pmc_cpu_max(), ("[tsc,%d] illegal CPU value %d", __LINE__, cpu)); @@ -299,9 +292,8 @@ tsc_stop_pmc(int cpu, int ri) } static int -tsc_write_pmc(int cpu, int ri, pmc_value_t v) +tsc_write_pmc(int cpu __diagused, int ri __diagused, pmc_value_t v __unused) { - (void) cpu; (void) ri; (void) v; KASSERT(cpu >= 0 && cpu < pmc_cpu_max(), ("[tsc,%d] illegal CPU value %d", __LINE__, cpu)); @@ -354,7 +346,7 @@ pmc_tsc_initialize(struct pmc_mdep *md, int maxcpu) } void -pmc_tsc_finalize(struct pmc_mdep *md) +pmc_tsc_finalize(struct pmc_mdep *md __diagused) { #ifdef INVARIANTS int i, ncpus; @@ -366,9 +358,6 @@ pmc_tsc_finalize(struct pmc_mdep *md) KASSERT(md->pmd_classdep[PMC_MDEP_CLASS_INDEX_TSC].pcd_class == PMC_CLASS_TSC, ("[tsc,%d] class mismatch", __LINE__)); - -#else - (void) md; #endif free(tsc_pcpu, M_PMC);