Date: Fri, 24 Apr 2026 22:07:24 +0000 From: Warner Losh <imp@FreeBSD.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org Cc: Raphael 'kena' Poss <knz@thaumogen.net> Subject: git: f31e6b198faa - main - speaker(4): move static data to text Message-ID: <69ebe99c.3fe97.15e89e6@gitrepo.freebsd.org>
index | next in thread | raw e-mail
The branch main has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=f31e6b198faa98c4f8a7b681b4e01218f8468411 commit f31e6b198faa98c4f8a7b681b4e01218f8468411 Author: Raphael 'kena' Poss <knz@thaumogen.net> AuthorDate: 2026-01-11 21:07:35 +0000 Commit: Warner Losh <imp@FreeBSD.org> CommitDate: 2026-04-24 22:04:43 +0000 speaker(4): move static data to text Make this data const (it doesn't change) which will also move it to a text section. Signed-off-by: Raphael Poss <knz@thaumogen.net> Reviewed by: imp Pull Request: https://github.com/freebsd/freebsd-src/pull/1922 --- sys/dev/speaker/spkr.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sys/dev/speaker/spkr.c b/sys/dev/speaker/spkr.c index 1280def98e79..d6ae47fdae99 100644 --- a/sys/dev/speaker/spkr.c +++ b/sys/dev/speaker/spkr.c @@ -158,7 +158,7 @@ struct spkr_state { #define DENOM_MULT 2 /* denominator of dot multiplier */ /* letter to half-tone: A B C D E F G */ -static int notetab[8] = {9, 11, 0, 2, 4, 5, 7}; +static const int notetab[8] = {9, 11, 0, 2, 4, 5, 7}; /* * This is the American Standard A440 Equal-Tempered scale with frequencies @@ -166,7 +166,7 @@ static int notetab[8] = {9, 11, 0, 2, 4, 5, 7}; * our octave 0 is standard octave 2. */ #define OCTAVE_NOTES 12 /* semitones per octave */ -static int pitchtab[] = +static const int pitchtab[] = { /* C C# D D# E F F# G G# A A# B*/ /* 0 */ 65, 69, 73, 78, 82, 87, 93, 98, 103, 110, 117, 123,home | help
Want to link to this message? Use this
URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?69ebe99c.3fe97.15e89e6>
