From nobody Sun Aug 21 11:29:12 2022 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 4M9YD91JQvz4ZYmc; Sun, 21 Aug 2022 11:29: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 4M9YD86Nvrz3xH1; Sun, 21 Aug 2022 11:29:12 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1661081352; 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=Ps+ohdvfsSBNyoRwudLBSWdH/EBK23PBTC7fLQs8DjY=; b=YjzcfQznLDGZiUPJx6I11IJhSuwXy0zBMxyDnvmRP5k0oUmJYOhwZ8H1ypyo8XSvbXS0zE 1PV/47bjDMkdlzGalvIAFuT4Oqid1wjRueu14NjsUbT4Yyn/GOI9jF29SkcwDfqUG8kWOR YykJgs7DwjPTHmMdnnpnxwPsof84vvbTGaDIPJLCfjCA3BT2t8Dyb/lcypFF/zWuKQ/agy yzk3OR1noWTaRpLFmqsNoR3ri7L8iYbBKidsvafuyZpsi0IxmaqdhJWWwhcVD3zvLoZ06g J9xAvSP3aawRIejB7YmMCtcro9fULIy5fi5JUNuNyiBFOsP1o+kk+7iAtjZkDQ== 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 4M9YD85W2wz1895; Sun, 21 Aug 2022 11:29:12 +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 27LBTCn2004492; Sun, 21 Aug 2022 11:29:12 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 27LBTCwI004491; Sun, 21 Aug 2022 11:29:12 GMT (envelope-from git) Date: Sun, 21 Aug 2022 11:29:12 GMT Message-Id: <202208211129.27LBTCwI004491@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Dimitry Andric Subject: git: 957c5a9a4dda - stable/13 - Fix unused variable warning in mmu_radix.c 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: dim X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 957c5a9a4dda013ca8775922b24fb6ab0e418f77 Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1661081352; 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=Ps+ohdvfsSBNyoRwudLBSWdH/EBK23PBTC7fLQs8DjY=; b=OBt9svJDMKOiEqWObiTwLizqnk24n03iodGsIXiWQnbiM6Gx4y0wSn6D+j2pwKLERLumna cr/OAfIB8lmdQ41k4J+hSud5ezLhO4gBlPCc4BwCIjjC4f6in0sGoHM+qdNS5tjsezEKBq aVe/qWlB8dIh8QYO9n3qdfHl8oi3mC2n1WpXAmt5XFvsMtpF6dA6W4hpjM1KYLmUdIYmd7 /S9XPKe1cURr3Y0tePFy6EHP0j+3veVe1tZsrtyzBXa7Y7s5m3rKDXW4c/geCob+LOwg4h XYUarQSEIEB4JWRsP2g8EBuGFizjnqJOWgzTlK2GALk23yPCgROXhvyQFYrTMQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1661081352; a=rsa-sha256; cv=none; b=xImtk9qBDl3Xjo8qgdgde++kWGJUxngD6owuVFxwwHGUdeAJ1UCRvsDtHunul7IwvSg7HX DAk38Tg625q4rteeW7s9RSXzrW4jOnvLf7HkXvsPfNarPq/uflHk9oez5R0OiufuNYzEnv n9FiOhvZJVYyQ/56HwFmDeu3q6hv0YzGxxntBpvnMmh8K6knWHimUY74SqfV4OznhYfTjZ 7X3XYWs+Q+JOlYeoB2lC9PMrnBpn+TvK4xWeW19Z9xo/ywnNDId0tJFcdvCFLbYB+zQl6D ASZP0PCiTcA0fXAj0YXFcOT/g7M962/yKg1t8OmiOSDrzciAOs7nPWncTNet4w== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch stable/13 has been updated by dim: URL: https://cgit.FreeBSD.org/src/commit/?id=957c5a9a4dda013ca8775922b24fb6ab0e418f77 commit 957c5a9a4dda013ca8775922b24fb6ab0e418f77 Author: Dimitry Andric AuthorDate: 2022-08-15 18:42:51 +0000 Commit: Dimitry Andric CommitDate: 2022-08-21 11:13:32 +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 (cherry picked from commit 3446738e8deb6d475f88ca16fbb7b11473d17010) --- 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 b9311e999588..097cc4be23dc 100644 --- a/sys/powerpc/aim/mmu_radix.c +++ b/sys/powerpc/aim/mmu_radix.c @@ -5369,7 +5369,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; @@ -5388,7 +5391,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) { @@ -5505,7 +5510,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));