[<prev] [next>] [day] [month] [year] [list]
Message-ID: <202209242040.5gY6tHXv-lkp@intel.com>
Date: Sat, 24 Sep 2022 21:22:33 +0800
From: kernel test robot <lkp@...el.com>
To: Martin PoviĊĦer <povik+lin@...ebit.org>
Cc: llvm@...ts.linux.dev, kbuild-all@...ts.01.org,
linux-kernel@...r.kernel.org, Hector Martin <marcan@...can.st>
Subject: [asahilinux:bits/070-audio 6/33] sound/soc/codecs/tas2764.c:756:20:
warning: cast to smaller integer type 'enum tas2764_devid' from 'const void
*'
tree: https://github.com/AsahiLinux/linux bits/070-audio
head: 5052d0fa99604a162270274e7a22a111862d824f
commit: 040ba7fbccbd82b839c15f7e80deb6dd58190be4 [6/33] ASoC: tas2764: Extend driver to SN012776
config: arm64-buildonly-randconfig-r003-20220923
compiler: clang version 16.0.0 (https://github.com/llvm/llvm-project 791a7ae1ba3efd6bca96338e10ffde557ba83920)
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/040ba7fbccbd82b839c15f7e80deb6dd58190be4
git remote add asahilinux https://github.com/AsahiLinux/linux
git fetch --no-tags asahilinux bits/070-audio
git checkout 040ba7fbccbd82b839c15f7e80deb6dd58190be4
# 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 where applicable
| Reported-by: kernel test robot <lkp@...el.com>
All warnings (new ones prefixed by >>):
>> sound/soc/codecs/tas2764.c:756: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 +756 sound/soc/codecs/tas2764.c
740
741 static int tas2764_i2c_probe(struct i2c_client *client)
742 {
743 struct tas2764_priv *tas2764;
744 const struct of_device_id *of_id = NULL;
745 int result;
746
747 tas2764 = devm_kzalloc(&client->dev, sizeof(struct tas2764_priv),
748 GFP_KERNEL);
749 if (!tas2764)
750 return -ENOMEM;
751
752 if (client->dev.of_node)
753 of_id = of_match_device(tas2764_of_match, &client->dev);
754
755 if (of_id)
> 756 tas2764->devid = (enum tas2764_devid) of_id->data;
757 else
758 tas2764->devid = DEVID_TAS2764;
759
760 tas2764->dev = &client->dev;
761 tas2764->irq = client->irq;
762 i2c_set_clientdata(client, tas2764);
763 dev_set_drvdata(&client->dev, tas2764);
764
765 tas2764->regmap = devm_regmap_init_i2c(client, &tas2764_i2c_regmap);
766 if (IS_ERR(tas2764->regmap)) {
767 result = PTR_ERR(tas2764->regmap);
768 dev_err(&client->dev, "Failed to allocate register map: %d\n",
769 result);
770 return result;
771 }
772
773 if (client->dev.of_node) {
774 result = tas2764_parse_dt(&client->dev, tas2764);
775 if (result) {
776 dev_err(tas2764->dev, "%s: Failed to parse devicetree\n",
777 __func__);
778 return result;
779 }
780 }
781
782 return devm_snd_soc_register_component(tas2764->dev,
783 &soc_component_driver_tas2764,
784 tas2764_dai_driver,
785 ARRAY_SIZE(tas2764_dai_driver));
786 }
787
--
0-DAY CI Kernel Test Service
https://01.org/lkp
View attachment "config" of type "text/plain" (225149 bytes)
Powered by blists - more mailing lists