[tiwai-sound:topic/midi20 13/36] sound/core/ump.c:608:15: warning: variable 'info_flags' set but not used
tree: https://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound.git topic/midi20 head: 9e08987ec08f99983e56b33fa1762a57b6216b2a commit: 3a425eaae00098e9fe5d6a5eaaac1760f15f0fa8 [13/36] ALSA: ump: Add legacy raw MIDI support config: hexagon-allmodconfig compiler: clang version 17.0.0 (https://github.com/llvm/llvm-project b0fb98227c90adf2536c9ad644a74d5e92961111) reproduce (this is a W=1 build): wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross chmod +x ~/bin/make.cross # https://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound.git/commit/?id=3... git remote add tiwai-sound https://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound.git git fetch --no-tags tiwai-sound topic/midi20 git checkout 3a425eaae00098e9fe5d6a5eaaac1760f15f0fa8 # save the config file mkdir build_dir && cp config build_dir/.config COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross W=1 O=build_dir ARCH=hexagon olddefconfig COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross W=1 O=build_dir ARCH=hexagon SHELL=/bin/bash drivers/tty/serial/ sound/core/
If you fix the issue, kindly add following tag where applicable | Reported-by: kernel test robot lkp@intel.com | Closes: https://lore.kernel.org/oe-kbuild-all/202305211419.wjYDzRY7-lkp@intel.com/
All warnings (new ones prefixed by >>):
In file included from sound/core/ump.c:12: In file included from include/sound/rawmidi.h:11: In file included from include/linux/interrupt.h:11: In file included from include/linux/hardirq.h:11: In file included from ./arch/hexagon/include/generated/asm/hardirq.h:1: In file included from include/asm-generic/hardirq.h:17: In file included from include/linux/irq.h:20: In file included from include/linux/io.h:13: In file included from arch/hexagon/include/asm/io.h:334: include/asm-generic/io.h:547:31: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic] val = __raw_readb(PCI_IOBASE + addr); ~~~~~~~~~~ ^ include/asm-generic/io.h:560:61: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic] val = __le16_to_cpu((__le16 __force)__raw_readw(PCI_IOBASE + addr)); ~~~~~~~~~~ ^ include/uapi/linux/byteorder/little_endian.h:37:51: note: expanded from macro '__le16_to_cpu' #define __le16_to_cpu(x) ((__force __u16)(__le16)(x)) ^ In file included from sound/core/ump.c:12: In file included from include/sound/rawmidi.h:11: In file included from include/linux/interrupt.h:11: In file included from include/linux/hardirq.h:11: In file included from ./arch/hexagon/include/generated/asm/hardirq.h:1: In file included from include/asm-generic/hardirq.h:17: In file included from include/linux/irq.h:20: In file included from include/linux/io.h:13: In file included from arch/hexagon/include/asm/io.h:334: include/asm-generic/io.h:573:61: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic] val = __le32_to_cpu((__le32 __force)__raw_readl(PCI_IOBASE + addr)); ~~~~~~~~~~ ^ include/uapi/linux/byteorder/little_endian.h:35:51: note: expanded from macro '__le32_to_cpu' #define __le32_to_cpu(x) ((__force __u32)(__le32)(x)) ^ In file included from sound/core/ump.c:12: In file included from include/sound/rawmidi.h:11: In file included from include/linux/interrupt.h:11: In file included from include/linux/hardirq.h:11: In file included from ./arch/hexagon/include/generated/asm/hardirq.h:1: In file included from include/asm-generic/hardirq.h:17: In file included from include/linux/irq.h:20: In file included from include/linux/io.h:13: In file included from arch/hexagon/include/asm/io.h:334: include/asm-generic/io.h:584:33: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic] __raw_writeb(value, PCI_IOBASE + addr); ~~~~~~~~~~ ^ include/asm-generic/io.h:594:59: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic] __raw_writew((u16 __force)cpu_to_le16(value), PCI_IOBASE + addr); ~~~~~~~~~~ ^ include/asm-generic/io.h:604:59: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic] __raw_writel((u32 __force)cpu_to_le32(value), PCI_IOBASE + addr); ~~~~~~~~~~ ^
sound/core/ump.c:608:15: warning: variable 'info_flags' set but not used [-Wunused-but-set-variable]
unsigned int info_flags = SNDRV_RAWMIDI_INFO_UMP; ^ 7 warnings generated.
vim +/info_flags +608 sound/core/ump.c
604 605 int snd_ump_attach_legacy_rawmidi(struct snd_ump_endpoint *ump, 606 char *id, int device) 607 {
608 unsigned int info_flags = SNDRV_RAWMIDI_INFO_UMP;
609 struct snd_rawmidi *rmidi; 610 bool input, output; 611 int err; 612 613 err = snd_ump_convert_init(ump); 614 if (err < 0) 615 return err; 616 617 input = ump->core.info_flags & SNDRV_RAWMIDI_INFO_INPUT; 618 output = ump->core.info_flags & SNDRV_RAWMIDI_INFO_OUTPUT; 619 if (input) 620 info_flags |= SNDRV_RAWMIDI_INFO_INPUT; 621 if (output) 622 info_flags |= SNDRV_RAWMIDI_INFO_OUTPUT; 623 if (input && output) 624 info_flags |= SNDRV_RAWMIDI_INFO_DUPLEX; 625 626 err = snd_rawmidi_new(ump->core.card, id, device, 627 output ? 16 : 0, input ? 16 : 0, 628 &rmidi); 629 if (err < 0) { 630 snd_ump_convert_free(ump); 631 return err; 632 } 633 634 if (input) 635 snd_rawmidi_set_ops(rmidi, SNDRV_RAWMIDI_STREAM_INPUT, 636 &snd_ump_legacy_input_ops); 637 if (output) 638 snd_rawmidi_set_ops(rmidi, SNDRV_RAWMIDI_STREAM_OUTPUT, 639 &snd_ump_legacy_output_ops); 640 rmidi->info_flags = ump->core.info_flags & ~SNDRV_RAWMIDI_INFO_UMP; 641 rmidi->ops = &snd_ump_legacy_ops; 642 rmidi->private_data = ump; 643 ump->legacy_rmidi = rmidi; 644 ump_dbg(ump, "Created a legacy rawmidi #%d (%s)\n", device, id); 645 return 0; 646 } 647 EXPORT_SYMBOL_GPL(snd_ump_attach_legacy_rawmidi); 648 #endif /* CONFIG_SND_UMP_LEGACY_RAWMIDI */ 649
participants (1)
-
kernel test robot