linux-pm.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: kbuild test robot <lkp@intel.com>
Cc: kbuild-all@01.org, sre@kernel.org, dbaryshkov@gmail.com,
	dwmw2@infradead.org, linux-pm@vger.kernel.org,
	Phil Reid <preid@electromag.com.au>
Subject: Re: [PATCH v2 4/4] power: sbs-battery: Use gpio_desc and sleeping calls for battery detect
Date: Sun, 31 Jul 2016 09:28:16 +0800	[thread overview]
Message-ID: <201607310946.9Kg0XntU%fengguang.wu@intel.com> (raw)
In-Reply-To: <1469414580-14121-5-git-send-email-preid@electromag.com.au>

[-- Attachment #1: Type: text/plain, Size: 4653 bytes --]

Hi,

[auto build test ERROR on battery/master]
[also build test ERROR on v4.7 next-20160729]
[if your patch is applied to the wrong git tree, please drop us a note to help improve the system]

url:    https://github.com/0day-ci/linux/commits/Phil-Reid/power-sbs-battery-fixup-gpio-detect-irq-handling/20160725-160137
base:   git://git.infradead.org/battery-2.6.git master
config: x86_64-randconfig-s3-07310833 (attached as .config)
compiler: gcc-6 (Debian 6.1.1-9) 6.1.1 20160705
reproduce:
        # save the attached .config to linux build tree
        make ARCH=x86_64 

All errors (new ones prefixed by >>):

   drivers/power/sbs-battery.c: In function 'sbs_get_battery_presence_and_health':
   drivers/power/sbs-battery.c:305:9: error: implicit declaration of function 'gpiod_get_value_cansleep' [-Werror=implicit-function-declaration]
      ret = gpiod_get_value_cansleep(chip->gpio_detect);
            ^~~~~~~~~~~~~~~~~~~~~~~~
   drivers/power/sbs-battery.c: In function 'sbs_populate_pdata':
   drivers/power/sbs-battery.c:743:22: error: implicit declaration of function 'gpio_to_desc' [-Werror=implicit-function-declaration]
     chip->gpio_detect = gpio_to_desc(pdata->battery_detect);
                         ^~~~~~~~~~~~
   drivers/power/sbs-battery.c:743:20: warning: assignment makes pointer from integer without a cast [-Wint-conversion]
     chip->gpio_detect = gpio_to_desc(pdata->battery_detect);
                       ^
   drivers/power/sbs-battery.c: In function 'sbs_of_populate_pdata':
>> drivers/power/sbs-battery.c:793:22: error: implicit declaration of function 'devm_gpiod_get_optional' [-Werror=implicit-function-declaration]
     chip->gpio_detect = devm_gpiod_get_optional(&client->dev,
                         ^~~~~~~~~~~~~~~~~~~~~~~
>> drivers/power/sbs-battery.c:794:26: error: 'GPIOD_IN' undeclared (first use in this function)
       "sbs,battery-detect", GPIOD_IN);
                             ^~~~~~~~
   drivers/power/sbs-battery.c:794:26: note: each undeclared identifier is reported only once for each function it appears in
   drivers/power/sbs-battery.c: In function 'sbs_probe':
   drivers/power/sbs-battery.c:870:8: error: implicit declaration of function 'gpiod_to_irq' [-Werror=implicit-function-declaration]
     irq = gpiod_to_irq(chip->gpio_detect);
           ^~~~~~~~~~~~
   cc1: some warnings being treated as errors

vim +/devm_gpiod_get_optional +793 drivers/power/sbs-battery.c

   737					   flags, dev_name(&client->dev));
   738		if (rc) {
   739			dev_warn(&client->dev, "Failed to get gpio: %d\n", rc);
   740			return pdata;
   741		}
   742	
 > 743		chip->gpio_detect = gpio_to_desc(pdata->battery_detect);
   744	
   745		return pdata;
   746	}
   747	
   748	#if defined(CONFIG_OF)
   749	
   750	#include <linux/of_device.h>
   751	#include <linux/of_gpio.h>
   752	
   753	static const struct of_device_id sbs_dt_ids[] = {
   754		{ .compatible = "sbs,sbs-battery" },
   755		{ .compatible = "ti,bq20z75" },
   756		{ }
   757	};
   758	MODULE_DEVICE_TABLE(of, sbs_dt_ids);
   759	
   760	static struct sbs_platform_data *sbs_of_populate_pdata(struct sbs_info *chip)
   761	{
   762		struct i2c_client *client = chip->client;
   763		struct device_node *of_node = client->dev.of_node;
   764		struct sbs_platform_data *pdata = NULL;
   765		int rc;
   766		u32 prop;
   767	
   768		/* verify this driver matches this device */
   769		if (!of_node)
   770			return NULL;
   771	
   772		/* first make sure at least one property is set, otherwise
   773		 * it won't change behavior from running without pdata.
   774		 */
   775		if (!of_get_property(of_node, "sbs,i2c-retry-count", NULL) &&
   776			!of_get_property(of_node, "sbs,poll-retry-count", NULL) &&
   777			!of_get_property(of_node, "sbs,battery-detect-gpios", NULL))
   778			goto of_out;
   779	
   780		pdata = devm_kzalloc(&client->dev, sizeof(struct sbs_platform_data),
   781					GFP_KERNEL);
   782		if (!pdata)
   783			return ERR_PTR(-ENOMEM);
   784	
   785		rc = of_property_read_u32(of_node, "sbs,i2c-retry-count", &prop);
   786		if (!rc)
   787			pdata->i2c_retry_count = prop;
   788	
   789		rc = of_property_read_u32(of_node, "sbs,poll-retry-count", &prop);
   790		if (!rc)
   791			pdata->poll_retry_count = prop;
   792	
 > 793		chip->gpio_detect = devm_gpiod_get_optional(&client->dev,
 > 794				"sbs,battery-detect", GPIOD_IN);
   795	
   796		if (IS_ERR(chip->gpio_detect)) {
   797			dev_err(&client->dev, "Failed to get gpio: %ld\n",

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

[-- Attachment #2: .config.gz --]
[-- Type: application/octet-stream, Size: 23864 bytes --]

  parent reply	other threads:[~2016-07-31  1:29 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-07-25  2:42 [PATCH v2 0/4] power: sbs-battery fixup gpio detect irq handling Phil Reid
2016-07-25  2:42 ` [PATCH v2 1/4] power: sbs-battery: Use devm_kzalloc to alloc data Phil Reid
2016-07-25  2:42 ` [PATCH v2 2/4] power: sbs-battery: Request threaded irq and fix dev callback cookie Phil Reid
2016-07-25  2:42 ` [PATCH v2 3/4] power: sbs-battery: Use devm_power_supply_register Phil Reid
2016-07-25  2:43 ` [PATCH v2 4/4] power: sbs-battery: Use gpio_desc and sleeping calls for battery detect Phil Reid
2016-07-30 23:37   ` kbuild test robot
2016-07-31  0:14   ` kbuild test robot
2016-07-31  1:28   ` kbuild test robot [this message]
2016-08-15 21:08   ` Sebastian Reichel
2016-08-16  9:35     ` Phil Reid
2016-08-16 10:26       ` Sebastian Reichel

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=201607310946.9Kg0XntU%fengguang.wu@intel.com \
    --to=lkp@intel.com \
    --cc=dbaryshkov@gmail.com \
    --cc=dwmw2@infradead.org \
    --cc=kbuild-all@01.org \
    --cc=linux-pm@vger.kernel.org \
    --cc=preid@electromag.com.au \
    --cc=sre@kernel.org \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).