From nobody Mon Aug 15 18:49:25 2022 X-Original-To: dev-commits-src-main@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 4M63Gt0h1cz4YXs2; Mon, 15 Aug 2022 18:49:26 +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 4M63Gs7203z3C2c; Mon, 15 Aug 2022 18:49:25 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1660589366; 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=nc08t6ZYbf/N+WvmF+EP3uFV11XrbpQ2JUcNaYngq3Q=; b=EnWG1TY4dIbG8fo0lwdj006H+Fu0Tzj3gdQlSuSG0rK7QMUDqNG5PJHVDYZl6ipSApVeWZ voYUDSM5ya9TrDZXsRTouLOH4AKCVQaH3NhOsroISNozDECyevs/0KUG0fomX6zUkJW7Gi Ubfr1UaQKyvZeR1IeGYhd6j/LrmrrPchZLc/7qr5gjljNudOq4FwvDCpr76Vw7796Usfc8 i7mx64dJ51KH16Wg4qOUY285oUDoE/izoRAsgfW9yI/jyGmEBvNkcN53FtjQoV/50o21zg TGfnqSLXVqIh+adljgqrvV4B2xdnDWJBABv5TIbaYV/zGOtUBN6Zusd2D/cCwg== 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 4M63Gs5xQrzg0R; Mon, 15 Aug 2022 18:49:25 +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 27FInPGQ027830; Mon, 15 Aug 2022 18:49:25 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 27FInP3L027829; Mon, 15 Aug 2022 18:49:25 GMT (envelope-from git) Date: Mon, 15 Aug 2022 18:49:25 GMT Message-Id: <202208151849.27FInP3L027829@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Dimitry Andric Subject: git: 3446738e8deb - main - Fix unused variable warning in mmu_radix.c List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: dim X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 3446738e8deb6d475f88ca16fbb7b11473d17010 Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1660589366; 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=nc08t6ZYbf/N+WvmF+EP3uFV11XrbpQ2JUcNaYngq3Q=; b=GYMaM+aBRPhEL1Ag4ECXRFhg//yAYZdYg0xF2gmkCLniAqlf0fihloydNYPYSqCrhSBVcD fu9axf+jtQryUw2xEB8pca8pASkMfOCstUTCOlDUPYpaQ2PrDvB/Z/sNkq8fkp6Tuhxdkm OmMMZgj2moh/8CdVUHTE9N0nEfcZ3fb0kXk6uHlgjk/UZ+tiC0pit7yEp0++yR3FFc8Sxx X0l5sh+Mcg6C8QXaQUCGG0fIeyBRTNt9JIuYhVHxEyR4I7fkqNZEHbiXf9pXDy4gsc3/7b YbigDwWVDnaiYv/ibcu+3mwL2w7qCxhfxrqC+izNXYk/0WRVhTbRYhcXvZSqkw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1660589366; a=rsa-sha256; cv=none; b=Cos0ZAlTZY/gMiDB4ftm7IRyiUyytxwFFm9Ss21g2tNyHmIC4xfPz/aZPB00B+LkQcIq2z HHJjToUrFWczWGDGEABrTV5RKYRHaqOv6B9/h9mOMCIkd/9v2Hi3rfty6kv9EfwNJtJvom B3jg+zB2gk+cwqZZ5pOyLktnj1VP+b9o8oX0wE/bayT52DgdEMoIp/utFrTL9tcq/4vykI beuF211yc7Y1eqknHIQeuIPPvqpKlSLAOCHuNEDf29CCDNCMHbvjkD/ABjlh38Y6ECGRTT AGzn5fVTLi1q73H7DiFV5ElaVGi8C+w8aNpvD/F+2FCkbLTu5rnmS2ST5UacJQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by dim: URL: https://cgit.FreeBSD.org/src/commit/?id=3446738e8deb6d475f88ca16fbb7b11473d17010 commit 3446738e8deb6d475f88ca16fbb7b11473d17010 Author: Dimitry Andric AuthorDate: 2022-08-15 18:42:51 +0000 Commit: Dimitry Andric CommitDate: 2022-08-15 18:48:34 +0000 Fix unused variable warning in mmu_radix.c With clang 15, the following -Werror warning is produced: sys/powerpc/aim/mmu_radix.c:5409:22: error: variable 'freed' set but not used [-Werror,-Wunused-but-set-variable] int allfree, field, freed, idx; ^ The 'freed' variable is only used when PV_STATS is defined. Ensure it is only declared and set in that case. MFC after: 3 days --- sys/powerpc/aim/mmu_radix.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/sys/powerpc/aim/mmu_radix.c b/sys/powerpc/aim/mmu_radix.c index dc7bdaaa6ed9..955618d57e68 100644 --- a/sys/powerpc/aim/mmu_radix.c +++ b/sys/powerpc/aim/mmu_radix.c @@ -5406,7 +5406,10 @@ mmu_radix_remove_pages(pmap_t pmap) struct rwlock *lock; int64_t bit; uint64_t inuse, bitmask; - int allfree, field, freed, idx; + int allfree, field, idx; +#ifdef PV_STATS + int freed; +#endif boolean_t superpage; vm_paddr_t pa; @@ -5425,7 +5428,9 @@ mmu_radix_remove_pages(pmap_t pmap) PMAP_LOCK(pmap); TAILQ_FOREACH_SAFE(pc, &pmap->pm_pvchunk, pc_list, npc) { allfree = 1; +#ifdef PV_STATS freed = 0; +#endif for (field = 0; field < _NPCM; field++) { inuse = ~pc->pc_map[field] & pc_freemask[field]; while (inuse != 0) { @@ -5542,7 +5547,9 @@ mmu_radix_remove_pages(pmap_t pmap) } } pmap_unuse_pt(pmap, pv->pv_va, ptel3e, &free); +#ifdef PV_STATS freed++; +#endif } } PV_STAT(atomic_add_long(&pv_entry_frees, freed));