Re: [j.anaszewski-leds:for-next 4/4] drivers/leds/leds-pca9532.c:464:10: warning: cast from pointer to integer of different size

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

 



Hi Phil,

Please cast to uintptr_t instead of int.

Besides, pca9532_of_populate_pdata() is local, please add 'static'
modifier to its definition.

For now, I'm dropping the patch.

Thanks,
Jacek Anaszewski

On 06/13/2016 12:27 PM, kbuild test robot wrote:
tree:   https://git.kernel.org/pub/scm/linux/kernel/git/j.anaszewski/linux-leds for-next
head:   fa50a4fde61a4620ecbfac6f51be3913a6800bb7
commit: fa50a4fde61a4620ecbfac6f51be3913a6800bb7 [4/4] leds: pca9532: Add device tree binding
config: sparc64-allyesconfig (attached as .config)
compiler: sparc64-linux-gnu-gcc (Debian 5.3.1-8) 5.3.1 20160205
reproduce:
         wget https://git.kernel.org/cgit/linux/kernel/git/wfg/lkp-tests.git/plain/sbin/make.cross -O ~/bin/make.cross
         chmod +x ~/bin/make.cross
         git checkout fa50a4fde61a4620ecbfac6f51be3913a6800bb7
         # save the attached .config to linux build tree
         make.cross ARCH=sparc64

All warnings (new ones prefixed by >>):

    drivers/leds/leds-pca9532.c: In function 'pca9532_of_populate_pdata':
drivers/leds/leds-pca9532.c:464:10: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast]
      devid = (int)match->data;
              ^
    drivers/leds/leds-pca9532.c: In function 'pca9532_probe':
    drivers/leds/leds-pca9532.c:506:11: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast]
       devid = (int)of_match_device(
               ^

vim +464 drivers/leds/leds-pca9532.c

    448		return err;
    449	}
    450	
    451	struct pca9532_platform_data *pca9532_of_populate_pdata(struct device *dev,
    452							      struct device_node *np)
    453	{
    454		struct pca9532_platform_data *pdata;
    455		struct device_node *child;
    456		const struct of_device_id *match;
    457		int devid, maxleds;
    458		int i = 0;
    459	
    460		match = of_match_device(of_pca9532_leds_match, dev);
    461		if (!match)
    462			return ERR_PTR(-ENODEV);
    463	
  > 464		devid = (int)match->data;
    465		maxleds = pca9532_chip_info_tbl[devid].num_leds;
    466	
    467		pdata = devm_kzalloc(dev, sizeof(*pdata), GFP_KERNEL);
    468		if (!pdata)
    469			return ERR_PTR(-ENOMEM);
    470	
    471		for_each_child_of_node(np, child) {
    472			if (of_property_read_string(child, "label",

---
0-DAY kernel test infrastructure                Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all                   Intel Corporation



--
Best regards,
Jacek Anaszewski
--
To unsubscribe from this list: send the line "unsubscribe linux-leds" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



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

  Powered by Linux