All of lore.kernel.org
 help / color / mirror / Atom feed
* [linux-next:master 11546/12162] drivers/mfd/max77541.c:176:18: warning: cast to smaller integer type 'enum max7754x_ids' from 'const void *'
@ 2023-06-25 20:53 kernel test robot
  2023-06-26  8:48 ` Andy Shevchenko
  0 siblings, 1 reply; 5+ messages in thread
From: kernel test robot @ 2023-06-25 20:53 UTC (permalink / raw)
  To: Okan Sahin
  Cc: llvm, oe-kbuild-all, Linux Memory Management List, Lee Jones,
	Andy Shevchenko

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@intel.com/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@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/202306260401.qZlYQpV2-lkp@intel.com/

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);
                           ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   1 warning generated.


vim +176 drivers/mfd/max77541.c

   162	
   163	static int max77541_probe(struct i2c_client *client)
   164	{
   165		const struct i2c_device_id *id = i2c_client_get_device_id(client);
   166		struct device *dev = &client->dev;
   167		struct max77541 *max77541;
   168	
   169		max77541 = devm_kzalloc(dev, sizeof(*max77541), GFP_KERNEL);
   170		if (!max77541)
   171			return -ENOMEM;
   172	
   173		i2c_set_clientdata(client, max77541);
   174		max77541->i2c = client;
   175	
 > 176		max77541->id  = (enum max7754x_ids)device_get_match_data(dev);
   177		if (!max77541->id)
   178			max77541->id  = (enum max7754x_ids)id->driver_data;
   179	
   180		if (!max77541->id)
   181			return -EINVAL;
   182	
   183		max77541->regmap = devm_regmap_init_i2c(client,
   184							&max77541_regmap_config);
   185		if (IS_ERR(max77541->regmap))
   186			return dev_err_probe(dev, PTR_ERR(max77541->regmap),
   187					     "Failed to allocate register map\n");
   188	
   189		return max77541_pmic_setup(dev);
   190	}
   191	

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

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [linux-next:master 11546/12162] drivers/mfd/max77541.c:176:18: warning: cast to smaller integer type 'enum max7754x_ids' from 'const void *'
  2023-06-25 20:53 [linux-next:master 11546/12162] drivers/mfd/max77541.c:176:18: warning: cast to smaller integer type 'enum max7754x_ids' from 'const void *' kernel test robot
@ 2023-06-26  8:48 ` Andy Shevchenko
  2023-06-26  9:54   ` Sahin, Okan
  0 siblings, 1 reply; 5+ messages in thread
From: Andy Shevchenko @ 2023-06-26  8:48 UTC (permalink / raw)
  To: kernel test robot
  Cc: Okan Sahin, llvm, oe-kbuild-all, Linux Memory Management List, Lee Jones

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@intel.com/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@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/202306260401.qZlYQpV2-lkp@intel.com/
> 
> 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



^ permalink raw reply	[flat|nested] 5+ messages in thread

* RE: [linux-next:master 11546/12162] drivers/mfd/max77541.c:176:18: warning: cast to smaller integer type 'enum max7754x_ids' from 'const void *'
  2023-06-26  8:48 ` Andy Shevchenko
@ 2023-06-26  9:54   ` Sahin, Okan
  2023-06-26 11:25     ` Andy Shevchenko
  0 siblings, 1 reply; 5+ messages in thread
From: Sahin, Okan @ 2023-06-26  9:54 UTC (permalink / raw)
  To: Andy Shevchenko, kernel test robot
  Cc: llvm, oe-kbuild-all, Linux Memory Management List, Lee Jones

>On Mon, Jun 26, 2023 at 04:53:43AM +0800, kernel test robot wrote:
>> tree:
>https://urldefense.com/v3/__https://git.kernel.org/pub/scm/linux/kernel/git/next/lin
>ux-
>next.git__;!!A3Ni8CS0y2Y!8_hG3CE9MEp7WGmtpHuJhRpyycfvZX2KSjXqlC8DQVkUWp
>cL2zcPVAFQpJ4KxsH35hJP2pmvm8bIz_FXyDwMkGeosibK3JnB$  master
>> head:   8d2be868b42c08290509c60515865f4de24ea704
>> commit: e0cbc202388af454eb771043b20db6dfe68199ec [11546/12162] mfd:
>max77541: Add ADI MAX77541/MAX77540 PMIC Support
>> config: x86_64-randconfig-r003-20230626
>(https://urldefense.com/v3/__https://download.01.org/0day-
>ci/archive/20230626/202306260401.qZlYQpV2-
>lkp@intel.com/config__;!!A3Ni8CS0y2Y!8_hG3CE9MEp7WGmtpHuJhRpyycfvZX2KSjXq
>lC8DQVkUWpcL2zcPVAFQpJ4KxsH35hJP2pmvm8bIz_FXyDwMkGeosrRvALWc$ )
>> compiler: clang version 15.0.7
>(https://urldefense.com/v3/__https://github.com/llvm/llvm-
>project.git__;!!A3Ni8CS0y2Y!8_hG3CE9MEp7WGmtpHuJhRpyycfvZX2KSjXqlC8DQVkU
>WpcL2zcPVAFQpJ4KxsH35hJP2pmvm8bIz_FXyDwMkGeosvqDz55X$
>8dfdcc7b7bf66834a761bd8de445840ef68e4d1a)
>> reproduce: (https://urldefense.com/v3/__https://download.01.org/0day-
>ci/archive/20230626/202306260401.qZlYQpV2-
>lkp@intel.com/reproduce__;!!A3Ni8CS0y2Y!8_hG3CE9MEp7WGmtpHuJhRpyycfvZX2K
>SjXqlC8DQVkUWpcL2zcPVAFQpJ4KxsH35hJP2pmvm8bIz_FXyDwMkGeosglKrEOj$ )
>>
>> 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://urldefense.com/v3/__https://lore.kernel.org/oe-kbuild-
>all/202306260401.qZlYQpV2-
>lkp@intel.com/__;!!A3Ni8CS0y2Y!8_hG3CE9MEp7WGmtpHuJhRpyycfvZX2KSjXqlC8DQ
>VkUWpcL2zcPVAFQpJ4KxsH35hJP2pmvm8bIz_FXyDwMkGeosnz2lU0N$
>>
>> 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
>
Hi Andy,

As far as I understand, I should update the code then resend it again, right?

Regards,
Okan Sahin

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [linux-next:master 11546/12162] drivers/mfd/max77541.c:176:18: warning: cast to smaller integer type 'enum max7754x_ids' from 'const void *'
  2023-06-26  9:54   ` Sahin, Okan
@ 2023-06-26 11:25     ` Andy Shevchenko
  2023-06-26 15:34       ` Lee Jones
  0 siblings, 1 reply; 5+ messages in thread
From: Andy Shevchenko @ 2023-06-26 11:25 UTC (permalink / raw)
  To: Sahin, Okan
  Cc: kernel test robot, llvm, oe-kbuild-all,
	Linux Memory Management List, Lee Jones

On Mon, Jun 26, 2023 at 09:54:52AM +0000, Sahin, Okan wrote:
> >On Mon, Jun 26, 2023 at 04:53:43AM +0800, kernel test robot wrote:
> >> tree:
> >https://urldefense.com/v3/__https://git.kernel.org/pub/scm/linux/kernel/git/next/lin
> >ux-
> >next.git__;!!A3Ni8CS0y2Y!8_hG3CE9MEp7WGmtpHuJhRpyycfvZX2KSjXqlC8DQVkUWp
> >cL2zcPVAFQpJ4KxsH35hJP2pmvm8bIz_FXyDwMkGeosibK3JnB$  master
> >> head:   8d2be868b42c08290509c60515865f4de24ea704
> >> commit: e0cbc202388af454eb771043b20db6dfe68199ec [11546/12162] mfd:
> >max77541: Add ADI MAX77541/MAX77540 PMIC Support
> >> config: x86_64-randconfig-r003-20230626
> >(https://urldefense.com/v3/__https://download.01.org/0day-
> >ci/archive/20230626/202306260401.qZlYQpV2-
> >lkp@intel.com/config__;!!A3Ni8CS0y2Y!8_hG3CE9MEp7WGmtpHuJhRpyycfvZX2KSjXq
> >lC8DQVkUWpcL2zcPVAFQpJ4KxsH35hJP2pmvm8bIz_FXyDwMkGeosrRvALWc$ )
> >> compiler: clang version 15.0.7
> >(https://urldefense.com/v3/__https://github.com/llvm/llvm-
> >project.git__;!!A3Ni8CS0y2Y!8_hG3CE9MEp7WGmtpHuJhRpyycfvZX2KSjXqlC8DQVkU
> >WpcL2zcPVAFQpJ4KxsH35hJP2pmvm8bIz_FXyDwMkGeosvqDz55X$
> >8dfdcc7b7bf66834a761bd8de445840ef68e4d1a)
> >> reproduce: (https://urldefense.com/v3/__https://download.01.org/0day-
> >ci/archive/20230626/202306260401.qZlYQpV2-
> >lkp@intel.com/reproduce__;!!A3Ni8CS0y2Y!8_hG3CE9MEp7WGmtpHuJhRpyycfvZX2K
> >SjXqlC8DQVkUWpcL2zcPVAFQpJ4KxsH35hJP2pmvm8bIz_FXyDwMkGeosglKrEOj$ )
> >>
> >> 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://urldefense.com/v3/__https://lore.kernel.org/oe-kbuild-
> >all/202306260401.qZlYQpV2-
> >lkp@intel.com/__;!!A3Ni8CS0y2Y!8_hG3CE9MEp7WGmtpHuJhRpyycfvZX2KSjXqlC8DQ
> >VkUWpcL2zcPVAFQpJ4KxsH35hJP2pmvm8bIz_FXyDwMkGeosnz2lU0N$
> >>
> >> 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
> >
> Hi Andy,
> 
> As far as I understand, I should update the code then resend it again, right?

Ask Lee, I'm not the MFD maintainer.

-- 
With Best Regards,
Andy Shevchenko



^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [linux-next:master 11546/12162] drivers/mfd/max77541.c:176:18: warning: cast to smaller integer type 'enum max7754x_ids' from 'const void *'
  2023-06-26 11:25     ` Andy Shevchenko
@ 2023-06-26 15:34       ` Lee Jones
  0 siblings, 0 replies; 5+ messages in thread
From: Lee Jones @ 2023-06-26 15:34 UTC (permalink / raw)
  To: Andy Shevchenko
  Cc: Sahin, Okan, kernel test robot, llvm, oe-kbuild-all,
	Linux Memory Management List

On Mon, 26 Jun 2023, Andy Shevchenko wrote:

> On Mon, Jun 26, 2023 at 09:54:52AM +0000, Sahin, Okan wrote:
> > >On Mon, Jun 26, 2023 at 04:53:43AM +0800, kernel test robot wrote:
> > >> tree:
> > >https://urldefense.com/v3/__https://git.kernel.org/pub/scm/linux/kernel/git/next/lin
> > >ux-
> > >next.git__;!!A3Ni8CS0y2Y!8_hG3CE9MEp7WGmtpHuJhRpyycfvZX2KSjXqlC8DQVkUWp
> > >cL2zcPVAFQpJ4KxsH35hJP2pmvm8bIz_FXyDwMkGeosibK3JnB$  master
> > >> head:   8d2be868b42c08290509c60515865f4de24ea704
> > >> commit: e0cbc202388af454eb771043b20db6dfe68199ec [11546/12162] mfd:
> > >max77541: Add ADI MAX77541/MAX77540 PMIC Support
> > >> config: x86_64-randconfig-r003-20230626
> > >(https://urldefense.com/v3/__https://download.01.org/0day-
> > >ci/archive/20230626/202306260401.qZlYQpV2-
> > >lkp@intel.com/config__;!!A3Ni8CS0y2Y!8_hG3CE9MEp7WGmtpHuJhRpyycfvZX2KSjXq
> > >lC8DQVkUWpcL2zcPVAFQpJ4KxsH35hJP2pmvm8bIz_FXyDwMkGeosrRvALWc$ )
> > >> compiler: clang version 15.0.7
> > >(https://urldefense.com/v3/__https://github.com/llvm/llvm-
> > >project.git__;!!A3Ni8CS0y2Y!8_hG3CE9MEp7WGmtpHuJhRpyycfvZX2KSjXqlC8DQVkU
> > >WpcL2zcPVAFQpJ4KxsH35hJP2pmvm8bIz_FXyDwMkGeosvqDz55X$
> > >8dfdcc7b7bf66834a761bd8de445840ef68e4d1a)
> > >> reproduce: (https://urldefense.com/v3/__https://download.01.org/0day-
> > >ci/archive/20230626/202306260401.qZlYQpV2-
> > >lkp@intel.com/reproduce__;!!A3Ni8CS0y2Y!8_hG3CE9MEp7WGmtpHuJhRpyycfvZX2K
> > >SjXqlC8DQVkUWpcL2zcPVAFQpJ4KxsH35hJP2pmvm8bIz_FXyDwMkGeosglKrEOj$ )
> > >>
> > >> 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://urldefense.com/v3/__https://lore.kernel.org/oe-kbuild-
> > >all/202306260401.qZlYQpV2-
> > >lkp@intel.com/__;!!A3Ni8CS0y2Y!8_hG3CE9MEp7WGmtpHuJhRpyycfvZX2KSjXqlC8DQ
> > >VkUWpcL2zcPVAFQpJ4KxsH35hJP2pmvm8bIz_FXyDwMkGeosnz2lU0N$
> > >>
> > >> 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
> > >
> > Hi Andy,
> > 
> > As far as I understand, I should update the code then resend it again, right?
> 
> Ask Lee, I'm not the MFD maintainer.

What kind of warning is this?  W=1?

-- 
Lee Jones [李琼斯]

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2023-06-26 15:34 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-06-25 20:53 [linux-next:master 11546/12162] drivers/mfd/max77541.c:176:18: warning: cast to smaller integer type 'enum max7754x_ids' from 'const void *' kernel test robot
2023-06-26  8:48 ` Andy Shevchenko
2023-06-26  9:54   ` Sahin, Okan
2023-06-26 11:25     ` Andy Shevchenko
2023-06-26 15:34       ` Lee Jones

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.