[tiwai-sound:for-next 12/13] sound/pci/hda/patch_ca0132.c:4388:22: sparse: sparse: Using plain integer as NULL pointer

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



tree:   https://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound.git for-next
head:   92f59aeb13252265c20e7aef1379a8080c57e0a2
commit: ed57a3d5a3118b9681de607692608fe573c5959d [12/13] ALSA: hda/ca0132: Enable hardware band EQ for Sound Blaster Core3D
config: i386-randconfig-061-20250610 (https://download.01.org/0day-ci/archive/20250610/202506100842.d8lwwdwU-lkp@xxxxxxxxx/config)
compiler: gcc-11 (Debian 11.3.0-12) 11.3.0
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20250610/202506100842.d8lwwdwU-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/202506100842.d8lwwdwU-lkp@xxxxxxxxx/

sparse warnings: (new ones prefixed by >>)
>> sound/pci/hda/patch_ca0132.c:4388:22: sparse: sparse: Using plain integer as NULL pointer
   sound/pci/hda/patch_ca0132.c:4389:22: sparse: sparse: Using plain integer as NULL pointer

vim +4388 sound/pci/hda/patch_ca0132.c

44f0c9782cc6ab Ian Minett   2012-12-20  4376  
44f0c9782cc6ab Ian Minett   2012-12-20  4377  static int add_tuning_control(struct hda_codec *codec,
44f0c9782cc6ab Ian Minett   2012-12-20  4378  				hda_nid_t pnid, hda_nid_t nid,
44f0c9782cc6ab Ian Minett   2012-12-20  4379  				const char *name, int dir)
44f0c9782cc6ab Ian Minett   2012-12-20  4380  {
975cc02a904ae3 Takashi Iwai 2013-06-28  4381  	char namestr[SNDRV_CTL_ELEM_ID_NAME_MAXLEN];
44f0c9782cc6ab Ian Minett   2012-12-20  4382  	int type = dir ? HDA_INPUT : HDA_OUTPUT;
44f0c9782cc6ab Ian Minett   2012-12-20  4383  	struct snd_kcontrol_new knew =
44f0c9782cc6ab Ian Minett   2012-12-20  4384  		HDA_CODEC_VOLUME_MONO(namestr, nid, 1, 0, type);
44f0c9782cc6ab Ian Minett   2012-12-20  4385  
44f0c9782cc6ab Ian Minett   2012-12-20  4386  	knew.access = SNDRV_CTL_ELEM_ACCESS_READWRITE |
44f0c9782cc6ab Ian Minett   2012-12-20  4387  			SNDRV_CTL_ELEM_ACCESS_TLV_READ;
44f0c9782cc6ab Ian Minett   2012-12-20 @4388  	knew.tlv.c = 0;
44f0c9782cc6ab Ian Minett   2012-12-20  4389  	knew.tlv.p = 0;
44f0c9782cc6ab Ian Minett   2012-12-20  4390  	switch (pnid) {
44f0c9782cc6ab Ian Minett   2012-12-20  4391  	case VOICE_FOCUS:
44f0c9782cc6ab Ian Minett   2012-12-20  4392  		knew.info = voice_focus_ctl_info;
44f0c9782cc6ab Ian Minett   2012-12-20  4393  		knew.get = tuning_ctl_get;
44f0c9782cc6ab Ian Minett   2012-12-20  4394  		knew.put = voice_focus_ctl_put;
44f0c9782cc6ab Ian Minett   2012-12-20  4395  		knew.tlv.p = voice_focus_db_scale;
44f0c9782cc6ab Ian Minett   2012-12-20  4396  		break;
44f0c9782cc6ab Ian Minett   2012-12-20  4397  	case MIC_SVM:
44f0c9782cc6ab Ian Minett   2012-12-20  4398  		knew.info = mic_svm_ctl_info;
44f0c9782cc6ab Ian Minett   2012-12-20  4399  		knew.get = tuning_ctl_get;
44f0c9782cc6ab Ian Minett   2012-12-20  4400  		knew.put = mic_svm_ctl_put;
44f0c9782cc6ab Ian Minett   2012-12-20  4401  		break;
44f0c9782cc6ab Ian Minett   2012-12-20  4402  	case EQUALIZER:
44f0c9782cc6ab Ian Minett   2012-12-20  4403  		knew.info = equalizer_ctl_info;
44f0c9782cc6ab Ian Minett   2012-12-20  4404  		knew.get = tuning_ctl_get;
44f0c9782cc6ab Ian Minett   2012-12-20  4405  		knew.put = equalizer_ctl_put;
44f0c9782cc6ab Ian Minett   2012-12-20  4406  		knew.tlv.p = eq_db_scale;
44f0c9782cc6ab Ian Minett   2012-12-20  4407  		break;
44f0c9782cc6ab Ian Minett   2012-12-20  4408  	default:
44f0c9782cc6ab Ian Minett   2012-12-20  4409  		return 0;
44f0c9782cc6ab Ian Minett   2012-12-20  4410  	}
44f0c9782cc6ab Ian Minett   2012-12-20  4411  	knew.private_value =
44f0c9782cc6ab Ian Minett   2012-12-20  4412  		HDA_COMPOSE_AMP_VAL(nid, 1, 0, type);
44f0c9782cc6ab Ian Minett   2012-12-20  4413  	sprintf(namestr, "%s %s Volume", name, dirstr[dir]);
44f0c9782cc6ab Ian Minett   2012-12-20  4414  	return snd_hda_ctl_add(codec, nid, snd_ctl_new1(&knew, codec));
44f0c9782cc6ab Ian Minett   2012-12-20  4415  }
44f0c9782cc6ab Ian Minett   2012-12-20  4416  

:::::: The code at line 4388 was first introduced by commit
:::::: 44f0c9782cc6ab71ea947f8f710a46f2078a151c ALSA: hda/ca0132: Add tuning controls

:::::: TO: Ian Minett <ian_minett@xxxxxxxxxxxxxxxx>
:::::: CC: Takashi Iwai <tiwai@xxxxxxx>

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



[Index of Archives]     [ALSA User]     [Linux Audio Users]     [Pulse Audio]     [Kernel Archive]     [Asterisk PBX]     [Photo Sharing]     [Linux Sound]     [Video 4 Linux]     [Gimp]     [Yosemite News]

  Powered by Linux