sound/usb/usx2y/us144mkii.c:27:12: warning: 'index' defined but not used

From: kernel test robot

Date: Thu Feb 12 2026 - 06:10:35 EST


Hi Šerif,

First bad commit (maybe != root cause):

tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: 37a93dd5c49b5fda807fd204edf2547c3493319c
commit: 0ec417aa85467c6fad0563621b74868be0faf00d ALSA: usb-audio: Add infrastructure for TASCAM US-144MKII
date: 6 months ago
config: loongarch-randconfig-r133-20260212 (https://download.01.org/0day-ci/archive/20260212/202602121917.O39hNVas-lkp@xxxxxxxxx/config)
compiler: loongarch64-linux-gcc (GCC) 12.5.0
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20260212/202602121917.O39hNVas-lkp@xxxxxxxxx/reproduce)

If you fix the issue in a separate patch/commit (i.e. not just a new version of
the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <lkp@xxxxxxxxx>
| Closes: https://lore.kernel.org/oe-kbuild-all/202602121917.O39hNVas-lkp@xxxxxxxxx/

All warnings (new ones prefixed by >>):

In file included from include/linux/irqflags.h:19,
from include/linux/spinlock.h:59,
from include/linux/kfifo.h:40,
from sound/usb/usx2y/us144mkii.h:7,
from sound/usb/usx2y/us144mkii.c:7:
arch/loongarch/include/asm/percpu.h:20:4: error: #error compiler support for the model attribute is necessary when a recent assembler is used
20 | # error compiler support for the model attribute is necessary when a recent assembler is used
| ^~~~~
>> sound/usb/usx2y/us144mkii.c:27:12: warning: 'index' defined but not used [-Wunused-variable]
27 | static int index[SNDRV_CARDS] = SNDRV_DEFAULT_IDX;
| ^~~~~


vim +/index +27 sound/usb/usx2y/us144mkii.c

dee1bcf28a3dd1 Šerif Rami 2025-08-14 12
dee1bcf28a3dd1 Šerif Rami 2025-08-14 13 /**
dee1bcf28a3dd1 Šerif Rami 2025-08-14 14 * @brief Module parameters for ALSA card instantiation.
dee1bcf28a3dd1 Šerif Rami 2025-08-14 15 *
dee1bcf28a3dd1 Šerif Rami 2025-08-14 16 * These parameters allow users to configure how the ALSA sound card
dee1bcf28a3dd1 Šerif Rami 2025-08-14 17 * for the TASCAM US-144MKII is instantiated.
dee1bcf28a3dd1 Šerif Rami 2025-08-14 18 *
dee1bcf28a3dd1 Šerif Rami 2025-08-14 19 * @param index: Array of integers specifying the ALSA card index for each
dee1bcf28a3dd1 Šerif Rami 2025-08-14 20 * device. Defaults to -1 (automatic).
dee1bcf28a3dd1 Šerif Rami 2025-08-14 21 * @param id: Array of strings specifying the ALSA card ID for each device.
dee1bcf28a3dd1 Šerif Rami 2025-08-14 22 * Defaults to "US144MKII".
dee1bcf28a3dd1 Šerif Rami 2025-08-14 23 * @param enable: Array of booleans to enable or disable each device.
dee1bcf28a3dd1 Šerif Rami 2025-08-14 24 * Defaults to {1, 0, ..., 0} (first device enabled).
5c8c10796e274d Šerif Rami 2025-08-14 25 * @param dev_idx: Internal counter for the number of TASCAM devices probed.
dee1bcf28a3dd1 Šerif Rami 2025-08-14 26 */
dee1bcf28a3dd1 Šerif Rami 2025-08-14 @27 static int index[SNDRV_CARDS] = SNDRV_DEFAULT_IDX;
dee1bcf28a3dd1 Šerif Rami 2025-08-14 28 static char *id[SNDRV_CARDS] = SNDRV_DEFAULT_STR;
dee1bcf28a3dd1 Šerif Rami 2025-08-14 29 static bool enable[SNDRV_CARDS] = { 1, [1 ...(SNDRV_CARDS - 1)] = 0 };
dee1bcf28a3dd1 Šerif Rami 2025-08-14 30 static int dev_idx;
dee1bcf28a3dd1 Šerif Rami 2025-08-14 31

:::::: The code at line 27 was first introduced by commit
:::::: dee1bcf28a3dd13ddb2e9200407864f73e9c4d63 ALSA: usb-audio: Add initial driver for TASCAM US-144MKII

:::::: TO: Šerif Rami <ramiserifpersia@xxxxxxxxx>
:::::: CC: Takashi Iwai <tiwai@xxxxxxx>

--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki