From nobody Wed Jul 10 16:49:02 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 4WK3jB5QNhz5QmpG; Wed, 10 Jul 2024 16:49:02 +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 "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4WK3jB4Y40z4gPK; Wed, 10 Jul 2024 16:49:02 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1720630142; 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=rnhQaF2LWQ+Zh9BNAwu38v4+D3lJE2sR46EFUHB7ciU=; b=NTFx2dlYH+w6yNr4OtwVnuAzdL8vhhDOjKROaTMJijYcsaYaU2CrOt9hsuDc5EyOHcXZG0 Q+6wFL7xihuvvaLfE6W1Iha03PPbKuwQzIFa/1u4xUvoDRbhlur2Ys7r5E2S5NwylWwvha Q1jk62RBiIdT2I8zu9iU5hxyY5PrICu/j7PYGOuBlNcsKgssKA9NURK8Dysxk+xF3YwiIP QYBUlaA8QvRR5RM2PCS5XFLK2fCj0Cy7KBJ0QV4qvKJXYaI2ewpc2hDC7rN+qXD6BoATwV Ae1N8t2tqdum43W+NVqb0RqmrzrIc4TMP1QTgjTNSFIoXcQ1aXcpFQbr1CLoeg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1720630142; a=rsa-sha256; cv=none; b=E53uitltG6WoOvhlxmHFzRsmR3kWEghgQrZmQId6tK6JcaW2uDL5l4nSCCuiLlIu00ddVs SDBcRjsaH3cmVFYwFyg6pyjukCG4Xg3Oz3RE+izPdQHEMrPTXLSm2Ej5kWEnZn85WBRfBW hM+jA1MSU8wj690tzD6lB6hwvvb7TLLYUU0CI/1acKtE2hzfhz/qB2JJ/eoBxEqjj9yyW3 Ae/akJLlmLPAgXqp26JEjklSRZVSz4k3kFiF+zsCqT8KtG7yCueX5ymGJOIHfbFy3OkwqB GE1+lHQwszNPj+a/UM/HHP7AJSxxOrbcmtu0Ub/UJPUAfRr0yuvYE+tbfkY8bg== 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=1720630142; 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=rnhQaF2LWQ+Zh9BNAwu38v4+D3lJE2sR46EFUHB7ciU=; b=T+tlYR3ACnoTJxgXh0ZE8IOpwxNq1xpJIKINz70zgs053MNGVLyfGiTEO6R3+nkLCUcsvL /Nt9Tb3QcwVPFQPL2xndE3MF3eGTGWTBMjVORRquj0VBYI7yWjfFh0EF/0bvQaZHDT89Tq 3LWJwGDSywEPhWs7TXMDcBW6GI/gBohXRRH9UCixL8Eu0xwYAYx8pzuMft8r9i2VVHcwFK YtMWmB1sTmFxYJapYFXW5vaJuKPw4FznYmqhzcVRXuRmyklla+buJjJgNYosLP+7ZVw3AL UsJSvXz2p1UQanQb2kffUHmy4Ktlii04IKpZqyhhHhhMpNxkviJI8m5/Hvl3Lw== 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 4WK3jB49RdzPYT; Wed, 10 Jul 2024 16:49:02 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 46AGn2fh034812; Wed, 10 Jul 2024 16:49:02 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 46AGn2R6034809; Wed, 10 Jul 2024 16:49:02 GMT (envelope-from git) Date: Wed, 10 Jul 2024 16:49:02 GMT Message-Id: <202407101649.46AGn2R6034809@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Christos Margiolis Subject: git: 2baf2b2f1042 - stable/14 - sound: Remove MIDI_TYPE 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/stable/14 X-Git-Reftype: branch X-Git-Commit: 2baf2b2f104235118d065a2bffba41d3f7bf54af Auto-Submitted: auto-generated The branch stable/14 has been updated by christos: URL: https://cgit.FreeBSD.org/src/commit/?id=2baf2b2f104235118d065a2bffba41d3f7bf54af commit 2baf2b2f104235118d065a2bffba41d3f7bf54af Author: Christos Margiolis AuthorDate: 2024-07-06 18:22:31 +0000 Commit: Christos Margiolis CommitDate: 2024-07-10 16:48:12 +0000 sound: Remove MIDI_TYPE No good reason to have this. It only makes things harder to read. Sponsored by: The FreeBSD Foundation MFC after: 2 days Reviewed by: dev_submerge.ch, markj Differential Revision: https://reviews.freebsd.org/D45773 (cherry picked from commit 526bd1d87ec997e1c090262da6f2d9b6da0e8f89) --- sys/dev/sound/midi/midi.c | 12 ++++++------ sys/dev/sound/midi/midi.h | 6 ++---- sys/dev/sound/midi/mpu401.c | 2 +- 3 files changed, 9 insertions(+), 11 deletions(-) diff --git a/sys/dev/sound/midi/midi.c b/sys/dev/sound/midi/midi.c index dab8fe559a0d..21b319a5f18f 100644 --- a/sys/dev/sound/midi/midi.c +++ b/sys/dev/sound/midi/midi.c @@ -282,7 +282,7 @@ midi_init(kobj_class_t cls, int unit, int channel, void *cookie) struct snd_midi *m; int i; int inqsize, outqsize; - MIDI_TYPE *buf; + uint8_t *buf; MIDI_DEBUG(1, printf("midiinit: unit %d/%d.\n", unit, channel)); sx_xlock(&midistat_lock); @@ -331,14 +331,14 @@ midi_init(kobj_class_t cls, int unit, int channel, void *cookie) mtx_lock(&m->qlock); if (inqsize) - buf = malloc(sizeof(MIDI_TYPE) * inqsize, M_MIDI, M_NOWAIT); + buf = malloc(sizeof(uint8_t) * inqsize, M_MIDI, M_NOWAIT); else buf = NULL; MIDIQ_INIT(m->inq, buf, inqsize); if (outqsize) - buf = malloc(sizeof(MIDI_TYPE) * outqsize, M_MIDI, M_NOWAIT); + buf = malloc(sizeof(uint8_t) * outqsize, M_MIDI, M_NOWAIT); else buf = NULL; m->hiwat = outqsize / 2; @@ -449,12 +449,12 @@ static int midi_lengths[] = {2, 2, 2, 2, 1, 1, 2, 0}; #define MIDI_SYSEX_END 0xF7 int -midi_in(struct snd_midi *m, MIDI_TYPE *buf, int size) +midi_in(struct snd_midi *m, uint8_t *buf, int size) { /* int i, sig, enq; */ int used; - /* MIDI_TYPE data; */ + /* uint8_t data; */ MIDI_DEBUG(5, printf("midi_in: m=%p size=%d\n", m, size)); /* @@ -579,7 +579,7 @@ midi_in(struct snd_midi *m, MIDI_TYPE *buf, int size) * midi_out: The only clearer of the M_TXEN flag. */ int -midi_out(struct snd_midi *m, MIDI_TYPE *buf, int size) +midi_out(struct snd_midi *m, uint8_t *buf, int size) { int used; diff --git a/sys/dev/sound/midi/midi.h b/sys/dev/sound/midi/midi.h index b200eed9bc74..afbfdfa6abbc 100644 --- a/sys/dev/sound/midi/midi.h +++ b/sys/dev/sound/midi/midi.h @@ -39,8 +39,6 @@ MALLOC_DECLARE(M_MIDI); #define M_RXEN 0x04 #define M_TXEN 0x08 -#define MIDI_TYPE unsigned char - extern struct sx midistat_lock; struct snd_midi; @@ -48,8 +46,8 @@ struct snd_midi; struct snd_midi * midi_init(kobj_class_t _mpu_cls, int _unit, int _channel, void *cookie); int midi_uninit(struct snd_midi *_m); -int midi_out(struct snd_midi *_m, MIDI_TYPE *_buf, int _size); -int midi_in(struct snd_midi *_m, MIDI_TYPE *_buf, int _size); +int midi_out(struct snd_midi *_m, uint8_t *_buf, int _size); +int midi_in(struct snd_midi *_m, uint8_t *_buf, int _size); kobj_t midimapper_addseq(void *arg1, int *unit, void **cookie); int midimapper_open_locked(void *arg1, void **cookie); diff --git a/sys/dev/sound/midi/mpu401.c b/sys/dev/sound/midi/mpu401.c index 1152c117f7f6..8a97016b27c7 100644 --- a/sys/dev/sound/midi/mpu401.c +++ b/sys/dev/sound/midi/mpu401.c @@ -119,7 +119,7 @@ static int mpu401_intr(struct mpu401 *m) { #define MPU_INTR_BUF 16 - MIDI_TYPE b[MPU_INTR_BUF]; + uint8_t b[MPU_INTR_BUF]; int i; int s;