linux-acpi.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [rafael-pm:bleeding-edge 6/11] drivers/base/swnode.c:1120:17: error: too many arguments to function 'software_node_notify'
@ 2021-09-16  0:13 kernel test robot
  2021-09-16  6:58 ` Heikki Krogerus
  0 siblings, 1 reply; 3+ messages in thread
From: kernel test robot @ 2021-09-16  0:13 UTC (permalink / raw)
  To: Laurentiu Tudor
  Cc: kbuild-all, linux-acpi, devel, linux-pm, Rafael J. Wysocki,
	Heikki Krogerus

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

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm.git bleeding-edge
head:   9808623e1bba7d929b50865d7e2d7042cd4e5e7b
commit: 810fc8571f8b70a4263266d979f97edec2804574 [6/11] software node: balance refcount for managed sw nodes
config: arc-randconfig-r001-20210916 (attached as .config)
compiler: arc-elf-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://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm.git/commit/?id=810fc8571f8b70a4263266d979f97edec2804574
        git remote add rafael-pm https://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm.git
        git fetch --no-tags rafael-pm bleeding-edge
        git checkout 810fc8571f8b70a4263266d979f97edec2804574
        # save the attached .config to linux build tree
        mkdir build_dir
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-11.2.0 make.cross O=build_dir ARCH=arc SHELL=/bin/bash drivers/

If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>

All errors (new ones prefixed by >>):

   drivers/base/swnode.c: In function 'device_create_managed_software_node':
>> drivers/base/swnode.c:1120:17: error: too many arguments to function 'software_node_notify'
    1120 |                 software_node_notify(dev, KOBJ_ADD);
         |                 ^~~~~~~~~~~~~~~~~~~~
   In file included from drivers/base/swnode.c:14:
   drivers/base/base.h:206:6: note: declared here
     206 | void software_node_notify(struct device *dev);
         |      ^~~~~~~~~~~~~~~~~~~~


vim +/software_node_notify +1120 drivers/base/swnode.c

  1085	
  1086	/**
  1087	 * device_create_managed_software_node - Create a software node for a device
  1088	 * @dev: The device the software node is assigned to.
  1089	 * @properties: Device properties for the software node.
  1090	 * @parent: Parent of the software node.
  1091	 *
  1092	 * Creates a software node as a managed resource for @dev, which means the
  1093	 * lifetime of the newly created software node is tied to the lifetime of @dev.
  1094	 * Software nodes created with this function should not be reused or shared
  1095	 * because of that. The function takes a deep copy of @properties for the
  1096	 * software node.
  1097	 *
  1098	 * Since the new software node is assigned directly to @dev, and since it should
  1099	 * not be shared, it is not returned to the caller. The function returns 0 on
  1100	 * success, and errno in case of an error.
  1101	 */
  1102	int device_create_managed_software_node(struct device *dev,
  1103						const struct property_entry *properties,
  1104						const struct software_node *parent)
  1105	{
  1106		struct fwnode_handle *p = software_node_fwnode(parent);
  1107		struct fwnode_handle *fwnode;
  1108	
  1109		if (parent && !p)
  1110			return -EINVAL;
  1111	
  1112		fwnode = fwnode_create_software_node(properties, p);
  1113		if (IS_ERR(fwnode))
  1114			return PTR_ERR(fwnode);
  1115	
  1116		to_swnode(fwnode)->managed = true;
  1117		set_secondary_fwnode(dev, fwnode);
  1118	
  1119		if (device_is_registered(dev))
> 1120			software_node_notify(dev, KOBJ_ADD);
  1121	
  1122		return 0;
  1123	}
  1124	EXPORT_SYMBOL_GPL(device_create_managed_software_node);
  1125	

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org

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

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [rafael-pm:bleeding-edge 6/11] drivers/base/swnode.c:1120:17: error: too many arguments to function 'software_node_notify'
  2021-09-16  0:13 [rafael-pm:bleeding-edge 6/11] drivers/base/swnode.c:1120:17: error: too many arguments to function 'software_node_notify' kernel test robot
@ 2021-09-16  6:58 ` Heikki Krogerus
  2021-09-16 10:04   ` Rafael J. Wysocki
  0 siblings, 1 reply; 3+ messages in thread
From: Heikki Krogerus @ 2021-09-16  6:58 UTC (permalink / raw)
  To: kernel test robot
  Cc: Laurentiu Tudor, kbuild-all, linux-acpi, devel, linux-pm,
	Rafael J. Wysocki

On Thu, Sep 16, 2021 at 08:13:24AM +0800, kernel test robot wrote:
> tree:   https://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm.git bleeding-edge
> head:   9808623e1bba7d929b50865d7e2d7042cd4e5e7b
> commit: 810fc8571f8b70a4263266d979f97edec2804574 [6/11] software node: balance refcount for managed sw nodes
> config: arc-randconfig-r001-20210916 (attached as .config)
> compiler: arc-elf-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://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm.git/commit/?id=810fc8571f8b70a4263266d979f97edec2804574
>         git remote add rafael-pm https://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm.git
>         git fetch --no-tags rafael-pm bleeding-edge
>         git checkout 810fc8571f8b70a4263266d979f97edec2804574
>         # save the attached .config to linux build tree
>         mkdir build_dir
>         COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-11.2.0 make.cross O=build_dir ARCH=arc SHELL=/bin/bash drivers/
> 
> If you fix the issue, kindly add following tag as appropriate
> Reported-by: kernel test robot <lkp@intel.com>
> 
> All errors (new ones prefixed by >>):
> 
>    drivers/base/swnode.c: In function 'device_create_managed_software_node':
> >> drivers/base/swnode.c:1120:17: error: too many arguments to function 'software_node_notify'
>     1120 |                 software_node_notify(dev, KOBJ_ADD);
>          |                 ^~~~~~~~~~~~~~~~~~~~
>    In file included from drivers/base/swnode.c:14:
>    drivers/base/base.h:206:6: note: declared here
>      206 | void software_node_notify(struct device *dev);
>          |      ^~~~~~~~~~~~~~~~~~~~

Ah, that was modified in commit 384f5a857bae ("software nodes: Split
software_node_notify()").

So the patch is OK for stable, but for v5.15-rc1 it has to be changed:

diff --git a/drivers/base/swnode.c b/drivers/base/swnode.c
index 7bd0f3cfb7eb4..c46f6a8e14d23 100644
--- a/drivers/base/swnode.c
+++ b/drivers/base/swnode.c
@@ -1116,6 +1116,9 @@ int device_create_managed_software_node(struct device *dev,
        to_swnode(fwnode)->managed = true;
        set_secondary_fwnode(dev, fwnode);
 
+       if (device_is_registered(dev))
+               software_node_notify(dev);
+
        return 0;
 }
 EXPORT_SYMBOL_GPL(device_create_managed_software_node);


Rafael, how do want to handle this?

-- 
heikki

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [rafael-pm:bleeding-edge 6/11] drivers/base/swnode.c:1120:17: error: too many arguments to function 'software_node_notify'
  2021-09-16  6:58 ` Heikki Krogerus
@ 2021-09-16 10:04   ` Rafael J. Wysocki
  0 siblings, 0 replies; 3+ messages in thread
From: Rafael J. Wysocki @ 2021-09-16 10:04 UTC (permalink / raw)
  To: Heikki Krogerus
  Cc: kernel test robot, Laurentiu Tudor, kbuild-all,
	ACPI Devel Maling List,
	open list:ACPI COMPONENT ARCHITECTURE (ACPICA),
	Linux PM, Rafael J. Wysocki

On Thu, Sep 16, 2021 at 8:58 AM Heikki Krogerus
<heikki.krogerus@linux.intel.com> wrote:
>
> On Thu, Sep 16, 2021 at 08:13:24AM +0800, kernel test robot wrote:
> > tree:   https://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm.git bleeding-edge
> > head:   9808623e1bba7d929b50865d7e2d7042cd4e5e7b
> > commit: 810fc8571f8b70a4263266d979f97edec2804574 [6/11] software node: balance refcount for managed sw nodes
> > config: arc-randconfig-r001-20210916 (attached as .config)
> > compiler: arc-elf-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://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm.git/commit/?id=810fc8571f8b70a4263266d979f97edec2804574
> >         git remote add rafael-pm https://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm.git
> >         git fetch --no-tags rafael-pm bleeding-edge
> >         git checkout 810fc8571f8b70a4263266d979f97edec2804574
> >         # save the attached .config to linux build tree
> >         mkdir build_dir
> >         COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-11.2.0 make.cross O=build_dir ARCH=arc SHELL=/bin/bash drivers/
> >
> > If you fix the issue, kindly add following tag as appropriate
> > Reported-by: kernel test robot <lkp@intel.com>
> >
> > All errors (new ones prefixed by >>):
> >
> >    drivers/base/swnode.c: In function 'device_create_managed_software_node':
> > >> drivers/base/swnode.c:1120:17: error: too many arguments to function 'software_node_notify'
> >     1120 |                 software_node_notify(dev, KOBJ_ADD);
> >          |                 ^~~~~~~~~~~~~~~~~~~~
> >    In file included from drivers/base/swnode.c:14:
> >    drivers/base/base.h:206:6: note: declared here
> >      206 | void software_node_notify(struct device *dev);
> >          |      ^~~~~~~~~~~~~~~~~~~~
>
> Ah, that was modified in commit 384f5a857bae ("software nodes: Split
> software_node_notify()").
>
> So the patch is OK for stable, but for v5.15-rc1 it has to be changed:
>
> diff --git a/drivers/base/swnode.c b/drivers/base/swnode.c
> index 7bd0f3cfb7eb4..c46f6a8e14d23 100644
> --- a/drivers/base/swnode.c
> +++ b/drivers/base/swnode.c
> @@ -1116,6 +1116,9 @@ int device_create_managed_software_node(struct device *dev,
>         to_swnode(fwnode)->managed = true;
>         set_secondary_fwnode(dev, fwnode);
>
> +       if (device_is_registered(dev))
> +               software_node_notify(dev);
> +
>         return 0;
>  }
>  EXPORT_SYMBOL_GPL(device_create_managed_software_node);
>
>
> Rafael, how do want to handle this?

I'll fix up the commit, thanks!

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2021-09-16 10:04 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-09-16  0:13 [rafael-pm:bleeding-edge 6/11] drivers/base/swnode.c:1120:17: error: too many arguments to function 'software_node_notify' kernel test robot
2021-09-16  6:58 ` Heikki Krogerus
2021-09-16 10:04   ` Rafael J. Wysocki

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).