From: kernel test robot <lkp@intel.com>
To: Andy Shevchenko <andriy.shevchenko@linux.intel.com>,
linux-acpi@vger.kernel.org, linux-kernel@vger.kernel.org
Cc: kbuild-all@lists.01.org, Daniel Scally <djrscally@gmail.com>,
Heikki Krogerus <heikki.krogerus@linux.intel.com>,
Sakari Ailus <sakari.ailus@linux.intel.com>,
Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
"Rafael J. Wysocki" <rafael@kernel.org>,
Len Brown <lenb@kernel.org>, Michael Walle <michael@walle.cc>
Subject: Re: [PATCH v5 4/4] device property: Constify fwnode APIs that uses fwnode_get_next_parent()
Date: Thu, 7 Apr 2022 01:51:43 +0800 [thread overview]
Message-ID: <202204070123.UdpbjnDH-lkp@intel.com> (raw)
In-Reply-To: <20220406130552.30930-4-andriy.shevchenko@linux.intel.com>
Hi Andy,
I love your patch! Perhaps something to improve:
[auto build test WARNING on driver-core/driver-core-testing]
[also build test WARNING on rafael-pm/linux-next linus/master linux/master v5.18-rc1 next-20220406]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch]
url: https://github.com/intel-lab-lkp/linux/commits/Andy-Shevchenko/device-property-Allow-error-pointer-to-be-passed-to-fwnode-APIs/20220407-002511
base: https://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core.git 3123109284176b1532874591f7c81f3837bbdc17
config: powerpc-allnoconfig (https://download.01.org/0day-ci/archive/20220407/202204070123.UdpbjnDH-lkp@intel.com/config)
compiler: powerpc-linux-gcc (GCC) 11.2.0
reproduce (this is a W=1 build):
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# https://github.com/intel-lab-lkp/linux/commit/d9d353ada8d8c3b1b7f3965ad7fe191bd7dea930
git remote add linux-review https://github.com/intel-lab-lkp/linux
git fetch --no-tags linux-review Andy-Shevchenko/device-property-Allow-error-pointer-to-be-passed-to-fwnode-APIs/20220407-002511
git checkout d9d353ada8d8c3b1b7f3965ad7fe191bd7dea930
# save the config file to linux build tree
mkdir build_dir
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-11.2.0 make.cross O=build_dir ARCH=powerpc SHELL=/bin/bash drivers/base/
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>
All warnings (new ones prefixed by >>):
drivers/base/property.c: In function 'fwnode_get_nth_parent':
>> drivers/base/property.c:647:42: warning: passing argument 1 of 'fwnode_handle_get' discards 'const' qualifier from pointer target type [-Wdiscarded-qualifiers]
647 | return fwnode_handle_get(fwnode);
| ^~~~~~
In file included from include/linux/of.h:22,
from include/linux/irqdomain.h:35,
from include/linux/acpi.h:13,
from drivers/base/property.c:10:
include/linux/property.h:123:63: note: expected 'struct fwnode_handle *' but argument is of type 'const struct fwnode_handle *'
123 | struct fwnode_handle *fwnode_handle_get(struct fwnode_handle *fwnode);
| ~~~~~~~~~~~~~~~~~~~~~~^~~~~~
vim +647 drivers/base/property.c
87e5e95db31a27 Sakari Ailus 2019-10-03 629
87e5e95db31a27 Sakari Ailus 2019-10-03 630 /**
87e5e95db31a27 Sakari Ailus 2019-10-03 631 * fwnode_get_nth_parent - Return an nth parent of a node
87e5e95db31a27 Sakari Ailus 2019-10-03 632 * @fwnode: The node the parent of which is requested
87e5e95db31a27 Sakari Ailus 2019-10-03 633 * @depth: Distance of the parent from the node
87e5e95db31a27 Sakari Ailus 2019-10-03 634 *
87e5e95db31a27 Sakari Ailus 2019-10-03 635 * Returns the nth parent of a node. If there is no parent at the requested
87e5e95db31a27 Sakari Ailus 2019-10-03 636 * @depth, %NULL is returned. If @depth is 0, the functionality is equivalent to
87e5e95db31a27 Sakari Ailus 2019-10-03 637 * fwnode_handle_get(). For @depth == 1, it is fwnode_get_parent() and so on.
87e5e95db31a27 Sakari Ailus 2019-10-03 638 *
87e5e95db31a27 Sakari Ailus 2019-10-03 639 * The caller is responsible for calling fwnode_handle_put() for the returned
87e5e95db31a27 Sakari Ailus 2019-10-03 640 * node.
87e5e95db31a27 Sakari Ailus 2019-10-03 641 */
d9d353ada8d8c3 Andy Shevchenko 2022-04-06 642 struct fwnode_handle *fwnode_get_nth_parent(const struct fwnode_handle *fwnode, unsigned int depth)
87e5e95db31a27 Sakari Ailus 2019-10-03 643 {
040f806ecab6cd Andy Shevchenko 2022-04-06 644 struct fwnode_handle *parent;
87e5e95db31a27 Sakari Ailus 2019-10-03 645
040f806ecab6cd Andy Shevchenko 2022-04-06 646 if (depth == 0)
040f806ecab6cd Andy Shevchenko 2022-04-06 @647 return fwnode_handle_get(fwnode);
87e5e95db31a27 Sakari Ailus 2019-10-03 648
040f806ecab6cd Andy Shevchenko 2022-04-06 649 fwnode_for_each_parent_node(fwnode, parent) {
040f806ecab6cd Andy Shevchenko 2022-04-06 650 if (--depth == 0)
040f806ecab6cd Andy Shevchenko 2022-04-06 651 return parent;
040f806ecab6cd Andy Shevchenko 2022-04-06 652 }
040f806ecab6cd Andy Shevchenko 2022-04-06 653 return NULL;
87e5e95db31a27 Sakari Ailus 2019-10-03 654 }
87e5e95db31a27 Sakari Ailus 2019-10-03 655 EXPORT_SYMBOL_GPL(fwnode_get_nth_parent);
87e5e95db31a27 Sakari Ailus 2019-10-03 656
--
0-DAY CI Kernel Test Service
https://01.org/lkp
next prev parent reply other threads:[~2022-04-06 20:23 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-04-06 13:05 [PATCH v5 1/4] device property: Allow error pointer to be passed to fwnode APIs Andy Shevchenko
2022-04-06 13:05 ` [PATCH v5 2/4] device property: Introduce fwnode_for_each_parent_node() Andy Shevchenko
2022-04-06 13:26 ` Sakari Ailus
2022-04-06 13:05 ` [PATCH v5 3/4] device property: Drop 'test' prefix in parameters of fwnode_is_ancestor_of() Andy Shevchenko
2022-04-06 13:05 ` [PATCH v5 4/4] device property: Constify fwnode APIs that uses fwnode_get_next_parent() Andy Shevchenko
2022-04-06 17:51 ` kernel test robot [this message]
2022-04-06 19:24 ` kernel test robot
2022-04-07 6:41 ` kernel test robot
2022-04-06 18:05 ` [PATCH v5 1/4] device property: Allow error pointer to be passed to fwnode APIs Michael Walle
2022-04-07 10:19 ` Andy Shevchenko
2022-04-08 12:44 ` Andy Shevchenko
2022-04-08 13:27 ` Sakari Ailus
2022-04-08 14:53 ` Andy Shevchenko
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=202204070123.UdpbjnDH-lkp@intel.com \
--to=lkp@intel.com \
--cc=andriy.shevchenko@linux.intel.com \
--cc=djrscally@gmail.com \
--cc=gregkh@linuxfoundation.org \
--cc=heikki.krogerus@linux.intel.com \
--cc=kbuild-all@lists.01.org \
--cc=lenb@kernel.org \
--cc=linux-acpi@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=michael@walle.cc \
--cc=rafael@kernel.org \
--cc=sakari.ailus@linux.intel.com \
/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.