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

ALSA: nm256: More constifications

Apply const prefix to the static tables coefs and init registers.

Just for minor optimization and no functional changes.

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

+4 -4
+2 -2
sound/pci/nm256/nm256.c
··· 299 299 } 300 300 301 301 static inline void 302 - snd_nm256_write_buffer(struct nm256 *chip, void *src, int offset, int size) 302 + snd_nm256_write_buffer(struct nm256 *chip, const void *src, int offset, int size) 303 303 { 304 304 offset -= chip->buffer_start; 305 305 #ifdef CONFIG_SND_DEBUG ··· 1179 1179 unsigned short value; 1180 1180 }; 1181 1181 1182 - static struct initialValues nm256_ac97_init_val[] = 1182 + static const struct initialValues nm256_ac97_init_val[] = 1183 1183 { 1184 1184 { AC97_MASTER, 0x8000 }, 1185 1185 { AC97_HEADPHONE, 0x8000 },
+2 -2
sound/pci/nm256/nm256_coef.c
··· 1 1 // SPDX-License-Identifier: GPL-2.0 2 2 #define NM_TOTAL_COEFF_COUNT 0x3158 3 3 4 - static char coefficients[NM_TOTAL_COEFF_COUNT * 4] = { 4 + static const char coefficients[NM_TOTAL_COEFF_COUNT * 4] = { 5 5 0xFF, 0xFF, 0x2F, 0x00, 0x4B, 0xFF, 0xA5, 0x01, 0xEF, 0xFC, 0x21, 6 6 0x05, 0x87, 0xF7, 0x62, 0x11, 0xE9, 0x45, 0x5E, 0xF9, 0xB5, 0x01, 7 7 0xDE, 0xFF, 0xA4, 0xFF, 0x60, 0x00, 0xCA, 0xFF, 0x0D, 0x00, 0xFD, ··· 4598 4598 0x01, 0x8D, 0xFF, 0x0F, 0x00 4599 4599 }; 4600 4600 4601 - static u16 4601 + static const u16 4602 4602 coefficient_sizes[8 * 2] = { 4603 4603 /* Playback */ 4604 4604 0x00C0, 0x5000, 0x0060, 0x2800, 0x0040, 0x0060, 0x1400, 0x0000,