All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jacek Anaszewski <j.anaszewski@samsung.com>
To: Phil Reid <preid@electromag.com.au>
Cc: kbuild test robot <fengguang.wu@intel.com>, linux-leds@vger.kernel.org
Subject: 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: Mon, 13 Jun 2016 13:47:13 +0200	[thread overview]
Message-ID: <575E9D41.4020204@samsung.com> (raw)
In-Reply-To: <201606131855.06gV7Rp0%fengguang.wu@intel.com>

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

  reply	other threads:[~2016-06-13 11:47 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-06-13 10:27 [j.anaszewski-leds:for-next 4/4] drivers/leds/leds-pca9532.c:464:10: warning: cast from pointer to integer of different size kbuild test robot
2016-06-13 11:47 ` Jacek Anaszewski [this message]
2016-06-14  7:31   ` Phil Reid

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=575E9D41.4020204@samsung.com \
    --to=j.anaszewski@samsung.com \
    --cc=fengguang.wu@intel.com \
    --cc=linux-leds@vger.kernel.org \
    --cc=preid@electromag.com.au \
    /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 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.