lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [day] [month] [year] [list]
Message-ID: <202205300203.HEMfMnDi-lkp@intel.com>
Date:   Mon, 30 May 2022 02:39:01 +0800
From:   kernel test robot <lkp@...el.com>
To:     Cezary Rojewski <cezary.rojewski@...el.com>
Cc:     kbuild-all@...ts.01.org, linux-kernel@...r.kernel.org,
        Mark Brown <broonie@...nel.org>,
        Amadeusz Sławiński 
        <amadeuszx.slawinski@...ux.intel.com>
Subject: sound/soc/intel/avs/board_selection.c:328:36: warning: format '%ld'
 expects argument of type 'long int', but argument 5 has type 'int'

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@...el.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

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ