From nobody Tue May 14 13:42:37 2024 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 4VdyGQ1qxXz5K7tK; Tue, 14 May 2024 13:42:38 +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 4VdyGP6Xsxz4Qs6; Tue, 14 May 2024 13:42:37 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1715694157; 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=PH8UeUA0H/Kp+ook20BwNrn9lERLXUSfyHuLURjmVSA=; b=JkPZy4t9AJVnrwT9wK1kP02lqDYcHZ4smezQYZNAmzOIt7yvu5Tdsx7UsQSrMn2fgy28oU juR53ZsJyeKkgArKxjSbb2I1THyFPeZP4Sk5Q/urvNQe2KGTLV0fbHzeqAyGb9L3lh2DKX TBScistjm4GjuDCnMYl0slebHVRs2qlSWufKZLqFA1HMI+AsJXAjFLC1hVucpPfmN3nB6M y+yLQ+z3iTGTOnh1ALK/y/jS8QICiDdnRdBI7+licfeBNajB0OYfdyHNO9+UNpxohodGHA BTI/MsBixMMOgmRzFFOs9Lrpvhk/xUI6emw7pTueQdTi+KHnBvgHoTZYoB+dlQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1715694157; a=rsa-sha256; cv=none; b=qZshTeLwKW+kJH9y+IPCHXvBYK+PRtECVo4cC22bjClV0DqPAsVlxyR+e+QfeOhPLYRL0t wyI/9TLQeQeFRlw/nleUtnswc0dHAZztF7O+rz+icXGb74F6QXP6MDLNKGKs9Bqs0RYC7y 1idZPc34X7+f+ww6zH9QFQimzb3rExiwtNKPfYE0r7wkUjNw81JdYCdVgG+64erm9u+iaV nCMvoZhghSb0m4tG4C3mIcSISyKeVHUo+oPTi/woEjkL4bI2tOGBSauwB556NdyMnwM0+F nnHG47HTM7UzOe+YRUFhv6D/scGFfcN/DBfDvbFoqB2qEVnTAG5Z+rdf3WPDSw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1715694157; 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=PH8UeUA0H/Kp+ook20BwNrn9lERLXUSfyHuLURjmVSA=; b=mjsovfzAMX/RApBHdbvPLawjitJalrJyMJDEoVCxe9xjQwu0SmhFcJbPTTL3lWjATQD8Rq k7mYsteHh/qwAs9OWuWayI6E24ycme/ilRprK3kP0/JUwUyoBCabeF4KT0ltp8+eKQ6kgQ w+QGPQghrwfqM+om9fDztxmjWLkjg3AMf85gPHsyESNnjRqKE6HmGCTtUK7x32Wm24HNQX b31h2mKYFbtvdTofqqk7Z376xx6NQrONs2OarkgOyIFnUqHkg5mBNIIcRvPgjPul5b9QC1 CZudlxM9c12H2C8DX+zx9NnL2tKLdrn3nwLnMsPyzx5Nh1Up1voqIWTs1kcLxg== 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 4VdyGP5hFlzZb9; Tue, 14 May 2024 13:42:37 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 44EDgbS3096355; Tue, 14 May 2024 13:42:37 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 44EDgbpk096352; Tue, 14 May 2024 13:42:37 GMT (envelope-from git) Date: Tue, 14 May 2024 13:42:37 GMT Message-Id: <202405141342.44EDgbpk096352@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Christos Margiolis Subject: git: 305db91d4b92 - main - sound: Remove ncards variable from sound_oss_card_info() 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: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: christos X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 305db91d4b92a5d53826dcb6df39fc8a1f3b427e Auto-Submitted: auto-generated The branch main has been updated by christos: URL: https://cgit.FreeBSD.org/src/commit/?id=305db91d4b92a5d53826dcb6df39fc8a1f3b427e commit 305db91d4b92a5d53826dcb6df39fc8a1f3b427e Author: Christos Margiolis AuthorDate: 2024-05-14 13:42:20 +0000 Commit: Christos Margiolis CommitDate: 2024-05-14 13:42:20 +0000 sound: Remove ncards variable from sound_oss_card_info() The loop counter is also the card's index, so ncards is redundant. Sponsored by: The FreeBSD Foundation MFC after: 3 days Reviewed by: dev_submerge.ch Differential Revision: https://reviews.freebsd.org/D45144 --- sys/dev/sound/pcm/sound.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/sys/dev/sound/pcm/sound.c b/sys/dev/sound/pcm/sound.c index 3e95fd0e0ea4..e66462af2a71 100644 --- a/sys/dev/sound/pcm/sound.c +++ b/sys/dev/sound/pcm/sound.c @@ -792,9 +792,7 @@ int sound_oss_card_info(oss_card_info *si) { struct snddev_info *d; - int i, ncards; - - ncards = 0; + int i; for (i = 0; pcm_devclass != NULL && i < devclass_get_maxunit(pcm_devclass); i++) { @@ -802,7 +800,7 @@ sound_oss_card_info(oss_card_info *si) if (!PCM_REGISTERED(d)) continue; - if (ncards++ != si->card) + if (i != si->card) continue; PCM_UNLOCKASSERT(d);