Re: [linux-next:master 11546/12162] drivers/mfd/max77541.c:176:18: warning: cast to smaller integer type 'enum max7754x_ids' from 'const void *'

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Mon, Jun 26, 2023 at 04:53:43AM +0800, kernel test robot wrote:
> tree:   https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git master
> head:   8d2be868b42c08290509c60515865f4de24ea704
> commit: e0cbc202388af454eb771043b20db6dfe68199ec [11546/12162] mfd: max77541: Add ADI MAX77541/MAX77540 PMIC Support
> config: x86_64-randconfig-r003-20230626 (https://download.01.org/0day-ci/archive/20230626/202306260401.qZlYQpV2-lkp@xxxxxxxxx/config)
> compiler: clang version 15.0.7 (https://github.com/llvm/llvm-project.git 8dfdcc7b7bf66834a761bd8de445840ef68e4d1a)
> reproduce: (https://download.01.org/0day-ci/archive/20230626/202306260401.qZlYQpV2-lkp@xxxxxxxxx/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@xxxxxxxxx>
> | Closes: https://lore.kernel.org/oe-kbuild-all/202306260401.qZlYQpV2-lkp@xxxxxxxxx/
> 
> All warnings (new ones prefixed by >>):
> 
> >> drivers/mfd/max77541.c:176:18: warning: cast to smaller integer type 'enum max7754x_ids' from 'const void *' [-Wvoid-pointer-to-enum-cast]
>            max77541->id  = (enum max7754x_ids)device_get_match_data(dev);

	max77541->id  = (enum max7754x_ids)(uintptr_t)device_get_match_data(dev);

should fix it.

-- 
With Best Regards,
Andy Shevchenko






[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Bugtraq]     [Linux OMAP]     [Linux MIPS]     [eCos]     [Asterisk Internet PBX]     [Linux API]

  Powered by Linux