From: kernel test robot <lkp@intel.com>
To: "Martin Povišer" <povik+lin@cutebit.org>
Cc: llvm@lists.linux.dev, kbuild-all@lists.01.org,
linux-kernel@vger.kernel.org
Subject: [asahilinux:pr/22 154/189] sound/soc/codecs/tas2764.c:683:20: warning: cast to smaller integer type 'enum tas2764_devid' from 'const void *'
Date: Tue, 26 Apr 2022 14:58:45 +0800 [thread overview]
Message-ID: <202204261404.u4PHBAns-lkp@intel.com> (raw)
tree: https://github.com/AsahiLinux/linux pr/22
head: 7ee315306d1a3b0da8cf2a53e7f55889d0e7f034
commit: cb66939651e8850d34306205ef68cc749355bfa0 [154/189] ASoC: tas2764: Extend driver to SN012776
config: x86_64-randconfig-a003-20220425 (https://download.01.org/0day-ci/archive/20220426/202204261404.u4PHBAns-lkp@intel.com/config)
compiler: clang version 15.0.0 (https://github.com/llvm/llvm-project 1cddcfdc3c683b393df1a5c9063252eb60e52818)
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/cb66939651e8850d34306205ef68cc749355bfa0
git remote add asahilinux https://github.com/AsahiLinux/linux
git fetch --no-tags asahilinux pr/22
git checkout cb66939651e8850d34306205ef68cc749355bfa0
# 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 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
reply other threads:[~2022-04-26 6:58 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=202204261404.u4PHBAns-lkp@intel.com \
--to=lkp@intel.com \
--cc=kbuild-all@lists.01.org \
--cc=linux-kernel@vger.kernel.org \
--cc=llvm@lists.linux.dev \
--cc=povik+lin@cutebit.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox