Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

ALSA: opl3: More constifications

Apply const prefix to the static tables for drum, volume and notes.

Just for minor optimization and no functional changes.

Link: https://lore.kernel.org/r/20200105144823.29547-43-tiwai@suse.de
Signed-off-by: Takashi Iwai <tiwai@suse.de>

+4 -4
+1 -1
sound/drivers/opl3/opl3_drums.c
··· 7 7 8 8 #include "opl3_voice.h" 9 9 10 - static char snd_opl3_drum_table[47] = 10 + static const char snd_opl3_drum_table[47] = 11 11 { 12 12 OPL3_BASSDRUM_ON, OPL3_BASSDRUM_ON, OPL3_HIHAT_ON, /* 35 - 37 */ 13 13 OPL3_SNAREDRUM_ON, OPL3_HIHAT_ON, OPL3_SNAREDRUM_ON, /* 38 - 40 */
+3 -3
sound/drivers/opl3/opl3_midi.c
··· 23 23 * it saves a lot of log() calculations. (Rob Hooft <hooft@chem.ruu.nl>) 24 24 */ 25 25 26 - static char opl3_volume_table[128] = 26 + static const char opl3_volume_table[128] = 27 27 { 28 28 -63, -48, -40, -35, -32, -29, -27, -26, 29 29 -24, -23, -21, -20, -19, -18, -18, -17, ··· 69 69 /* 70 70 * Converts the note frequency to block and fnum values for the FM chip 71 71 */ 72 - static short opl3_note_table[16] = 72 + static const short opl3_note_table[16] = 73 73 { 74 74 305, 323, /* for pitch bending, -2 semitones */ 75 75 343, 363, 385, 408, 432, 458, 485, 514, 544, 577, 611, 647, ··· 266 266 /* ------------------------------ */ 267 267 268 268 269 - static int snd_opl3_oss_map[MAX_OPL3_VOICES] = { 269 + static const int snd_opl3_oss_map[MAX_OPL3_VOICES] = { 270 270 0, 1, 2, 9, 10, 11, 6, 7, 8, 15, 16, 17, 3, 4 ,5, 12, 13, 14 271 271 }; 272 272