sound/core/jack.c:632:15: warning: variable 'mask_bits' set but not used

From: kernel test robot
Date: Wed Jun 02 2021 - 16:02:03 EST

tree: master
head: 231bc539066760aaa44d46818c85b14ca2f56d9f
commit: 2d670ea2bd53a9792f453bb5b97cb8ef695988ff ALSA: jack: implement software jack injection via debugfs
date: 4 months ago
config: powerpc64-randconfig-r004-20210601 (attached as .config)
compiler: clang version 13.0.0 ( d41cb6bb2607fa5c7a9df2b3dab361353657d225)
reproduce (this is a W=1 build):
wget -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# install powerpc64 cross compiling tool for clang build
# apt-get install binutils-powerpc64-linux-gnu
git remote add linus
git fetch --no-tags linus master
git checkout 2d670ea2bd53a9792f453bb5b97cb8ef695988ff
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross ARCH=powerpc64

If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@xxxxxxxxx>

All warnings (new ones prefixed by >>):

In file included from sound/core/jack.c:8:
In file included from include/linux/input.h:8:
In file included from include/linux/time.h:6:
In file included from include/linux/math64.h:7:
In file included from ./arch/powerpc/include/generated/asm/div64.h:1:
In file included from include/asm-generic/div64.h:53:
In file included from include/linux/log2.h:12:
In file included from include/linux/bitops.h:32:
In file included from arch/powerpc/include/asm/bitops.h:62:
arch/powerpc/include/asm/barrier.h:49:9: warning: '__lwsync' macro redefined [-Wmacro-redefined]
#define __lwsync() __asm__ __volatile__ (stringify_in_c(LWSYNC) : : :"memory")
<built-in>:308:9: note: previous definition is here
#define __lwsync __builtin_ppc_lwsync
>> sound/core/jack.c:632:15: warning: variable 'mask_bits' set but not used [-Wunused-but-set-variable]
unsigned int mask_bits = 0;
2 warnings generated.

Kconfig warnings: (for reference only)
WARNING: unmet direct dependencies detected for ATA
Depends on HAS_IOMEM && BLOCK
Selected by
- AKEBONO && PPC_47x
WARNING: unmet direct dependencies detected for NETDEVICES
Depends on NET
Selected by
- AKEBONO && PPC_47x
WARNING: unmet direct dependencies detected for ETHERNET
Depends on NETDEVICES && NET
Selected by
- AKEBONO && PPC_47x

vim +/mask_bits +632 sound/core/jack.c

623 /**
624 * snd_jack_report - Report the current status of a jack
625 *
626 * @jack: The jack to report status for
627 * @status: The current status of the jack
628 */
629 void snd_jack_report(struct snd_jack *jack, int status)
630 {
631 struct snd_jack_kctl *jack_kctl;
> 632 unsigned int mask_bits = 0;
634 int i;
635 #endif
637 if (!jack)
638 return;
640 jack->hw_status_cache = status;
642 list_for_each_entry(jack_kctl, &jack->kctl_list, list)
643 if (jack_kctl->sw_inject_enable)
644 mask_bits |= jack_kctl->mask_bits;
645 else
646 snd_kctl_jack_report(jack->card, jack_kctl->kctl,
647 status & jack_kctl->mask_bits);

0-DAY CI Kernel Test Service, Intel Corporation

Attachment: .config.gz
Description: application/gzip