public inbox for llvm@lists.linux.dev
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: "Martin Povišer" <povik+lin@cutebit.org>
Cc: llvm@lists.linux.dev, oe-kbuild-all@lists.linux.dev,
	Hector Martin <marcan@marcan.st>
Subject: [asahilinux:bits/070-audio 2/100] sound/soc/codecs/tas2764.c:749:20: warning: cast to smaller integer type 'enum tas2764_devid' from 'const void *'
Date: Sun, 19 Nov 2023 22:02:38 +0800	[thread overview]
Message-ID: <202311192157.chUKcYfp-lkp@intel.com> (raw)

tree:   https://github.com/AsahiLinux/linux bits/070-audio
head:   1c71b1fa2c491cc29c94d29f1a450dba39f27557
commit: 68baf94b8d789f517f45a9de2910e6242d54281b [2/100] ASoC: tas2764: Extend driver to SN012776
config: x86_64-allyesconfig (https://download.01.org/0day-ci/archive/20231119/202311192157.chUKcYfp-lkp@intel.com/config)
compiler: clang version 16.0.4 (https://github.com/llvm/llvm-project.git ae42196bc493ffe877a7e3dff8be32035dea4d07)
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20231119/202311192157.chUKcYfp-lkp@intel.com/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@intel.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202311192157.chUKcYfp-lkp@intel.com/

All warnings (new ones prefixed by >>):

>> sound/soc/codecs/tas2764.c:749: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 +749 sound/soc/codecs/tas2764.c

   733	
   734	static int tas2764_i2c_probe(struct i2c_client *client)
   735	{
   736		struct tas2764_priv *tas2764;
   737		const struct of_device_id *of_id = NULL;
   738		int result;
   739	
   740		tas2764 = devm_kzalloc(&client->dev, sizeof(struct tas2764_priv),
   741				       GFP_KERNEL);
   742		if (!tas2764)
   743			return -ENOMEM;
   744	
   745		if (client->dev.of_node)
   746			of_id = of_match_device(tas2764_of_match, &client->dev);
   747	
   748		if (of_id)
 > 749			tas2764->devid = (enum tas2764_devid) of_id->data;
   750		else
   751			tas2764->devid = DEVID_TAS2764;
   752	
   753		tas2764->dev = &client->dev;
   754		tas2764->irq = client->irq;
   755		i2c_set_clientdata(client, tas2764);
   756		dev_set_drvdata(&client->dev, tas2764);
   757	
   758		tas2764->regmap = devm_regmap_init_i2c(client, &tas2764_i2c_regmap);
   759		if (IS_ERR(tas2764->regmap)) {
   760			result = PTR_ERR(tas2764->regmap);
   761			dev_err(&client->dev, "Failed to allocate register map: %d\n",
   762						result);
   763			return result;
   764		}
   765	
   766		if (client->dev.of_node) {
   767			result = tas2764_parse_dt(&client->dev, tas2764);
   768			if (result) {
   769				dev_err(tas2764->dev, "%s: Failed to parse devicetree\n",
   770					__func__);
   771				return result;
   772			}
   773		}
   774	
   775		return devm_snd_soc_register_component(tas2764->dev,
   776						       &soc_component_driver_tas2764,
   777						       tas2764_dai_driver,
   778						       ARRAY_SIZE(tas2764_dai_driver));
   779	}
   780	

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

                 reply	other threads:[~2023-11-19 14:03 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=202311192157.chUKcYfp-lkp@intel.com \
    --to=lkp@intel.com \
    --cc=llvm@lists.linux.dev \
    --cc=marcan@marcan.st \
    --cc=oe-kbuild-all@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