Content-Type: multipart/mixed; boundary="===============0097818245528298759==" MIME-Version: 1.0 From: kbuild test robot To: kbuild-all@lists.01.org Subject: Re: [alsa-devel] [PATCH v2 1/2] ALSA: core: add snd_pcm_format_by_name() Date: Sun, 08 Dec 2019 14:39:16 +0800 Message-ID: <201912081414.jnn8qiwO%lkp@intel.com> In-Reply-To: <20191205092129.692520-1-daniel@zonque.org> List-Id: --===============0097818245528298759== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Hi Daniel, I love your patch! Perhaps something to improve: [auto build test WARNING on sound/for-next] [also build test WARNING on asoc/for-next v5.4 next-20191207] [if your patch is applied to the wrong git tree, please drop us a note to h= elp improve the system. BTW, we also suggest to use '--base' option to specify = the base tree in git format-patch, please see https://stackoverflow.com/a/37406= 982] url: https://github.com/0day-ci/linux/commits/Daniel-Mack/ALSA-core-add-= snd_pcm_format_by_name/20191207-084912 base: https://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound.git for= -next reproduce: # apt-get install sparse # sparse version: v0.6.1-91-g817270f-dirty make ARCH=3Dx86_64 allmodconfig make C=3D1 CF=3D'-fdiagnostic-prefix -D__CHECK_ENDIAN__' If you fix the issue, kindly add following tag Reported-by: kbuild test robot sparse warnings: (new ones prefixed by >>) >> sound/core/pcm.c:243:33: sparse: sparse: incorrect type in assignment (d= ifferent base types) @@ expected restricted snd_pcm_format_t [usertype] = @@ got t_t [usertype] @@ >> sound/core/pcm.c:243:33: sparse: expected restricted snd_pcm_format_t= [usertype] >> sound/core/pcm.c:243:33: sparse: got int [assigned] i sound/core/pcm.c:1022:9: sparse: sparse: context imbalance in 'snd_pcm_d= etach_substream' - different lock contexts for basic block vim +243 sound/core/pcm.c 227 = 228 /** 229 * snd_pcm_format_by_name - Return the PCM format code for the given= name 230 * @name: PCM format name ('S16_LE', 'S24_3LE', ...) 231 * @format: Pointer to returned PCM format code 232 * 233 * The string comparison is done in a case-insensitive way. 234 * 235 * Return: 0 on success, or -ENOENT if the given format is not valid. 236 */ 237 int snd_pcm_format_by_name(const char *name, snd_pcm_format_t *forma= t) 238 { 239 int i; 240 = 241 for (i =3D 0; i < ARRAY_SIZE(snd_pcm_format_names); i++) 242 if (strcasecmp(name, snd_pcm_format_names[i]) =3D=3D 0) { > 243 *format =3D i; 244 return 0; 245 } 246 = 247 return -ENOENT; 248 } 249 EXPORT_SYMBOL_GPL(snd_pcm_format_by_name); 250 = --- 0-DAY kernel test infrastructure Open Source Technology Cen= ter https://lists.01.org/hyperkitty/list/kbuild-all(a)lists.01.org Intel Corpor= ation --===============0097818245528298759==--