mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: kbuild test robot <lkp@intel.com>
To: Enric Balletbo i Serra <enric.balletbo@collabora.com>
Cc: kbuild-all@01.org, lee.jones@linaro.org, gwendal@chromium.org,
	drinkcat@chromium.org, linux-kernel@vger.kernel.org,
	groeck@chromium.org, kernel@collabora.com, bleung@chromium.org,
	Olof Johansson <olof@lixom.net>
Subject: Re: [PATCH v2 3/8] mfd / platform: cros_ec: move vbc attributes to its own driver.
Date: Tue, 27 Nov 2018 04:06:46 +0800	[thread overview]
Message-ID: <201811270441.eMEP5mwf%fengguang.wu@intel.com> (raw)
In-Reply-To: <20181126175158.5425-4-enric.balletbo@collabora.com>

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

Hi Enric,

I love your patch! Yet something to improve:

[auto build test ERROR on linus/master]
[also build test ERROR on v4.20-rc4 next-20181126]
[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/Enric-Balletbo-i-Serra/mfd-platform-cros_ec-move-cros_ec-sysfs-attributes-to-its-own-drivers/20181127-032421
config: x86_64-randconfig-x017-201847 (attached as .config)
compiler: gcc-7 (Debian 7.3.0-1) 7.3.0
reproduce:
        # save the attached .config to linux build tree
        make ARCH=x86_64 

Note: the linux-review/Enric-Balletbo-i-Serra/mfd-platform-cros_ec-move-cros_ec-sysfs-attributes-to-its-own-drivers/20181127-032421 HEAD 08af4d071e30b3c486bdef3b3834f0f106f98187 builds fine.
      It only hurts bisectibility.

All error/warnings (new ones prefixed by >>):

   drivers//mfd/cros_ec_dev.c: In function 'ec_device_probe':
>> drivers//mfd/cros_ec_dev.c:487:2: error: 'node' undeclared (first use in this function); did you mean 'inode'?
     node = ec->ec_dev->dev->of_node;
     ^~~~
     inode
   drivers//mfd/cros_ec_dev.c:487:2: note: each undeclared identifier is reported only once for each function it appears in
>> drivers//mfd/cros_ec_dev.c:488:6: error: implicit declaration of function 'of_property_read_bool' [-Werror=implicit-function-declaration]
     if (of_property_read_bool(node, "google,has-vbc-nvram")) {
         ^~~~~~~~~~~~~~~~~~~~~
>> drivers//mfd/cros_ec_dev.c:490:7: error: 'cros_ec_vbc_cells' undeclared (first use in this function); did you mean 'cros_ec_rtc_cells'?
          cros_ec_vbc_cells,
          ^~~~~~~~~~~~~~~~~
          cros_ec_rtc_cells
   In file included from include/linux/kernel.h:15:0,
                    from include/linux/list.h:9,
                    from include/linux/wait.h:7,
                    from include/linux/wait_bit.h:8,
                    from include/linux/fs.h:6,
                    from drivers//mfd/cros_ec_dev.c:20:
>> include/linux/build_bug.h:29:45: error: bit-field '<anonymous>' width not an integer constant
    #define BUILD_BUG_ON_ZERO(e) (sizeof(struct { int:(-!!(e)); }))
                                                ^
   include/linux/compiler.h:379:28: note: in expansion of macro 'BUILD_BUG_ON_ZERO'
    #define __must_be_array(a) BUILD_BUG_ON_ZERO(__same_type((a), &(a)[0]))
                               ^~~~~~~~~~~~~~~~~
   include/linux/kernel.h:72:59: note: in expansion of macro '__must_be_array'
    #define ARRAY_SIZE(arr) (sizeof(arr) / sizeof((arr)[0]) + __must_be_array(arr))
                                                              ^~~~~~~~~~~~~~~
>> drivers//mfd/cros_ec_dev.c:491:7: note: in expansion of macro 'ARRAY_SIZE'
          ARRAY_SIZE(cros_ec_vbc_cells),
          ^~~~~~~~~~
   cc1: some warnings being treated as errors
--
   drivers/mfd/cros_ec_dev.c: In function 'ec_device_probe':
   drivers/mfd/cros_ec_dev.c:487:2: error: 'node' undeclared (first use in this function); did you mean 'inode'?
     node = ec->ec_dev->dev->of_node;
     ^~~~
     inode
   drivers/mfd/cros_ec_dev.c:487:2: note: each undeclared identifier is reported only once for each function it appears in
   drivers/mfd/cros_ec_dev.c:488:6: error: implicit declaration of function 'of_property_read_bool' [-Werror=implicit-function-declaration]
     if (of_property_read_bool(node, "google,has-vbc-nvram")) {
         ^~~~~~~~~~~~~~~~~~~~~
   drivers/mfd/cros_ec_dev.c:490:7: error: 'cros_ec_vbc_cells' undeclared (first use in this function); did you mean 'cros_ec_rtc_cells'?
          cros_ec_vbc_cells,
          ^~~~~~~~~~~~~~~~~
          cros_ec_rtc_cells
   In file included from include/linux/kernel.h:15:0,
                    from include/linux/list.h:9,
                    from include/linux/wait.h:7,
                    from include/linux/wait_bit.h:8,
                    from include/linux/fs.h:6,
                    from drivers/mfd/cros_ec_dev.c:20:
>> include/linux/build_bug.h:29:45: error: bit-field '<anonymous>' width not an integer constant
    #define BUILD_BUG_ON_ZERO(e) (sizeof(struct { int:(-!!(e)); }))
                                                ^
   include/linux/compiler.h:379:28: note: in expansion of macro 'BUILD_BUG_ON_ZERO'
    #define __must_be_array(a) BUILD_BUG_ON_ZERO(__same_type((a), &(a)[0]))
                               ^~~~~~~~~~~~~~~~~
   include/linux/kernel.h:72:59: note: in expansion of macro '__must_be_array'
    #define ARRAY_SIZE(arr) (sizeof(arr) / sizeof((arr)[0]) + __must_be_array(arr))
                                                              ^~~~~~~~~~~~~~~
   drivers/mfd/cros_ec_dev.c:491:7: note: in expansion of macro 'ARRAY_SIZE'
          ARRAY_SIZE(cros_ec_vbc_cells),
          ^~~~~~~~~~
   cc1: some warnings being treated as errors

vim +/of_property_read_bool +488 drivers//mfd/cros_ec_dev.c

   395	
   396	static int ec_device_probe(struct platform_device *pdev)
   397	{
   398		int retval = -ENOMEM;
   399		struct device *dev = &pdev->dev;
   400		struct cros_ec_platform *ec_platform = dev_get_platdata(dev);
   401		struct cros_ec_dev *ec = devm_kzalloc(dev, sizeof(*ec), GFP_KERNEL);
   402	
   403		if (!ec)
   404			return retval;
   405	
   406		dev_set_drvdata(dev, ec);
   407		ec->ec_dev = dev_get_drvdata(dev->parent);
   408		ec->dev = dev;
   409		ec->cmd_offset = ec_platform->cmd_offset;
   410		ec->features[0] = -1U; /* Not cached yet */
   411		ec->features[1] = -1U; /* Not cached yet */
   412		device_initialize(&ec->class_dev);
   413		cdev_init(&ec->cdev, &fops);
   414	
   415		/*
   416		 * Add the class device
   417		 * Link to the character device for creating the /dev entry
   418		 * in devtmpfs.
   419		 */
   420		ec->class_dev.devt = MKDEV(ec_major, pdev->id);
   421		ec->class_dev.class = &cros_class;
   422		ec->class_dev.parent = dev;
   423	
   424		retval = dev_set_name(&ec->class_dev, "%s", ec_platform->ec_name);
   425		if (retval) {
   426			dev_err(dev, "dev_set_name failed => %d\n", retval);
   427			goto failed;
   428		}
   429	
   430		/* check whether this EC is a sensor hub. */
   431		if (cros_ec_check_features(ec, EC_FEATURE_MOTION_SENSE))
   432			cros_ec_sensors_register(ec);
   433	
   434		/* Check whether this EC instance has CEC host command support */
   435		if (cros_ec_check_features(ec, EC_FEATURE_CEC)) {
   436			retval = mfd_add_devices(ec->dev, PLATFORM_DEVID_AUTO,
   437						 cros_ec_cec_cells,
   438						 ARRAY_SIZE(cros_ec_cec_cells),
   439						 NULL, 0, NULL);
   440			if (retval)
   441				dev_err(ec->dev,
   442					"failed to add cros-ec-cec device: %d\n",
   443					retval);
   444		}
   445	
   446		/* Check whether this EC instance has RTC host command support */
   447		if (cros_ec_check_features(ec, EC_FEATURE_RTC)) {
   448			retval = mfd_add_devices(ec->dev, PLATFORM_DEVID_AUTO,
   449						 cros_ec_rtc_cells,
   450						 ARRAY_SIZE(cros_ec_rtc_cells),
   451						 NULL, 0, NULL);
   452			if (retval)
   453				dev_err(ec->dev,
   454					"failed to add cros-ec-rtc device: %d\n",
   455					retval);
   456		}
   457	
   458		/* Check whether this EC instance has the PD charge manager */
   459		if (cros_ec_check_features(ec, EC_FEATURE_USB_PD)) {
   460			retval = mfd_add_devices(ec->dev, PLATFORM_DEVID_AUTO,
   461						 cros_usbpd_charger_cells,
   462						 ARRAY_SIZE(cros_usbpd_charger_cells),
   463						 NULL, 0, NULL);
   464			if (retval)
   465				dev_err(ec->dev,
   466					"failed to add cros-usbpd-charger device: %d\n",
   467					retval);
   468		}
   469	
   470		/* We can now add the sysfs class, we know which parameter to show */
   471		retval = cdev_device_add(&ec->cdev, &ec->class_dev);
   472		if (retval) {
   473			dev_err(dev, "cdev_device_add failed => %d\n", retval);
   474			goto failed;
   475		}
   476	
   477		retval = mfd_add_devices(ec->dev, PLATFORM_DEVID_AUTO,
   478					 cros_ec_platform_cells,
   479					 ARRAY_SIZE(cros_ec_platform_cells),
   480					 NULL, 0, NULL);
   481		if (retval)
   482			dev_warn(ec->dev,
   483				 "failed to add cros-ec platform devices: %d\n",
   484				 retval);
   485	
   486		/* Check whether this EC instance has a VBC NVRAM */
 > 487		node = ec->ec_dev->dev->of_node;
 > 488		if (of_property_read_bool(node, "google,has-vbc-nvram")) {
   489			retval = mfd_add_devices(ec->dev, PLATFORM_DEVID_AUTO,
 > 490						 cros_ec_vbc_cells,
 > 491						 ARRAY_SIZE(cros_ec_vbc_cells),
   492						 NULL, 0, NULL);
   493			if (retval)
   494				dev_warn(ec->dev, "failed to add VBC devices: %d\n",
   495					 retval);
   496		}
   497	
   498		if (cros_ec_debugfs_init(ec))
   499			dev_warn(dev, "failed to create debugfs directory\n");
   500	
   501		return 0;
   502	
   503	failed:
   504		put_device(&ec->class_dev);
   505		return retval;
   506	}
   507	

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

[-- Attachment #2: .config.gz --]
[-- Type: application/gzip, Size: 27619 bytes --]

  reply	other threads:[~2018-11-26 20:07 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-11-26 17:51 [PATCH v2 0/8] mfd / platform: cros_ec: move cros_ec sysfs attributes to its own drivers Enric Balletbo i Serra
2018-11-26 17:51 ` [PATCH v2 1/8] mfd / platform: cros_ec: use devm_mfd_add_devices Enric Balletbo i Serra
2018-11-26 17:58   ` Guenter Roeck
2018-11-26 17:51 ` [PATCH v2 2/8] mfd / platform: cros_ec: move lightbar attributes to its own driver Enric Balletbo i Serra
2018-11-26 17:51 ` [PATCH v2 3/8] mfd / platform: cros_ec: move vbc " Enric Balletbo i Serra
2018-11-26 20:06   ` kbuild test robot [this message]
2018-11-26 17:51 ` [PATCH v2 4/8] mfd / platform: cros_ec: move debugfs " Enric Balletbo i Serra
2018-11-26 17:51 ` [PATCH v2 5/8] mfd / platform: cros_ec: move device sysfs " Enric Balletbo i Serra
2018-11-26 17:51 ` [PATCH v2 6/8] mfd / platform: cros_ec: instantiate only if th EC has a VBC NVRAM Enric Balletbo i Serra
2018-11-26 17:51 ` [PATCH v2 7/8] platform/chrome: cros_ec_lightbar: instantiate only if the EC has a lightbar Enric Balletbo i Serra
2018-11-26 17:51 ` [PATCH v2 8/8] mfd: cros_ec: add a dev_release empty method Enric Balletbo i Serra

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=201811270441.eMEP5mwf%fengguang.wu@intel.com \
    --to=lkp@intel.com \
    --cc=bleung@chromium.org \
    --cc=drinkcat@chromium.org \
    --cc=enric.balletbo@collabora.com \
    --cc=groeck@chromium.org \
    --cc=gwendal@chromium.org \
    --cc=kbuild-all@01.org \
    --cc=kernel@collabora.com \
    --cc=lee.jones@linaro.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=olof@lixom.net \
    /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

all inboxes | Powered by JetHome®