From nobody Sat May 06 17:49:52 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 4QDFSK08tpz49slF; Sat, 6 May 2023 17:49:53 +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 4QDFSJ68F3z3GFF; Sat, 6 May 2023 17:49:52 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1683395392; 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=zxIxMGvShTPNzNwTKZx8yIv+VkAQ0DtFZIjU6IWdsao=; b=FqeSMC8nFF4tjRwqjMbc5ndkSIoEnz6IE4Y0EHVBq4yaOLLN5O0G+l70Dh9DLcZFOqS2N5 PiNJ6t/b8k9JsApdnu9AfBv0Pwyj5ISEkLfAr5JfgEdBemXfxbuiI20J+ETBFLkgy7t5Ce myUjCv8nHOiY0X2MVdbY77JievCLJQo4jE93cYebHMHxcBFazct4dpJqrjGQlWXva6e7lQ PX9UccRaUUnWdit56PARAGmZxLMbiO5rKgye+GBzv1Er1i53Q6XVY9WGrJYzVTHUGPUwcs w4i7jzHGOR5VOIxC6FF7ZlnCk6CqGczQi/gfcIrVoWyROQfI3NPzPCgol7tWHQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1683395392; 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=zxIxMGvShTPNzNwTKZx8yIv+VkAQ0DtFZIjU6IWdsao=; b=Ijl/5v7sVLCisYng/Y7uGxt31HFi+3S/dFQcyiRtrOq0TxCiSdkgWNibFPsx3UTbiMVKuq 5DGyGGi6ZMX3ZvNgMtjGoaGrvucGU0pE0mS7kKp1PDR4GhonD0SFvWAam5P+SPta2C2GA2 rhcI4chxM62eygaQ0VdBbUA9verjfZBOJo6od2liC/CAUFupeMDR7iMFgijQ0q9LIrDVjL 4WEE9MfBNkbqY/Go+jH0z6GqamdEg3r2pT1r2uzchhR1tlWTNH65l7m/bT/Uq3tmHZBoJd QRr/N5tB3KnnuXTuD+en9oS3PCPfUlB/hsuiSlfOViHPgEMcwTAbF5RBjrjCQQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1683395392; a=rsa-sha256; cv=none; b=pGwOuEXSZMME2Z1lPbAOBUFamkY44Kc6DiXT3qXZhgayVGoI7XxsYcH1gw47XrFJewA6g9 AW0by2t3wFQsvBRSjlYmgteYfZwLtKsh6mrpFu0ibAjadSrsg4I6JC8W2OHvOkat4ZS5WH 3k7qyI8E4HtxLrbakDizKgcM/oiAC2AWJQfq3UTYKt2ixCVu1aPRAc9wQ8xduj4+hL0w5z EuWpdMQjEnE02HU9jNt8+RT4m11lqz3N1I+UhMSWLLdbNHheqbBHXHq95TiUXHNs1H/B/o XJTYsiS0/EeP6QvsYWuzAfVuCz+/hPhx83l5xG70P8dyKTldWLjCA5jj6laeMA== 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 4QDFSJ5D24zlgm; Sat, 6 May 2023 17:49:52 +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 346HnqXZ018082; Sat, 6 May 2023 17:49:52 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 346HnqMP018081; Sat, 6 May 2023 17:49:52 GMT (envelope-from git) Date: Sat, 6 May 2023 17:49:52 GMT Message-Id: <202305061749.346HnqMP018081@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Mitchell Horne Subject: git: a35453b9c764 - main - 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/main X-Git-Reftype: branch X-Git-Commit: a35453b9c7644f11df83d0c7e73da488f521e56e Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by mhorne: URL: https://cgit.FreeBSD.org/src/commit/?id=a35453b9c7644f11df83d0c7e73da488f521e56e commit a35453b9c7644f11df83d0c7e73da488f521e56e Author: Mitchell Horne AuthorDate: 2023-05-05 21:59:53 +0000 Commit: Mitchell Horne CommitDate: 2023-05-06 17:49:19 +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 --- 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);