public inbox for [email protected]
 help / color / mirror / Atom feed
From: kernel test robot <[email protected]>
To: Takashi Iwai <[email protected]>
Cc: [email protected],
	GNU/Weeb Mailing List <[email protected]>,
	[email protected]
Subject: [ammarfaizi2-block:tiwai/sound/test/ctl-xarray 8/8] sound/core/control.c:390:11: sparse: sparse: incorrect type in assignment (different base types)
Date: Mon, 13 Jun 2022 09:00:14 +0800	[thread overview]
Message-ID: <[email protected]> (raw)

tree:   https://github.com/ammarfaizi2/linux-block tiwai/sound/test/ctl-xarray
head:   4b5b1ae4a0fc499da62080dc54e6492df9a96dd7
commit: 4b5b1ae4a0fc499da62080dc54e6492df9a96dd7 [8/8] ALSA: control: Use xarray for faster lookups
config: arc-randconfig-s031-20220612 (https://download.01.org/0day-ci/archive/20220613/[email protected]/config)
compiler: arceb-elf-gcc (GCC) 11.3.0
reproduce:
        wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
        chmod +x ~/bin/make.cross
        # apt-get install sparse
        # sparse version: v0.6.4-30-g92122700-dirty
        # https://github.com/ammarfaizi2/linux-block/commit/4b5b1ae4a0fc499da62080dc54e6492df9a96dd7
        git remote add ammarfaizi2-block https://github.com/ammarfaizi2/linux-block
        git fetch --no-tags ammarfaizi2-block tiwai/sound/test/ctl-xarray
        git checkout 4b5b1ae4a0fc499da62080dc54e6492df9a96dd7
        # save the config file
        mkdir build_dir && cp config build_dir/.config
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-11.3.0 make.cross C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__' O=build_dir ARCH=arc SHELL=/bin/bash sound/core/

If you fix the issue, kindly add following tag where applicable
Reported-by: kernel test robot <[email protected]>


sparse warnings: (new ones prefixed by >>)
>> sound/core/control.c:390:11: sparse: sparse: incorrect type in assignment (different base types) @@     expected unsigned long h @@     got restricted snd_ctl_elem_iface_t const [usertype] iface @@
   sound/core/control.c:390:11: sparse:     expected unsigned long h
   sound/core/control.c:390:11: sparse:     got restricted snd_ctl_elem_iface_t const [usertype] iface
   sound/core/control.c:926:17: sparse: sparse: restricted snd_ctl_elem_type_t degrades to integer
   sound/core/control.c:926:26: sparse: sparse: restricted snd_ctl_elem_type_t degrades to integer
   sound/core/control.c:927:17: sparse: sparse: restricted snd_ctl_elem_type_t degrades to integer
   sound/core/control.c:927:26: sparse: sparse: restricted snd_ctl_elem_type_t degrades to integer
   sound/core/control.c:946:48: sparse: sparse: restricted snd_ctl_elem_type_t degrades to integer
   sound/core/control.c:1640:40: sparse: sparse: restricted snd_ctl_elem_type_t degrades to integer

vim +390 sound/core/control.c

   378	
   379	#ifdef CONFIG_SND_CTL_FAST_LOOKUP
   380	/* Compute a hash key for the corresponding ctl id
   381	 * It's for the name lookup, hence the numid is excluded.
   382	 * The hash key is bound in LONG_MAX to be used for Xarray key.
   383	 */
   384	#define MULTIPLIER	37
   385	static unsigned long get_ctl_id_hash(const struct snd_ctl_elem_id *id)
   386	{
   387		unsigned long h;
   388		const unsigned char *p;
   389	
 > 390		h = id->iface;
   391		h = MULTIPLIER * h + id->device;
   392		h = MULTIPLIER * h + id->subdevice;
   393		for (p = id->name; *p; p++)
   394			h = MULTIPLIER * h + *p;
   395		h = MULTIPLIER * h + id->index;
   396		h &= LONG_MAX;
   397		return h;
   398	}
   399	

-- 
0-DAY CI Kernel Test Service
https://01.org/lkp

                 reply	other threads:[~2022-06-13  1:00 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 \
    [email protected] \
    [email protected] \
    [email protected] \
    [email protected] \
    [email protected] \
    [email protected] \
    /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