Content-Type: multipart/mixed; boundary="===============2784584818131501846==" MIME-Version: 1.0 From: Vineet Gupta To: kbuild-all@lists.01.org Subject: Re: [PATCH v2 11/15] ASoC: Intel: avs: Machine board registration Date: Fri, 13 May 2022 19:49:54 -0700 Message-ID: In-Reply-To: List-Id: --===============2784584818131501846== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable On 5/9/22 18:08, Amadeusz S=C5=82awi=C5=84ski wrote: > On 5/9/2022 1:58 PM, kernel test robot wrote: >> Hi Cezary, >> >> I love your patch! Perhaps something to improve: >> >> [auto build test WARNING on broonie-sound/for-next] >> [also build test WARNING on next-20220506] >> [cannot apply to tiwai-sound/for-next v5.18-rc6] >> [If your patch is applied to the wrong git tree, kindly drop us a note. >> And when submitting patch, we suggest to use '--base' as documented in >> https://git-scm.com/docs/git-format-patch] >> >> url: = >> https://github.com/intel-lab-lkp/linux/commits/Cezary-Rojewski/ASoC-Inte= l-avs-Driver-core-and-PCM-operations/20220509-165656 >> base: = >> https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git = >> for-next >> config: arc-allyesconfig = >> (https://download.01.org/0day-ci/archive/20220509/202205091954.7hT2TBhd-= lkp(a)intel.com/config) >> compiler: arceb-elf-gcc (GCC) 11.3.0 >> reproduce (this is a W=3D1 build): >> =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 wget = >> https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross = >> -O ~/bin/make.cross >> =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 chmod +x ~/bin/make.cro= ss >> =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 # = >> https://github.com/intel-lab-lkp/linux/commit/2ef25400a7aee5a8e75c2ccdb5= 618be31c9f6809 >> =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 git remote add linux-re= view = >> https://github.com/intel-lab-lkp/linux >> =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 git fetch --no-tags lin= ux-review = >> Cezary-Rojewski/ASoC-Intel-avs-Driver-core-and-PCM-operations/20220509-1= 65656 >> =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 git checkout 2ef25400a7= aee5a8e75c2ccdb5618be31c9f6809 >> =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 # save the config file >> =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 mkdir build_dir && cp c= onfig build_dir/.config >> =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 COMPILER_INSTALL_PATH= =3D$HOME/0day COMPILER=3Dgcc-11.3.0 = >> make.cross W=3D1 O=3Dbuild_dir ARCH=3Darc SHELL=3D/bin/bash sound/soc/in= tel/avs/ >> >> If you fix the issue, kindly add following tag as appropriate >> Reported-by: kernel test robot >> >> All warnings (new ones prefixed by >>): >> >> =C2=A0=C2=A0=C2=A0 In file included from include/linux/device.h:15, >> =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 from include/linux/acpi.h:= 15, >> =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 from sound/soc/intel/avs/b= oard_selection.c:9: >> =C2=A0=C2=A0=C2=A0 sound/soc/intel/avs/board_selection.c: In function = >> 'avs_register_i2s_board': >>>> sound/soc/intel/avs/board_selection.c:328:36: warning: format '%ld' = >>>> expects argument of type 'long int', but argument 5 has type 'int' = >>>> [-Wformat=3D] >> =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 328 |=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 dev_err(adev->= dev, "Platform supports %d = >> SSPs but board %s requires SSP%ld\n", >> =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 | ^~~~~~~~~~~~~~~= ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ >> =C2=A0=C2=A0=C2=A0 include/linux/dev_printk.h:110:30: note: in definitio= n of macro = >> 'dev_printk_index_wrap' >> =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 110 |=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 _p_func(dev, f= mt, = >> ##__VA_ARGS__);=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= \ >> =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 |=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0 ^~~ >> =C2=A0=C2=A0=C2=A0 include/linux/dev_printk.h:144:56: note: in expansion= of macro = >> 'dev_fmt' >> =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 144 |=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0 dev_printk_index_wrap(_dev_err, KERN_ERR, dev, = >> dev_fmt(fmt), ##__VA_ARGS__) >> |=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 ^~~~~~~ >> =C2=A0=C2=A0=C2=A0 sound/soc/intel/avs/board_selection.c:328:17: note: i= n expansion = >> of macro 'dev_err' >> =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 328 |=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 dev_err(adev->= dev, "Platform supports %d = >> SSPs but board %s requires SSP%ld\n", >> =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 |=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0 ^~~~~~~ >> =C2=A0=C2=A0=C2=A0 sound/soc/intel/avs/board_selection.c:328:90: note: f= ormat string = >> is defined here >> =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 328 |=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 dev_err(adev->= dev, "Platform supports %d = >> SSPs but board %s requires SSP%ld\n", >> | ~~^ >> | | >> | long int >> | %d >> >> >> vim +328 sound/soc/intel/avs/board_selection.c >> >> =C2=A0=C2=A0=C2=A0 318 >> =C2=A0=C2=A0=C2=A0 319=C2=A0=C2=A0=C2=A0 static int avs_register_i2s_boa= rd(struct avs_dev *adev, = >> struct snd_soc_acpi_mach *mach) >> =C2=A0=C2=A0=C2=A0 320=C2=A0=C2=A0=C2=A0 { >> =C2=A0=C2=A0=C2=A0 321=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 struct = platform_device *board; >> =C2=A0=C2=A0=C2=A0 322=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 int num= _ssps; >> =C2=A0=C2=A0=C2=A0 323=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 char *n= ame; >> =C2=A0=C2=A0=C2=A0 324=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 int ret; >> =C2=A0=C2=A0=C2=A0 325 >> =C2=A0=C2=A0=C2=A0 326=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 num_ssp= s =3D adev->hw_cfg.i2s_caps.ctrl_count; >> =C2=A0=C2=A0=C2=A0 327=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 if (fls= (mach->mach_params.i2s_link_mask) > num_ssps) { >> =C2=A0 > 328=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0 dev_err(adev->dev, "Platform supports %d SSPs but = >> board %s requires SSP%ld\n", >> =C2=A0=C2=A0=C2=A0 329=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 num_ssps, mach->drv_name, = >> __fls(mach->mach_params.i2s_link_mask)); >> =C2=A0=C2=A0=C2=A0 330=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0 return -ENODEV; >> =C2=A0=C2=A0=C2=A0 331=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 } >> =C2=A0=C2=A0=C2=A0 332 >> =C2=A0=C2=A0=C2=A0 333=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 name = =3D devm_kasprintf(adev->dev, GFP_KERNEL, = >> "%s.%d-platform", mach->drv_name, >> =C2=A0=C2=A0=C2=A0 334 mach->mach_params.i2s_link_mask); >> =C2=A0=C2=A0=C2=A0 335=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 if (!na= me) >> =C2=A0=C2=A0=C2=A0 336=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0 return -ENOMEM; >> =C2=A0=C2=A0=C2=A0 337 >> =C2=A0=C2=A0=C2=A0 338=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 ret =3D= avs_i2s_platform_register(adev, name, = >> mach->mach_params.i2s_link_mask, mach->pdata); >> =C2=A0=C2=A0=C2=A0 339=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 if (ret= < 0) >> =C2=A0=C2=A0=C2=A0 340=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0 return ret; >> =C2=A0=C2=A0=C2=A0 341 >> =C2=A0=C2=A0=C2=A0 342=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 mach->m= ach_params.platform =3D name; >> =C2=A0=C2=A0=C2=A0 343 >> =C2=A0=C2=A0=C2=A0 344=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 board = =3D platform_device_register_data(NULL, = >> mach->drv_name, mach->mach_params.i2s_link_mask, >> =C2=A0=C2=A0=C2=A0 345=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 (const void *)mach, siz= eof(*mach)); >> =C2=A0=C2=A0=C2=A0 346=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 if (IS_= ERR(board)) { >> =C2=A0=C2=A0=C2=A0 347=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0 dev_err(adev->dev, "ssp board register failed\n"); >> =C2=A0=C2=A0=C2=A0 348=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0 return PTR_ERR(board); >> =C2=A0=C2=A0=C2=A0 349=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 } >> =C2=A0=C2=A0=C2=A0 350 >> =C2=A0=C2=A0=C2=A0 351=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 ret =3D= devm_add_action(adev->dev, = >> board_pdev_unregister, board); >> =C2=A0=C2=A0=C2=A0 352=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 if (ret= < 0) { >> =C2=A0=C2=A0=C2=A0 353=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0 platform_device_unregister(board); >> =C2=A0=C2=A0=C2=A0 354=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0 return ret; >> =C2=A0=C2=A0=C2=A0 355=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 } >> =C2=A0=C2=A0=C2=A0 356 >> =C2=A0=C2=A0=C2=A0 357=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 return = 0; >> =C2=A0=C2=A0=C2=A0 358=C2=A0=C2=A0=C2=A0 } >> =C2=A0=C2=A0=C2=A0 359 >> > > Kernel test robot warns us about __fls and it is right, as __fls = > depending on architecture returns either unsigned int or unsigned long. > But I would say that this seems questionable, as I would expect = > consistent return value between arches, especially for functions where = > we operate on bits and probably don't want inconsistent results. > > Generic asm header [1] seems to suggest that it should accept unsigned = > long as parameter and return unsigned long. It seems however that arc = > accepts unsigned long as argument and returns int, while m68k uses int = > for argument and return value... > > Adding relevant architecture maintainers to CC. > > [1] = > https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/i= nclude/asm-generic/bitops/__fls.h In generic code __fls() returns long, while fls() return int, which is = weird as well. Anyhow for this error, ARC indeed needs fixing. Do u want to send a patch ? Thx, -Vineet --===============2784584818131501846==--