From: kernel test robot <lkp@intel.com>
To: Takashi Iwai <tiwai@suse.de>
Cc: llvm@lists.linux.dev, oe-kbuild-all@lists.linux.dev,
alsa-devel@alsa-project.org
Subject: [tiwai-sound:test/guard 44/62] sound/core/oss/mixer_oss.c:819:3: error: cannot jump from this goto statement to its label
Date: Fri, 23 Feb 2024 12:47:02 +0800 [thread overview]
Message-ID: <202402231259.Tx6bs1or-lkp@intel.com> (raw)
Hi Takashi,
FYI, the error/warning was bisected to this commit, please ignore it if it's irrelevant.
tree: https://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound.git test/guard
head: e4545d528ae658c35d02593567613c06f1386ffa
commit: b398454ce784b8a931d9fe80a0c1fb9dec644d29 [44/62] ALSA: mixer_oss: Use guard() for locking
config: hexagon-allmodconfig (https://download.01.org/0day-ci/archive/20240223/202402231259.Tx6bs1or-lkp@intel.com/config)
compiler: clang version 19.0.0git (https://github.com/llvm/llvm-project edd4aee4dd9b5b98b2576a6f783e4086173d902a)
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20240223/202402231259.Tx6bs1or-lkp@intel.com/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@intel.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202402231259.Tx6bs1or-lkp@intel.com/
All errors (new ones prefixed by >>):
>> sound/core/oss/mixer_oss.c:819:3: error: cannot jump from this goto statement to its label
819 | goto error;
| ^
sound/core/oss/mixer_oss.c:821:2: note: jump bypasses initialization of variable with __attribute__((cleanup))
821 | guard(rwsem_read)(&card->controls_rwsem);
| ^
include/linux/cleanup.h:164:15: note: expanded from macro 'guard'
164 | CLASS(_name, __UNIQUE_ID(guard))
| ^
include/linux/compiler.h:180:29: note: expanded from macro '__UNIQUE_ID'
180 | #define __UNIQUE_ID(prefix) __PASTE(__PASTE(__UNIQUE_ID_, prefix), __COUNTER__)
| ^
include/linux/compiler_types.h:84:22: note: expanded from macro '__PASTE'
84 | #define __PASTE(a,b) ___PASTE(a,b)
| ^
include/linux/compiler_types.h:83:23: note: expanded from macro '___PASTE'
83 | #define ___PASTE(a,b) a##b
| ^
<scratch space>:36:1: note: expanded from here
36 | __UNIQUE_ID_guard239
| ^
sound/core/oss/mixer_oss.c:870:3: error: cannot jump from this goto statement to its label
870 | goto error;
| ^
sound/core/oss/mixer_oss.c:872:2: note: jump bypasses initialization of variable with __attribute__((cleanup))
872 | guard(rwsem_read)(&card->controls_rwsem);
| ^
include/linux/cleanup.h:164:15: note: expanded from macro 'guard'
164 | CLASS(_name, __UNIQUE_ID(guard))
| ^
include/linux/compiler.h:180:29: note: expanded from macro '__UNIQUE_ID'
180 | #define __UNIQUE_ID(prefix) __PASTE(__PASTE(__UNIQUE_ID_, prefix), __COUNTER__)
| ^
include/linux/compiler_types.h:84:22: note: expanded from macro '__PASTE'
84 | #define __PASTE(a,b) ___PASTE(a,b)
| ^
include/linux/compiler_types.h:83:23: note: expanded from macro '___PASTE'
83 | #define ___PASTE(a,b) a##b
| ^
<scratch space>:45:1: note: expanded from here
45 | __UNIQUE_ID_guard240
| ^
2 errors generated.
vim +819 sound/core/oss/mixer_oss.c
803
804 static int snd_mixer_oss_get_recsrc2(struct snd_mixer_oss_file *fmixer, unsigned int *active_index)
805 {
806 struct snd_card *card = fmixer->card;
807 struct snd_mixer_oss *mixer = fmixer->mixer;
808 struct snd_kcontrol *kctl;
809 struct snd_mixer_oss_slot *pslot;
810 struct slot *slot;
811 struct snd_ctl_elem_info *uinfo;
812 struct snd_ctl_elem_value *uctl;
813 int err, idx;
814
815 uinfo = kzalloc(sizeof(*uinfo), GFP_KERNEL);
816 uctl = kzalloc(sizeof(*uctl), GFP_KERNEL);
817 if (uinfo == NULL || uctl == NULL) {
818 err = -ENOMEM;
> 819 goto error;
820 }
821 guard(rwsem_read)(&card->controls_rwsem);
822 kctl = snd_mixer_oss_test_id(mixer, "Capture Source", 0);
823 if (! kctl) {
824 err = -ENOENT;
825 goto error;
826 }
827 err = kctl->info(kctl, uinfo);
828 if (err < 0)
829 goto error;
830 err = kctl->get(kctl, uctl);
831 if (err < 0)
832 goto error;
833 for (idx = 0; idx < 32; idx++) {
834 if (!(mixer->mask_recsrc & (1 << idx)))
835 continue;
836 pslot = &mixer->slots[idx];
837 slot = pslot->private_data;
838 if (slot->signature != SNDRV_MIXER_OSS_SIGNATURE)
839 continue;
840 if (!(slot->present & SNDRV_MIXER_OSS_PRESENT_CAPTURE))
841 continue;
842 if (slot->capture_item == uctl->value.enumerated.item[0]) {
843 *active_index = idx;
844 break;
845 }
846 }
847 err = 0;
848 error:
849 kfree(uctl);
850 kfree(uinfo);
851 return err;
852 }
853
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
reply other threads:[~2024-02-23 4:47 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=202402231259.Tx6bs1or-lkp@intel.com \
--to=lkp@intel.com \
--cc=alsa-devel@alsa-project.org \
--cc=llvm@lists.linux.dev \
--cc=oe-kbuild-all@lists.linux.dev \
--cc=tiwai@suse.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox