All of lore.kernel.org
 help / color / mirror / Atom feed
* [asahilinux:bits/070-audio 15/20] sound/soc/codecs/tas2764.c:683:20: warning: cast to smaller integer type 'enum tas2764_devid' from 'const void *'
@ 2022-05-24 18:06 kernel test robot
  0 siblings, 0 replies; 2+ messages in thread
From: kernel test robot @ 2022-05-24 18:06 UTC (permalink / raw)
  To: Martin Povišer; +Cc: llvm, kbuild-all, linux-kernel, Hector Martin

tree:   https://github.com/AsahiLinux/linux bits/070-audio
head:   401ef594286e6abfe89c2d92664087bc5d6ca657
commit: 732003ea9b5c8115c96e1e22272959bd74fcbd4a [15/20] ASoC: tas2764: Extend driver to SN012776
config: x86_64-randconfig-a014 (https://download.01.org/0day-ci/archive/20220525/202205250215.BQHYYJpH-lkp@intel.com/config)
compiler: clang version 15.0.0 (https://github.com/llvm/llvm-project 10c9ecce9f6096e18222a331c5e7d085bd813f75)
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://github.com/AsahiLinux/linux/commit/732003ea9b5c8115c96e1e22272959bd74fcbd4a
        git remote add asahilinux https://github.com/AsahiLinux/linux
        git fetch --no-tags asahilinux bits/070-audio
        git checkout 732003ea9b5c8115c96e1e22272959bd74fcbd4a
        # save the config file
        mkdir build_dir && cp config build_dir/.config
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross W=1 O=build_dir ARCH=x86_64 SHELL=/bin/bash sound/soc/codecs/

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 >>):

>> sound/soc/codecs/tas2764.c:683:20: warning: cast to smaller integer type 'enum tas2764_devid' from 'const void *' [-Wvoid-pointer-to-enum-cast]
                   tas2764->devid = (enum tas2764_devid) of_id->data;
                                    ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   1 warning generated.


vim +683 sound/soc/codecs/tas2764.c

   666	
   667	static int tas2764_i2c_probe(struct i2c_client *client,
   668				const struct i2c_device_id *id)
   669	{
   670		struct tas2764_priv *tas2764;
   671		const struct of_device_id *of_id = NULL;
   672		int result;
   673	
   674		tas2764 = devm_kzalloc(&client->dev, sizeof(struct tas2764_priv),
   675				       GFP_KERNEL);
   676		if (!tas2764)
   677			return -ENOMEM;
   678	
   679		if (client->dev.of_node)
   680			of_id = of_match_device(tas2764_of_match, &client->dev);	
   681	
   682		if (of_id)
 > 683			tas2764->devid = (enum tas2764_devid) of_id->data;
   684		else
   685			tas2764->devid = DEVID_TAS2764;
   686	
   687		tas2764->dev = &client->dev;
   688		i2c_set_clientdata(client, tas2764);
   689		dev_set_drvdata(&client->dev, tas2764);
   690	
   691		tas2764->regmap = devm_regmap_init_i2c(client, &tas2764_i2c_regmap);
   692		if (IS_ERR(tas2764->regmap)) {
   693			result = PTR_ERR(tas2764->regmap);
   694			dev_err(&client->dev, "Failed to allocate register map: %d\n",
   695						result);
   696			return result;
   697		}
   698	
   699		if (client->dev.of_node) {
   700			result = tas2764_parse_dt(&client->dev, tas2764);
   701			if (result) {
   702				dev_err(tas2764->dev, "%s: Failed to parse devicetree\n",
   703					__func__);
   704				return result;
   705			}
   706		}
   707	
   708		return devm_snd_soc_register_component(tas2764->dev,
   709						       &soc_component_driver_tas2764,
   710						       tas2764_dai_driver,
   711						       ARRAY_SIZE(tas2764_dai_driver));
   712	}
   713	

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

^ permalink raw reply	[flat|nested] 2+ messages in thread

* [asahilinux:bits/070-audio 15/20] sound/soc/codecs/tas2764.c:683:20: warning: cast to smaller integer type 'enum tas2764_devid' from 'const void *'
@ 2022-05-02 15:19 kernel test robot
  0 siblings, 0 replies; 2+ messages in thread
From: kernel test robot @ 2022-05-02 15:19 UTC (permalink / raw)
  To: Martin Povišer; +Cc: llvm, kbuild-all, linux-kernel, Hector Martin

tree:   https://github.com/AsahiLinux/linux bits/070-audio
head:   91b81123719d8b742da188f01ee3d897e0fac92b
commit: 29756799398dae179e17370b2e5d2a397b683440 [15/20] ASoC: tas2764: Extend driver to SN012776
config: arm64-randconfig-r005-20220501 (https://download.01.org/0day-ci/archive/20220502/202205022313.dZqidUBY-lkp@intel.com/config)
compiler: clang version 15.0.0 (https://github.com/llvm/llvm-project 09325d36061e42b495d1f4c7e933e260eac260ed)
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
        # install arm64 cross compiling tool for clang build
        # apt-get install binutils-aarch64-linux-gnu
        # https://github.com/AsahiLinux/linux/commit/29756799398dae179e17370b2e5d2a397b683440
        git remote add asahilinux https://github.com/AsahiLinux/linux
        git fetch --no-tags asahilinux bits/070-audio
        git checkout 29756799398dae179e17370b2e5d2a397b683440
        # save the config file
        mkdir build_dir && cp config build_dir/.config
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross W=1 O=build_dir ARCH=arm64 SHELL=/bin/bash sound/soc/codecs/

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

All warnings (new ones prefixed by >>):

>> sound/soc/codecs/tas2764.c:683:20: warning: cast to smaller integer type 'enum tas2764_devid' from 'const void *' [-Wvoid-pointer-to-enum-cast]
                   tas2764->devid = (enum tas2764_devid) of_id->data;
                                    ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   1 warning generated.


vim +683 sound/soc/codecs/tas2764.c

   666	
   667	static int tas2764_i2c_probe(struct i2c_client *client,
   668				const struct i2c_device_id *id)
   669	{
   670		struct tas2764_priv *tas2764;
   671		const struct of_device_id *of_id = NULL;
   672		int result;
   673	
   674		tas2764 = devm_kzalloc(&client->dev, sizeof(struct tas2764_priv),
   675				       GFP_KERNEL);
   676		if (!tas2764)
   677			return -ENOMEM;
   678	
   679		if (client->dev.of_node)
   680			of_id = of_match_device(tas2764_of_match, &client->dev);	
   681	
   682		if (of_id)
 > 683			tas2764->devid = (enum tas2764_devid) of_id->data;
   684		else
   685			tas2764->devid = DEVID_TAS2764;
   686	
   687		tas2764->dev = &client->dev;
   688		i2c_set_clientdata(client, tas2764);
   689		dev_set_drvdata(&client->dev, tas2764);
   690	
   691		tas2764->regmap = devm_regmap_init_i2c(client, &tas2764_i2c_regmap);
   692		if (IS_ERR(tas2764->regmap)) {
   693			result = PTR_ERR(tas2764->regmap);
   694			dev_err(&client->dev, "Failed to allocate register map: %d\n",
   695						result);
   696			return result;
   697		}
   698	
   699		if (client->dev.of_node) {
   700			result = tas2764_parse_dt(&client->dev, tas2764);
   701			if (result) {
   702				dev_err(tas2764->dev, "%s: Failed to parse devicetree\n",
   703					__func__);
   704				return result;
   705			}
   706		}
   707	
   708		return devm_snd_soc_register_component(tas2764->dev,
   709						       &soc_component_driver_tas2764,
   710						       tas2764_dai_driver,
   711						       ARRAY_SIZE(tas2764_dai_driver));
   712	}
   713	

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

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2022-05-24 18:07 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-05-24 18:06 [asahilinux:bits/070-audio 15/20] sound/soc/codecs/tas2764.c:683:20: warning: cast to smaller integer type 'enum tas2764_devid' from 'const void *' kernel test robot
  -- strict thread matches above, loose matches on Subject: below --
2022-05-02 15:19 kernel test robot

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.