From nobody Thu Jan 20 10:09:40 2022 X-Original-To: dev-commits-src-branches@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 9F1241965123; Thu, 20 Jan 2022 10:09:41 +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 4JfdXj1sJvz4VPW; Thu, 20 Jan 2022 10:09:41 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1642673381; 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=FgGg6fDtGbGhEtXA3rHLBzfBYN/QDiSMt7a2Tlw0qZk=; b=bWYwTpMg5oinOtlFq2wZuVUI64CAVVRwNOC+UWKfWSC+pTcoixHsMoA5HuhaB4JU3RH9IT DSw2nhaWlF4WjY1ymlz2RJlQe0Q9Sb3fQmslAjZ4Sdt7YU+9IfupTfM9A/8TQnHx19Iaxa 9FGUoN63STtZRAu60h4/BNAwaptEgetKFLA2XwZie+aBkZunPKR1MVQH/r14BRcE9bDUW1 tTkUYdXDX6XjL/NI3nvVPPiLtRo8BqOHNCHjqwoj89sjvKxksInw+u/4CsGL4BLsSW5qvu CFuPsvE3Pp221gvtw3kNF5Kq6EB16sQNQRMYP8MNnKUFL8DfhroSN8AZ3LASeA== 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 19A972616E; Thu, 20 Jan 2022 10:09:41 +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 20KA9ePR091237; Thu, 20 Jan 2022 10:09:40 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 20KA9eGo091236; Thu, 20 Jan 2022 10:09:40 GMT (envelope-from git) Date: Thu, 20 Jan 2022 10:09:40 GMT Message-Id: <202201201009.20KA9eGo091236@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Michal Meloun Subject: git: 2ace1585b0f6 - stable/13 - intrng: remove now redundant shadow variable. List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: mmel X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 2ace1585b0f6b191767152feecf3cb6f45a58c31 Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1642673381; 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=FgGg6fDtGbGhEtXA3rHLBzfBYN/QDiSMt7a2Tlw0qZk=; b=pWiD/+SLECOVMSPT3QvX4fcMaqQMVpFBgSLFft0WBH3AwT6WKHvRExqpswDcNQFxUOCq6y o6di9oq9Z2aMME/Lgw+fmZPSFg/A2P6Cp78hfDFcnhcI9EUcCUpoEYdr9Pu9yXE+094cAW aE/fbdpHWlLsoKSaxviOhWpvIo1ioqt87AmPg4igI+4dA6jSQ71AB3QQ95hnqLtB7YFtCb kpC8MTwtFqynBK4Xa88eyVqv67uNU0OQKxmz+2T7IZZB5SJDMwt9vNlx4t4tjyr5teG/rr EFop2orL/hNVCiCMX/3zFbZwcs0m1weiDQYxdATQao/AqnDjgJdcIaJzt2aHJQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1642673381; a=rsa-sha256; cv=none; b=Q51RMAzQAzdl9fVKcmlnJVedCvzIu1T+yNZFJiqSzRGUVh1gjzMy6OlRy62c6Jnobx2sVV qI/t326CRojuN4zB2r0esT5J1crTlhok/yZadkCmkW3ytCDuSR5wQEwkK763fiI1h2WLMJ FYltDauZ/NedrrOS0SrN+KDlfXGaTOctTZZ8733d+x8LaJ4AN20Y6TT1L6scF4TdUN8Hdi +2bxwdd8QvxDNmlXNoscRiYeIWnz0L9Sbfh5B1fNQ94CdGZRT8no4xCgl79XDQ53iGCyie MYIG2vowaxom9t6sB/NyURAw5lPj6GlGvu0Oso/zfjUQWF6/fWehNOccFJKGWQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch stable/13 has been updated by mmel: URL: https://cgit.FreeBSD.org/src/commit/?id=2ace1585b0f6b191767152feecf3cb6f45a58c31 commit 2ace1585b0f6b191767152feecf3cb6f45a58c31 Author: Michal Meloun AuthorDate: 2021-07-02 18:28:25 +0000 Commit: Michal Meloun CommitDate: 2022-01-20 10:08:45 +0000 intrng: remove now redundant shadow variable. Should not be a functional change. Submitted by: ehem_freebsd@m5p.com Discussed in: https://reviews.freebsd.org/D29310 MFC after: 4 weeks (cherry picked from commit e88c3b1b02a663f18f51167f54a50e7b4f0eca02) --- sys/kern/subr_intr.c | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/sys/kern/subr_intr.c b/sys/kern/subr_intr.c index d4926b2e2364..04636f09c5a1 100644 --- a/sys/kern/subr_intr.c +++ b/sys/kern/subr_intr.c @@ -401,15 +401,14 @@ intr_isrc_dispatch(struct intr_irqsrc *isrc, struct trapframe *tf) static inline int isrc_alloc_irq(struct intr_irqsrc *isrc) { - u_int maxirqs, irq; + u_int irq; mtx_assert(&isrc_table_lock, MA_OWNED); - maxirqs = intr_nirq; - if (irq_next_free >= maxirqs) + if (irq_next_free >= intr_nirq) return (ENOSPC); - for (irq = irq_next_free; irq < maxirqs; irq++) { + for (irq = irq_next_free; irq < intr_nirq; irq++) { if (irq_sources[irq] == NULL) goto found; } @@ -418,7 +417,7 @@ isrc_alloc_irq(struct intr_irqsrc *isrc) goto found; } - irq_next_free = maxirqs; + irq_next_free = intr_nirq; return (ENOSPC); found: @@ -426,7 +425,7 @@ found: irq_sources[irq] = isrc; irq_next_free = irq + 1; - if (irq_next_free >= maxirqs) + if (irq_next_free >= intr_nirq) irq_next_free = 0; return (0); }