From nobody Mon Jan 12 13:38:45 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 4dqYPL13bSz6NbsT for ; Mon, 12 Jan 2026 13:38:46 +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 "R13" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4dqYPK6Jnmz3QdH for ; Mon, 12 Jan 2026 13:38:45 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1768225125; 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=ys5+6Pv96CEpL3J+7vkbOMNf7N4Jr1MWPjATCehI7vI=; b=ezXgeHm8MXoFlfACbg1fHlyoWOT3z0zJ0rMZSlreybTS12rstumPeWmRF/Wnuxx2MXa757 doMNxvSRixjOEpGGZ9dXZA0+vuo2/DHXYAVDBnSKPlf8764UkbuDnL9KCpd8KUwVPPEujZ wsvM35JsNJxxF9Dmc7mVdJN+JegXCGjzMREJpuEMgTCn3g60E9lZsXmP2Wfc/GfoXF9V2+ 6HxO0wboFkfPoOs6TbQUYdkUpeJPiWMB+elRKHlTj1xt46Ezda40cVl2lawETC6wQLSF/m HZQXdiVZ3+f0oQXS8YSH85S5/0jwSX651F+YVfSL2u2cQcumKBLEHuSatMaAcg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1768225125; 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=ys5+6Pv96CEpL3J+7vkbOMNf7N4Jr1MWPjATCehI7vI=; b=ZKVz68nkrFaxpgZFiOYdDVh+dfpoZtDUW1AQicrZi2W2SeexXnZLTENB6xru0AazTMry7o +GdAn8TdiZlSakdpYvIMbWssGQM321cjZjo76iODF5JfIVW1wLXyFrHB+ex3ccgtyglC8C B+xTLPgng6V2HD9KC4Kg9eX5swTImp+Bk23d/BN57hc+aZi9n0IfPjZLs2UjSS7KjC6JvO Zm4WbBsCHRx14vmgjpwdc35vQfiOCz3Dh4HLlsrt6MpJBn4uhV3wgSgdKJjtSsu3ni0fvw wKqZDJtxk2Bx8GrLH+E0dXiyGQyLftyQSfvusIs5gNIDVZ7NB7yZiP/L7ttkgw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1768225125; a=rsa-sha256; cv=none; b=QOEKANoA7xHu+5o1trawoKhod8P5gg/aPo6dupHiGCyidkLaBIOTgfifcUX8CyDNb0NSe2 Bwz1l0Vc5GrIfWGMNx7tdxHXawdLD+VZrArDnIqXouBc78gtOt/UTNzwwgrMxRaoUxzNWR VVU+RjCHmT761Fgh5sAdTnoGNDqEfbaabNtCzmRL6IapL6JHiWx/9GjkgS+PgoE1U+Xq4g SIV9mIcCt0cKz4N5wj5Tufdj4Bman4OzZg1ipxp33oFzg/GsQRqsUM2VU1AVOK58FGVphD NqRoRyadoyKl7IajURzMsNfabQ4Pi33/9n0gZn7JKJNa56e7i5NZvYsN/pcG8A== 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 4dqYPK5b6SzCnv for ; Mon, 12 Jan 2026 13:38:45 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 9633 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Mon, 12 Jan 2026 13:38:45 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Christos Margiolis Subject: git: eccd366b0a8b - main - sound: Replace MIN() with min() 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: eccd366b0a8ba7d902fcf0b1bec447926a75c36c Auto-Submitted: auto-generated Date: Mon, 12 Jan 2026 13:38:45 +0000 Message-Id: <6964f965.9633.74d5f9fd@gitrepo.freebsd.org> The branch main has been updated by christos: URL: https://cgit.FreeBSD.org/src/commit/?id=eccd366b0a8ba7d902fcf0b1bec447926a75c36c commit eccd366b0a8ba7d902fcf0b1bec447926a75c36c Author: Christos Margiolis AuthorDate: 2026-01-12 13:38:39 +0000 Commit: Christos Margiolis CommitDate: 2026-01-12 13:38:39 +0000 sound: Replace MIN() with min() We use min() in most places. No functional change intended. Sponsored by: The FreeBSD Foundation MFC after: 1 week --- sys/dev/sound/midi/midi.c | 10 +++++----- sys/dev/sound/midi/midiq.h | 4 ++-- sys/dev/sound/pci/cs4281.c | 2 +- sys/dev/sound/pci/hdspe-pcm.c | 4 ++-- sys/dev/sound/usb/uaudio.c | 4 ++-- 5 files changed, 12 insertions(+), 12 deletions(-) diff --git a/sys/dev/sound/midi/midi.c b/sys/dev/sound/midi/midi.c index 8c38b00f15ad..4fd0e3dcf134 100644 --- a/sys/dev/sound/midi/midi.c +++ b/sys/dev/sound/midi/midi.c @@ -236,7 +236,7 @@ midi_out(struct snd_midi *m, uint8_t *buf, int size) return (0); } - used = MIN(size, MIDIQ_LEN(m->outq)); + used = min(size, MIDIQ_LEN(m->outq)); if (used) MIDIQ_DEQ(m->outq, buf, used); if (MIDIQ_EMPTY(m->outq)) { @@ -387,8 +387,8 @@ midi_read(struct cdev *i_dev, struct uio *uio, int ioflag) * At this point, it is certain that m->inq has data */ - used = MIN(MIDIQ_LEN(m->inq), uio->uio_resid); - used = MIN(used, MIDI_RSIZE); + used = min(MIDIQ_LEN(m->inq), uio->uio_resid); + used = min(used, MIDI_RSIZE); MIDIQ_DEQ(m->inq, buf, used); mtx_unlock(&m->lock); @@ -456,8 +456,8 @@ midi_write(struct cdev *i_dev, struct uio *uio, int ioflag) * We are certain than data can be placed on the queue */ - used = MIN(MIDIQ_AVAIL(m->outq), uio->uio_resid); - used = MIN(used, MIDI_WSIZE); + used = min(MIDIQ_AVAIL(m->outq), uio->uio_resid); + used = min(used, MIDI_WSIZE); mtx_unlock(&m->lock); retval = uiomove(buf, used, uio); diff --git a/sys/dev/sound/midi/midiq.h b/sys/dev/sound/midi/midiq.h index 80825974283e..8ffa4a40d23d 100644 --- a/sys/dev/sound/midi/midiq.h +++ b/sys/dev/sound/midi/midiq.h @@ -56,7 +56,7 @@ struct name { \ * No protection against overflow, underflow */ #define MIDIQ_ENQ(head, buf, size) do { \ - MIDIQ_MOVE(&(head).b[(head).h], (buf), sizeof(*(head).b) * MIN((size), (head).s - (head).h)); \ + MIDIQ_MOVE(&(head).b[(head).h], (buf), sizeof(*(head).b) * min((size), (head).s - (head).h)); \ if( (head).s - (head).h < (size) ) { \ MIDIQ_MOVE((head).b, (buf) + (head).s - (head).h, sizeof(*(head).b) * ((size) - (head).s + (head).h) ); \ } \ @@ -67,7 +67,7 @@ struct name { \ #define MIDIQ_DEQ_I(head, buf, size, move, update) do { \ if(MIDIQ_FULL(head)) (head).h=(head).t; \ - if (move) MIDIQ_MOVE((buf), &(head).b[(head).t], sizeof(*(head).b) * MIN((size), (head).s - (head).t)); \ + if (move) MIDIQ_MOVE((buf), &(head).b[(head).t], sizeof(*(head).b) * min((size), (head).s - (head).t)); \ if( (head).s - (head).t < (size) ) { \ if (move) MIDIQ_MOVE((buf) + (head).s - (head).t, (head).b, sizeof(*(head).b) * ((size) - (head).s + (head).t) ); \ } \ diff --git a/sys/dev/sound/pci/cs4281.c b/sys/dev/sound/pci/cs4281.c index 5b0b229a021b..eecfc740bb3f 100644 --- a/sys/dev/sound/pci/cs4281.c +++ b/sys/dev/sound/pci/cs4281.c @@ -350,7 +350,7 @@ cs4281chan_setblocksize(kobj_t obj, void *data, u_int32_t blocksize) /* 2 interrupts are possible and used in buffer (half-empty,empty), * hence factor of 2. */ - ch->blksz = MIN(blocksize, sc->bufsz / 2); + ch->blksz = min(blocksize, sc->bufsz / 2); sndbuf_resize(ch->buffer, 2, ch->blksz); ch->dma_setup = 0; adcdac_prog(ch); diff --git a/sys/dev/sound/pci/hdspe-pcm.c b/sys/dev/sound/pci/hdspe-pcm.c index 678693960e5e..0ccdf69c32ee 100644 --- a/sys/dev/sound/pci/hdspe-pcm.c +++ b/sys/dev/sound/pci/hdspe-pcm.c @@ -474,7 +474,7 @@ buffer_mux_port(uint32_t *dma, uint32_t *pcm, uint32_t subset, uint32_t ports, channels = hdspe_channel_count(ports, pcm_width); /* Only copy as much as supported by both hardware and pcm channel. */ - slots = hdspe_port_slot_width(subset, MIN(adat_width, pcm_width)); + slots = hdspe_port_slot_width(subset, min(adat_width, pcm_width)); /* Let the compiler inline and loop unroll common cases. */ if (slots == 2) @@ -520,7 +520,7 @@ buffer_demux_port(uint32_t *dma, uint32_t *pcm, uint32_t subset, uint32_t ports, channels = hdspe_channel_count(ports, pcm_width); /* Only copy as much as supported by both hardware and pcm channel. */ - slots = hdspe_port_slot_width(subset, MIN(adat_width, pcm_width)); + slots = hdspe_port_slot_width(subset, min(adat_width, pcm_width)); /* Let the compiler inline and loop unroll common cases. */ if (slots == 2) diff --git a/sys/dev/sound/usb/uaudio.c b/sys/dev/sound/usb/uaudio.c index 0987ca12d933..7f49bae9ce5e 100644 --- a/sys/dev/sound/usb/uaudio.c +++ b/sys/dev/sound/usb/uaudio.c @@ -150,7 +150,7 @@ SYSCTL_INT(_hw_usb_uaudio, OID_AUTO, debug, CTLFLAG_RWTUN, #define UAUDIO_NCHANBUFS 2 /* number of outstanding request */ #define UAUDIO_RECURSE_LIMIT 255 /* rounds */ #define UAUDIO_BITS_MAX 32 /* maximum sample size in bits */ -#define UAUDIO_CHANNELS_MAX MIN(64, AFMT_CHANNEL_MAX) +#define UAUDIO_CHANNELS_MAX min(64, AFMT_CHANNEL_MAX) #define UAUDIO_MATRIX_MAX 8 /* channels */ #define MAKE_WORD(h,l) (((h) << 8) | (l)) @@ -1651,7 +1651,7 @@ uaudio20_check_rate(struct usb_device *udev, uint8_t iface_no, * buffer. Try using a larger buffer and see if that * helps: */ - rates = MIN(UAUDIO20_MAX_RATES, (255 - 2) / 12); + rates = min(UAUDIO20_MAX_RATES, (255 - 2) / 12); error = USB_ERR_INVAL; } else { rates = UGETW(data);