From nobody Tue Jan 17 13:10:17 2023 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 4Nx8Q15RJ7z2p3MW; Tue, 17 Jan 2023 13:10:17 +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 4Nx8Q14vCwz428m; Tue, 17 Jan 2023 13:10:17 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1673961017; 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=awy+Wyg3mq4Yt8FhasOlKAjJtwE6DLY+OvrXJKMJuGg=; b=Lbs0HTJ97dXGv0u00vn8knBvcsS5OSaNvTIxDj9mCVpLrLsyTbqF4TgeRocm1sm1RN2Bv5 nvN1G5p3bY2TzS9rYtU66RSnvhpmJty73mcpcYOqFcE26wHZdil+N4vFUhfsdPtz7Mbq7u q1rUqITY/HbbfLxx3WlM1zaF8dVRdhp46HQLGEfLPXASnkO2dH2jDScobZJYc3sCKltUKr 6o6jrZvLXuMMjznCc377wfOy3OtoTj0Z1k+jenHZv4ZDUNFqfDK++WKyTypKS8mE4V62b0 rma9zeXfYHq3jR1Ve7BUgnm8CdTPurOnv340DAoczpoXSRp7vM/fPYzMHXp9ig== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1673961017; 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=awy+Wyg3mq4Yt8FhasOlKAjJtwE6DLY+OvrXJKMJuGg=; b=SOm2gVmVumfY9oLp16NOQnWSfzUwUIlNvTjgn0DNJ+fCAt+hP1+cpQr4zMTEzijAlMMEJy wWn7ZZp3hNmdJYOfKucHhx36Oao1SBKlcwYO7G1+FFAwRlJCHWKlCZO2zP/i1j2cBSby6j CgDrwEA9CsKwCzS/W40YFaOAxfQVjUvheE3iHQM3b0ogzXd1Wr3iyStBjGOY4FEsExCyoI dsnRWXse1MSXaO1HoAma93q6RrBy667MYt12Ugiu97jAE5Sq/YsF8sMKpC4yCcWqejbDD4 vxas8hNSGA5VSl42YyV23BwcDAWprNOysp+ooYVoAL5DR95NxqbSvP5zhUxS8Q== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1673961017; a=rsa-sha256; cv=none; b=LV7jY/i8smUXmEGm+1a+vC27RhSnd5qvtVISoihEgt7sHsjj3vWjurd9M0zBjBhiyjVY5A hE0SjgHFS+DKff5bs99jOX7sdR7BBIe9CwL9J4jek2zTACHsWpy6V6/0v6KvXgtBXcPwyv YtaB2R5ZM7CQ4roBksDzUoagWIxI8f+fbicVOW17ARjGmtHNxkGwS0aBA/0ZBubqkGk9lM 0A4FNzjt7DpPp4uqTtaW/STO/kh/ycJrQrc4/7lndOYn/OLJgbGgFzwL+WVnuFERShQpFP cRZSG6AWIiwJhxK8o3Q2iqJ/nZUrH83nJl/+DUv5W4ep6Lwfer7QXFfWRR+HzA== 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 4Nx8Q13xRczXl4; Tue, 17 Jan 2023 13:10:17 +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 30HDAHsw000291; Tue, 17 Jan 2023 13:10:17 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 30HDAHaT000290; Tue, 17 Jan 2023 13:10:17 GMT (envelope-from git) Date: Tue, 17 Jan 2023 13:10:17 GMT Message-Id: <202301171310.30HDAHaT000290@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Mark Johnston Subject: git: e5f5ca7fee26 - main - mixer(3): remove redundant argument in _mixer_readvol() 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: markj X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: e5f5ca7fee26179725ab2d66b5500d51fe8ae113 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=e5f5ca7fee26179725ab2d66b5500d51fe8ae113 commit e5f5ca7fee26179725ab2d66b5500d51fe8ae113 Author: Christos Margiolis AuthorDate: 2023-01-17 13:08:59 +0000 Commit: Mark Johnston CommitDate: 2023-01-17 13:08:59 +0000 mixer(3): remove redundant argument in _mixer_readvol() There's no reason to pass the mixer as an argument since we can fetch it from mix_dev. No functional change intended. Reviewed by: markj, hselasky MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D38076 --- lib/libmixer/mixer.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/lib/libmixer/mixer.c b/lib/libmixer/mixer.c index 1a448d222bb7..f81f2ff4a66b 100644 --- a/lib/libmixer/mixer.c +++ b/lib/libmixer/mixer.c @@ -37,17 +37,17 @@ #define BASEPATH "/dev/mixer" -static int _mixer_readvol(struct mixer *, struct mix_dev *); +static int _mixer_readvol(struct mix_dev *); /* * Fetch volume from the device. */ static int -_mixer_readvol(struct mixer *m, struct mix_dev *dev) +_mixer_readvol(struct mix_dev *dev) { int v; - if (ioctl(m->fd, MIXER_READ(dev->devno), &v) < 0) + if (ioctl(dev->parent_mixer->fd, MIXER_READ(dev->devno), &v) < 0) return (-1); dev->vol.left = MIX_VOLNORM(v & 0x00ff); dev->vol.right = MIX_VOLNORM((v >> 8) & 0x00ff); @@ -122,7 +122,7 @@ dunit: dp->parent_mixer = m; dp->devno = i; dp->nctl = 0; - if (_mixer_readvol(m, dp) < 0) + if (_mixer_readvol(dp) < 0) goto fail; (void)strlcpy(dp->name, names[i], sizeof(dp->name)); TAILQ_INIT(&dp->ctls); @@ -336,7 +336,7 @@ mixer_set_vol(struct mixer *m, mix_volume_t vol) v = MIX_VOLDENORM(vol.left) | MIX_VOLDENORM(vol.right) << 8; if (ioctl(m->fd, MIXER_WRITE(m->dev->devno), &v) < 0) return (-1); - if (_mixer_readvol(m, m->dev) < 0) + if (_mixer_readvol(m->dev) < 0) return (-1); return (0);