* [groeck-staging:hwmon-next 3/10] drivers/hwmon/oxp-sensors.c:299:10: warning: cast to smaller integer type 'enum oxp_board' from 'void *'
@ 2023-05-08 8:23 kernel test robot
0 siblings, 0 replies; only message in thread
From: kernel test robot @ 2023-05-08 8:23 UTC (permalink / raw)
To: Joaquín Ignacio Aramendía
Cc: llvm, oe-kbuild-all, linux-hwmon, Guenter Roeck
tree: https://git.kernel.org/pub/scm/linux/kernel/git/groeck/linux-staging.git hwmon-next
head: 92613681c0090612f0368dcebdcc232af9d74ae8
commit: bfae15559531b4aacd626152ffea929c27304dd8 [3/10] hwmon: (oxp-sensors) Use less convoluted enum cast
config: x86_64-randconfig-a006-20230508 (https://download.01.org/0day-ci/archive/20230508/202305081625.IMCuQoxj-lkp@intel.com/config)
compiler: clang version 14.0.6 (https://github.com/llvm/llvm-project f28c006a5895fc0e329fe15fead81e37457cb1d1)
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://git.kernel.org/pub/scm/linux/kernel/git/groeck/linux-staging.git/commit/?id=bfae15559531b4aacd626152ffea929c27304dd8
git remote add groeck-staging https://git.kernel.org/pub/scm/linux/kernel/git/groeck/linux-staging.git
git fetch --no-tags groeck-staging hwmon-next
git checkout bfae15559531b4aacd626152ffea929c27304dd8
# 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 olddefconfig
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross W=1 O=build_dir ARCH=x86_64 SHELL=/bin/bash drivers/hwmon/
If you fix the issue, kindly add following tag where applicable
| Reported-by: kernel test robot <lkp@intel.com>
| Link: https://lore.kernel.org/oe-kbuild-all/202305081625.IMCuQoxj-lkp@intel.com/
All warnings (new ones prefixed by >>):
>> drivers/hwmon/oxp-sensors.c:299:10: warning: cast to smaller integer type 'enum oxp_board' from 'void *' [-Wvoid-pointer-to-enum-cast]
board = (enum oxp_board)dmi_entry->driver_data;
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1 warning generated.
vim +299 drivers/hwmon/oxp-sensors.c
280
281 /* Initialization logic */
282 static int oxp_platform_probe(struct platform_device *pdev)
283 {
284 const struct dmi_system_id *dmi_entry;
285 struct device *dev = &pdev->dev;
286 struct device *hwdev;
287
288 /*
289 * Have to check for AMD processor here because DMI strings are the
290 * same between Intel and AMD boards, the only way to tell them apart
291 * is the CPU.
292 * Intel boards seem to have different EC registers and values to
293 * read/write.
294 */
295 dmi_entry = dmi_first_match(dmi_table);
296 if (!dmi_entry || boot_cpu_data.x86_vendor != X86_VENDOR_AMD)
297 return -ENODEV;
298
> 299 board = (enum oxp_board)dmi_entry->driver_data;
300
301 hwdev = devm_hwmon_device_register_with_info(dev, "oxpec", NULL,
302 &oxp_ec_chip_info, NULL);
303
304 return PTR_ERR_OR_ZERO(hwdev);
305 }
306
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2023-05-08 8:24 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-05-08 8:23 [groeck-staging:hwmon-next 3/10] drivers/hwmon/oxp-sensors.c:299:10: warning: cast to smaller integer type 'enum oxp_board' from 'void *' kernel test robot
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox