Re: [PATCH 2/3] ASoC: Intel: avs: Add topology parsing support for initial config

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



Hi Amadeusz,

kernel test robot noticed the following build warnings:

[auto build test WARNING on broonie-sound/for-next]
[also build test WARNING on tiwai-sound/for-next tiwai-sound/for-linus linus/master v6.8-rc3 next-20240207]
[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#_base_tree_information]

url:    https://github.com/intel-lab-lkp/linux/commits/Amadeusz-S-awi-ski/ASoC-Intel-avs-UAPI-Add-tokens-for-initial-config-feature/20240207-201212
base:   https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git for-next
patch link:    https://lore.kernel.org/r/20240207120946.2140480-3-amadeuszx.slawinski%40linux.intel.com
patch subject: [PATCH 2/3] ASoC: Intel: avs: Add topology parsing support for initial config
config: s390-allmodconfig (https://download.01.org/0day-ci/archive/20240208/202402080403.reu2fMfN-lkp@xxxxxxxxx/config)
compiler: clang version 19.0.0git (https://github.com/llvm/llvm-project 7dd790db8b77c4a833c06632e903dc4f13877a64)
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20240208/202402080403.reu2fMfN-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/202402080403.reu2fMfN-lkp@xxxxxxxxx/

All warnings (new ones prefixed by >>):

   In file included from sound/soc/intel/avs/topology.c:11:
   In file included from include/sound/soc.h:21:
   In file included from include/linux/regmap.h:20:
   In file included from include/linux/iopoll.h:14:
   In file included from include/linux/io.h:13:
   In file included from arch/s390/include/asm/io.h:78:
   include/asm-generic/io.h:547:31: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
     547 |         val = __raw_readb(PCI_IOBASE + addr);
         |                           ~~~~~~~~~~ ^
   include/asm-generic/io.h:560:61: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
     560 |         val = __le16_to_cpu((__le16 __force)__raw_readw(PCI_IOBASE + addr));
         |                                                         ~~~~~~~~~~ ^
   include/uapi/linux/byteorder/big_endian.h:37:59: note: expanded from macro '__le16_to_cpu'
      37 | #define __le16_to_cpu(x) __swab16((__force __u16)(__le16)(x))
         |                                                           ^
   include/uapi/linux/swab.h:102:54: note: expanded from macro '__swab16'
     102 | #define __swab16(x) (__u16)__builtin_bswap16((__u16)(x))
         |                                                      ^
   In file included from sound/soc/intel/avs/topology.c:11:
   In file included from include/sound/soc.h:21:
   In file included from include/linux/regmap.h:20:
   In file included from include/linux/iopoll.h:14:
   In file included from include/linux/io.h:13:
   In file included from arch/s390/include/asm/io.h:78:
   include/asm-generic/io.h:573:61: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
     573 |         val = __le32_to_cpu((__le32 __force)__raw_readl(PCI_IOBASE + addr));
         |                                                         ~~~~~~~~~~ ^
   include/uapi/linux/byteorder/big_endian.h:35:59: note: expanded from macro '__le32_to_cpu'
      35 | #define __le32_to_cpu(x) __swab32((__force __u32)(__le32)(x))
         |                                                           ^
   include/uapi/linux/swab.h:115:54: note: expanded from macro '__swab32'
     115 | #define __swab32(x) (__u32)__builtin_bswap32((__u32)(x))
         |                                                      ^
   In file included from sound/soc/intel/avs/topology.c:11:
   In file included from include/sound/soc.h:21:
   In file included from include/linux/regmap.h:20:
   In file included from include/linux/iopoll.h:14:
   In file included from include/linux/io.h:13:
   In file included from arch/s390/include/asm/io.h:78:
   include/asm-generic/io.h:584:33: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
     584 |         __raw_writeb(value, PCI_IOBASE + addr);
         |                             ~~~~~~~~~~ ^
   include/asm-generic/io.h:594:59: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
     594 |         __raw_writew((u16 __force)cpu_to_le16(value), PCI_IOBASE + addr);
         |                                                       ~~~~~~~~~~ ^
   include/asm-generic/io.h:604:59: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
     604 |         __raw_writel((u32 __force)cpu_to_le32(value), PCI_IOBASE + addr);
         |                                                       ~~~~~~~~~~ ^
   include/asm-generic/io.h:692:20: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
     692 |         readsb(PCI_IOBASE + addr, buffer, count);
         |                ~~~~~~~~~~ ^
   include/asm-generic/io.h:700:20: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
     700 |         readsw(PCI_IOBASE + addr, buffer, count);
         |                ~~~~~~~~~~ ^
   include/asm-generic/io.h:708:20: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
     708 |         readsl(PCI_IOBASE + addr, buffer, count);
         |                ~~~~~~~~~~ ^
   include/asm-generic/io.h:717:21: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
     717 |         writesb(PCI_IOBASE + addr, buffer, count);
         |                 ~~~~~~~~~~ ^
   include/asm-generic/io.h:726:21: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
     726 |         writesw(PCI_IOBASE + addr, buffer, count);
         |                 ~~~~~~~~~~ ^
   include/asm-generic/io.h:735:21: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
     735 |         writesl(PCI_IOBASE + addr, buffer, count);
         |                 ~~~~~~~~~~ ^
>> sound/soc/intel/avs/topology.c:1490:13: warning: parameter 'block_size' set but not used [-Wunused-but-set-parameter]
    1490 |                                            u32 block_size)
         |                                                ^
   13 warnings generated.


vim +/block_size +1490 sound/soc/intel/avs/topology.c

  1487	
  1488	static int avs_tplg_parse_initial_configs(struct snd_soc_component *comp,
  1489						   struct snd_soc_tplg_vendor_array *tuples,
> 1490						   u32 block_size)
  1491	{
  1492		struct avs_soc_component *acomp = to_avs_soc_component(comp);
  1493		struct avs_tplg *tplg = acomp->tplg;
  1494		int ret, i;
  1495	
  1496		/* Parse tuple section telling how many init configs there are. */
  1497		ret = parse_dictionary_header(comp, tuples, (void **)&tplg->init_configs,
  1498					      &tplg->num_init_configs,
  1499					      sizeof(*tplg->init_configs),
  1500					      AVS_TKN_MANIFEST_NUM_INIT_CONFIGS_U32);
  1501		if (ret)
  1502			return ret;
  1503	
  1504		block_size -= le32_to_cpu(tuples->size);
  1505		/* With header parsed, move on to parsing entries. */
  1506		tuples = avs_tplg_vendor_array_next(tuples);
  1507	
  1508		for (i = 0; i < tplg->num_init_configs; i++) {
  1509			struct avs_tplg_init_config *config = &tplg->init_configs[i];
  1510			struct snd_soc_tplg_vendor_array *tmp;
  1511			void *init_config_data;
  1512			u32 esize;
  1513	
  1514			/*
  1515			 * Usually to get section length we search for first token of next group of data,
  1516			 * but in this case we can't as tuples are followed by raw data.
  1517			 */
  1518			tmp = avs_tplg_vendor_array_next(tuples);
  1519			esize = le32_to_cpu(tuples->size) + le32_to_cpu(tmp->size);
  1520	
  1521			ret = parse_dictionary_entries(comp, tuples, esize, config, 1, sizeof(*config),
  1522						       AVS_TKN_MOD_INIT_CONFIG_ID_U32,
  1523						       mod_init_config_parsers,
  1524						       ARRAY_SIZE(mod_init_config_parsers));
  1525	
  1526			block_size -= esize;
  1527	
  1528			/* handle raw data section */
  1529			init_config_data = (void *)tuples + esize;
  1530			esize = config->length;
  1531	
  1532			config->data = devm_kmemdup(comp->card->dev, init_config_data, esize, GFP_KERNEL);
  1533			if (!config->data)
  1534				return -ENOMEM;
  1535	
  1536			tuples = init_config_data + esize;
  1537		}
  1538	
  1539		return 0;
  1540	}
  1541	

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




[Index of Archives]     [Pulseaudio]     [Linux Audio Users]     [ALSA Devel]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]

  Powered by Linux