From nobody Thu Nov 12 16:38:14 2026 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 4jQR070Jysz70sRL for ; Thu, 12 Nov 2026 16:38:15 +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) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 4jQR064vQXz4JYm for ; Thu, 12 Nov 2026 16:38:14 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1794501494; 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=5xOjmwad4MQVdgNeN52wNgLnOMa+eoeyMYrWelW5wDU=; b=Bd/310+iU8Ur2/crpr0dZTVa5fbljwC+Y3L5Zx939QRX+RgY8hxa4fw1S5dVtxyzCDyQ9L 7jWxhv7I5Jfem5r/gnUh80CLY1Z4KPIDP/LdjXAYbRibW6gHDQ+E7qwx3KqGohyMXampvr lh7aqbx4jyIMAcerinBB0Uu2VoOWmgpuT2OlQy0O4YlbJrWpHlpQ552NuyxLB/7moPD2p/ d9zSP3FPSG8t4l8Xu7ew/VzO9nUSeQiUd1SOEguFmNKORfNCP8CXzadqrqc3HCjKvv44x5 YOzf/BLLKL0ziQVm3LoF3dX93yb7D0Zp2AlwHaU3XNgE0T/rEDGhCB8ypZLfKg== ARC-Seal: i=1; a=rsa-sha256; d=freebsd.org; s=dkim; cv=none; t=1794501494; b=imDqWWiL+CD72S6yw8bX3A5B7Io+is14r4bb3bsRMkYVXrR1i7fB3RNzy8IuWFsqBk++AF U6oZFGhk70O+1cZmfIVJX4Z7DvTkWz3WewYsiUBje2I2cW5S58Y+8tDtJKsMaWH98f4ZTA w4MoSTDX/p5o5JX15esGmeinE38EL/qr/facDhCYktlqz957YXiptGHMsl27ocgOP28ODq xe+6P/DC+C+GprnbUFnNm0IoJsI104urf416jyFHmLyhwti0jmjD/aClIDJnl+wCom3q3H rzNTSGfJHSnJz5pDIoK5fpIsVgcOVkD+qhmQApZgOLyfMwIfMr9hwMI7hhSEdw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1794501494; 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=5xOjmwad4MQVdgNeN52wNgLnOMa+eoeyMYrWelW5wDU=; b=UzbQ3iPrsmKCS5L1q88kzOa/kl0aGJ/+UThABm2TsS5dkQ6k/RO1FGbNhLL6AuU9jtMtg9 qkgHrp23yvvDxtBUOkC5y9Y6NHejvmfBWBWj5fdxhLwWC7Ae/2fXCmGP/rKfFYJOx0o2+F a7Jwr7FXqKtkj3SFijIRNqDWFtjfHY6w+QuMFXMOm7nME9vsuyxfMQPHepR17L+6sQp97v +h2lsoQ+DaaMzYB/A31NMkeMmZh+BrYxQZPRRF7h3VsUPzB+lplEkvKemAIw42HKQCZCPY GxCUNgWvHiuCufI9S2qy/9cw6GUeMv6Xo93HKF/4i/G7DKhxymbSelTn8bGVnQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4jQR0646d3z18vm for ; Thu, 12 Nov 2026 16:38:14 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 195a by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Thu, 12 Nov 2026 16:38:14 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Christos Margiolis Subject: git: 276e696108a6 - main - sound/midi: Retire M_RXEN List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all X-BeenThere: dev-commits-src-all@freebsd.org List-Id: Commit messages for all branches of the src repository List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list 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: 276e696108a682579f528ece65c695a546ecc63b Auto-Submitted: auto-generated Date: Thu, 12 Nov 2026 16:38:14 +0000 Message-Id: <6af5eb76.195a.50067599@gitrepo.freebsd.org> The branch main has been updated by christos: URL: https://cgit.FreeBSD.org/src/commit/?id=276e696108a682579f528ece65c695a546ecc63b commit 276e696108a682579f528ece65c695a546ecc63b Author: Christos Margiolis AuthorDate: 2026-11-12 09:50:09 +0000 Commit: Christos Margiolis CommitDate: 2026-11-12 16:35:49 +0000 sound/midi: Retire M_RXEN It was always set and cleared together with M_RX and never tested on its own, so it was redundant. The only thing that read it was midi_close()'s check for whether the flags had changed, which can be reduced to a plain FREAD test. No functional change intended. MFC after: 1 week Sponsored by: The FreeBSD Foundation --- sys/dev/sound/midi/midi.c | 9 +++------ sys/dev/sound/midi/midi.h | 5 ++--- 2 files changed, 5 insertions(+), 9 deletions(-) diff --git a/sys/dev/sound/midi/midi.c b/sys/dev/sound/midi/midi.c index 03add9adea23..678695349765 100644 --- a/sys/dev/sound/midi/midi.c +++ b/sys/dev/sound/midi/midi.c @@ -316,7 +316,7 @@ midi_open(struct cdev *i_dev, int flags, int mode, struct thread *td) m->wchan = 0; if (flags & FREAD) { - m->flags |= M_RX | M_RXEN; + m->flags |= M_RX; /* * Only clear the inq, the outq might still have data to drain * from a previous session @@ -339,7 +339,6 @@ midi_close(struct cdev *i_dev, int flags, int mode, struct thread *td) { struct snd_midi *m = i_dev->si_drv1; int retval = 0; - int oldflags; if (m == NULL) return ENXIO; @@ -352,14 +351,12 @@ midi_close(struct cdev *i_dev, int flags, int mode, struct thread *td) goto err; } - oldflags = m->flags; - if (flags & FREAD) - m->flags &= ~(M_RX | M_RXEN); + m->flags &= ~M_RX; if (flags & FWRITE) m->flags &= ~M_TX; - if ((m->flags & (M_TXEN | M_RXEN)) != (oldflags & (M_RXEN | M_TXEN))) + if (flags & FREAD) MPU_CALLBACK(m, m->cookie, m->flags); err: diff --git a/sys/dev/sound/midi/midi.h b/sys/dev/sound/midi/midi.h index c012a9d96da6..10e2b4382ccd 100644 --- a/sys/dev/sound/midi/midi.h +++ b/sys/dev/sound/midi/midi.h @@ -3,7 +3,7 @@ * * Copyright (c) 2003 Mathew Kanner * All rights reserved. - * Copyright (c) 2025 The FreeBSD Foundation + * Copyright (c) 2025-2026 The FreeBSD Foundation * * Portions of this software were developed by Christos Margiolis * under sponsorship from the FreeBSD Foundation. @@ -40,8 +40,7 @@ MALLOC_DECLARE(M_MIDI); #define M_RX 0x01 #define M_TX 0x02 -#define M_RXEN 0x04 -#define M_TXEN 0x08 +#define M_TXEN 0x04 struct snd_midi;