public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* sound/soc/intel/avs/board_selection.c:328:36: warning: format '%ld' expects argument of type 'long int', but argument 5 has type 'int'
@ 2022-05-29 18:39 kernel test robot
  0 siblings, 0 replies; only message in thread
From: kernel test robot @ 2022-05-29 18:39 UTC (permalink / raw)
  To: Cezary Rojewski
  Cc: kbuild-all, linux-kernel, Mark Brown,
	Amadeusz Sławiński

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head:   664a393a2663a0f62fc1b18157ccae33dcdbb8c8
commit: beed983621fbdfd291e6e3a0cdc4d10517e60af8 ASoC: Intel: avs: Machine board registration
date:   12 days ago
config: arc-allyesconfig (https://download.01.org/0day-ci/archive/20220530/202205300203.HEMfMnDi-lkp@intel.com/config)
compiler: arceb-elf-gcc (GCC) 11.3.0
reproduce (this is a W=1 build):
        wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
        chmod +x ~/bin/make.cross
        # https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=beed983621fbdfd291e6e3a0cdc4d10517e60af8
        git remote add linus https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
        git fetch --no-tags linus master
        git checkout beed983621fbdfd291e6e3a0cdc4d10517e60af8
        # save the config file
        mkdir build_dir && cp config build_dir/.config
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-11.3.0 make.cross W=1 O=build_dir ARCH=arc SHELL=/bin/bash drivers/gpu/drm/amd/display/dc/ drivers/scsi/mpi3mr/ sound/soc/intel/avs/

If you fix the issue, kindly add following tag where applicable
Reported-by: kernel test robot <lkp@intel.com>

All warnings (new ones prefixed by >>):

   In file included from include/linux/device.h:15,
                    from include/linux/acpi.h:15,
                    from sound/soc/intel/avs/board_selection.c:9:
   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=]
     328 |                 dev_err(adev->dev, "Platform supports %d SSPs but board %s requires SSP%ld\n",
         |                                    ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   include/linux/dev_printk.h:110:30: note: in definition of macro 'dev_printk_index_wrap'
     110 |                 _p_func(dev, fmt, ##__VA_ARGS__);                       \
         |                              ^~~
   include/linux/dev_printk.h:144:56: note: in expansion of macro 'dev_fmt'
     144 |         dev_printk_index_wrap(_dev_err, KERN_ERR, dev, dev_fmt(fmt), ##__VA_ARGS__)
         |                                                        ^~~~~~~
   sound/soc/intel/avs/board_selection.c:328:17: note: in expansion of macro 'dev_err'
     328 |                 dev_err(adev->dev, "Platform supports %d SSPs but board %s requires SSP%ld\n",
         |                 ^~~~~~~
   sound/soc/intel/avs/board_selection.c:328:90: note: format string is defined here
     328 |                 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

   318	
   319	static int avs_register_i2s_board(struct avs_dev *adev, struct snd_soc_acpi_mach *mach)
   320	{
   321		struct platform_device *board;
   322		int num_ssps;
   323		char *name;
   324		int ret;
   325	
   326		num_ssps = adev->hw_cfg.i2s_caps.ctrl_count;
   327		if (fls(mach->mach_params.i2s_link_mask) > num_ssps) {
 > 328			dev_err(adev->dev, "Platform supports %d SSPs but board %s requires SSP%ld\n",
   329				num_ssps, mach->drv_name, __fls(mach->mach_params.i2s_link_mask));
   330			return -ENODEV;
   331		}
   332	
   333		name = devm_kasprintf(adev->dev, GFP_KERNEL, "%s.%d-platform", mach->drv_name,
   334				      mach->mach_params.i2s_link_mask);
   335		if (!name)
   336			return -ENOMEM;
   337	
   338		ret = avs_i2s_platform_register(adev, name, mach->mach_params.i2s_link_mask, mach->pdata);
   339		if (ret < 0)
   340			return ret;
   341	
   342		mach->mach_params.platform = name;
   343	
   344		board = platform_device_register_data(NULL, mach->drv_name, mach->mach_params.i2s_link_mask,
   345						      (const void *)mach, sizeof(*mach));
   346		if (IS_ERR(board)) {
   347			dev_err(adev->dev, "ssp board register failed\n");
   348			return PTR_ERR(board);
   349		}
   350	
   351		ret = devm_add_action(adev->dev, board_pdev_unregister, board);
   352		if (ret < 0) {
   353			platform_device_unregister(board);
   354			return ret;
   355		}
   356	
   357		return 0;
   358	}
   359	

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

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2022-05-29 18:40 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-05-29 18:39 sound/soc/intel/avs/board_selection.c:328:36: warning: format '%ld' expects argument of type 'long int', but argument 5 has type 'int' kernel test robot

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox