2022-05-01 17:20:55

by Doug Anderson

[permalink] [raw]
Subject: [PATCH] device property: Fix recent breakage of fwnode_get_next_parent_dev()

Due to a subtle typo, instead of commit 87ffea09470d ("device
property: Introduce fwnode_for_each_parent_node()") being a no-op
change, it ended up causing the display on my sc7180-trogdor-lazor
device from coming up unless I added "fw_devlink=off" to my kernel
command line. Fix the typo.

Fixes: 87ffea09470d ("device property: Introduce fwnode_for_each_parent_node()")
Signed-off-by: Douglas Anderson <[email protected]>
---

drivers/base/property.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/base/property.c b/drivers/base/property.c
index 36401cfe432c..52e85dcb20b5 100644
--- a/drivers/base/property.c
+++ b/drivers/base/property.c
@@ -600,7 +600,7 @@ struct device *fwnode_get_next_parent_dev(struct fwnode_handle *fwnode)
struct device *dev;

fwnode_for_each_parent_node(fwnode, parent) {
- dev = get_dev_from_fwnode(fwnode);
+ dev = get_dev_from_fwnode(parent);
if (dev) {
fwnode_handle_put(parent);
return dev;
--
2.36.0.464.gb9c8b46e94-goog


2022-05-02 07:44:24

by Andy Shevchenko

[permalink] [raw]
Subject: Re: [PATCH] device property: Fix recent breakage of fwnode_get_next_parent_dev()

On Sat, Apr 30, 2022 at 3:00 PM Douglas Anderson <[email protected]> wrote:
>
> Due to a subtle typo, instead of commit 87ffea09470d ("device
> property: Introduce fwnode_for_each_parent_node()") being a no-op
> change, it ended up causing the display on my sc7180-trogdor-lazor
> device from coming up unless I added "fw_devlink=off" to my kernel
> command line. Fix the typo.

Sorry and merci pour la fix!
Reviewed-by: Andy Shevchenko <[email protected]>

> Fixes: 87ffea09470d ("device property: Introduce fwnode_for_each_parent_node()")
> Signed-off-by: Douglas Anderson <[email protected]>
> ---
>
> drivers/base/property.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/base/property.c b/drivers/base/property.c
> index 36401cfe432c..52e85dcb20b5 100644
> --- a/drivers/base/property.c
> +++ b/drivers/base/property.c
> @@ -600,7 +600,7 @@ struct device *fwnode_get_next_parent_dev(struct fwnode_handle *fwnode)
> struct device *dev;
>
> fwnode_for_each_parent_node(fwnode, parent) {
> - dev = get_dev_from_fwnode(fwnode);
> + dev = get_dev_from_fwnode(parent);
> if (dev) {
> fwnode_handle_put(parent);
> return dev;
> --
> 2.36.0.464.gb9c8b46e94-goog
>


--
With Best Regards,
Andy Shevchenko

2022-05-02 17:40:28

by Saravana Kannan

[permalink] [raw]
Subject: Re: [PATCH] device property: Fix recent breakage of fwnode_get_next_parent_dev()

On Fri, Apr 29, 2022 at 4:43 PM Douglas Anderson <[email protected]> wrote:
>
> Due to a subtle typo, instead of commit 87ffea09470d ("device
> property: Introduce fwnode_for_each_parent_node()") being a no-op
> change, it ended up causing the display on my sc7180-trogdor-lazor
> device from coming up unless I added "fw_devlink=off" to my kernel
> command line. Fix the typo.

Thank you for the fix!

Reviewed-by: Saravana Kannan <[email protected]>

-Saravana

>
> Fixes: 87ffea09470d ("device property: Introduce fwnode_for_each_parent_node()")
> Signed-off-by: Douglas Anderson <[email protected]>
> ---
>
> drivers/base/property.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/base/property.c b/drivers/base/property.c
> index 36401cfe432c..52e85dcb20b5 100644
> --- a/drivers/base/property.c
> +++ b/drivers/base/property.c
> @@ -600,7 +600,7 @@ struct device *fwnode_get_next_parent_dev(struct fwnode_handle *fwnode)
> struct device *dev;
>
> fwnode_for_each_parent_node(fwnode, parent) {
> - dev = get_dev_from_fwnode(fwnode);
> + dev = get_dev_from_fwnode(parent);
> if (dev) {
> fwnode_handle_put(parent);
> return dev;
> --
> 2.36.0.464.gb9c8b46e94-goog
>

2022-05-03 00:56:13

by Sakari Ailus

[permalink] [raw]
Subject: Re: [PATCH] device property: Fix recent breakage of fwnode_get_next_parent_dev()

On Fri, Apr 29, 2022 at 04:43:47PM -0700, Douglas Anderson wrote:
> Due to a subtle typo, instead of commit 87ffea09470d ("device
> property: Introduce fwnode_for_each_parent_node()") being a no-op
> change, it ended up causing the display on my sc7180-trogdor-lazor
> device from coming up unless I added "fw_devlink=off" to my kernel
> command line. Fix the typo.
>
> Fixes: 87ffea09470d ("device property: Introduce fwnode_for_each_parent_node()")
> Signed-off-by: Douglas Anderson <[email protected]>

Good catch, thanks!

Reviewed-by: Sakari Ailus <[email protected]>

> ---
>
> drivers/base/property.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/base/property.c b/drivers/base/property.c
> index 36401cfe432c..52e85dcb20b5 100644
> --- a/drivers/base/property.c
> +++ b/drivers/base/property.c
> @@ -600,7 +600,7 @@ struct device *fwnode_get_next_parent_dev(struct fwnode_handle *fwnode)
> struct device *dev;
>
> fwnode_for_each_parent_node(fwnode, parent) {
> - dev = get_dev_from_fwnode(fwnode);
> + dev = get_dev_from_fwnode(parent);
> if (dev) {
> fwnode_handle_put(parent);
> return dev;

--
Sakari Ailus

2022-05-09 03:42:39

by Rafael J. Wysocki

[permalink] [raw]
Subject: Re: [PATCH] device property: Fix recent breakage of fwnode_get_next_parent_dev()

On Sun, May 1, 2022 at 9:50 AM Andy Shevchenko
<[email protected]> wrote:
>
> On Sat, Apr 30, 2022 at 3:00 PM Douglas Anderson <[email protected]> wrote:
> >
> > Due to a subtle typo, instead of commit 87ffea09470d ("device
> > property: Introduce fwnode_for_each_parent_node()") being a no-op
> > change, it ended up causing the display on my sc7180-trogdor-lazor
> > device from coming up unless I added "fw_devlink=off" to my kernel
> > command line. Fix the typo.
>
> Sorry and merci pour la fix!
> Reviewed-by: Andy Shevchenko <[email protected]>

Applied, thanks!

> > Fixes: 87ffea09470d ("device property: Introduce fwnode_for_each_parent_node()")
> > Signed-off-by: Douglas Anderson <[email protected]>
> > ---
> >
> > drivers/base/property.c | 2 +-
> > 1 file changed, 1 insertion(+), 1 deletion(-)
> >
> > diff --git a/drivers/base/property.c b/drivers/base/property.c
> > index 36401cfe432c..52e85dcb20b5 100644
> > --- a/drivers/base/property.c
> > +++ b/drivers/base/property.c
> > @@ -600,7 +600,7 @@ struct device *fwnode_get_next_parent_dev(struct fwnode_handle *fwnode)
> > struct device *dev;
> >
> > fwnode_for_each_parent_node(fwnode, parent) {
> > - dev = get_dev_from_fwnode(fwnode);
> > + dev = get_dev_from_fwnode(parent);
> > if (dev) {
> > fwnode_handle_put(parent);
> > return dev;
> > --
> > 2.36.0.464.gb9c8b46e94-goog
> >
>
>
> --
> With Best Regards,
> Andy Shevchenko

2022-05-14 05:17:10

by Saravana Kannan

[permalink] [raw]
Subject: Re: [PATCH] device property: Fix recent breakage of fwnode_get_next_parent_dev()

On Thu, May 5, 2022 at 5:21 AM Rafael J. Wysocki <[email protected]> wrote:
>
> On Sun, May 1, 2022 at 9:50 AM Andy Shevchenko
> <[email protected]> wrote:
> >
> > On Sat, Apr 30, 2022 at 3:00 PM Douglas Anderson <[email protected]> wrote:
> > >
> > > Due to a subtle typo, instead of commit 87ffea09470d ("device
> > > property: Introduce fwnode_for_each_parent_node()") being a no-op
> > > change, it ended up causing the display on my sc7180-trogdor-lazor
> > > device from coming up unless I added "fw_devlink=off" to my kernel
> > > command line. Fix the typo.
> >
> > Sorry and merci pour la fix!
> > Reviewed-by: Andy Shevchenko <[email protected]>
>
> Applied, thanks!

Has this been picked up by one of the driver-core branches yet? I was
poking around that
git repo and didn't see any commit with this title. This breaks
fw_devlink in a severe manner, so I want to make sure it gets into
5.18.

-Saravana


-Saravana

2022-05-14 06:53:46

by Greg Kroah-Hartman

[permalink] [raw]
Subject: Re: [PATCH] device property: Fix recent breakage of fwnode_get_next_parent_dev()

On Fri, May 13, 2022 at 08:58:12PM -0700, Saravana Kannan wrote:
> On Thu, May 5, 2022 at 5:21 AM Rafael J. Wysocki <[email protected]> wrote:
> >
> > On Sun, May 1, 2022 at 9:50 AM Andy Shevchenko
> > <[email protected]> wrote:
> > >
> > > On Sat, Apr 30, 2022 at 3:00 PM Douglas Anderson <[email protected]> wrote:
> > > >
> > > > Due to a subtle typo, instead of commit 87ffea09470d ("device
> > > > property: Introduce fwnode_for_each_parent_node()") being a no-op
> > > > change, it ended up causing the display on my sc7180-trogdor-lazor
> > > > device from coming up unless I added "fw_devlink=off" to my kernel
> > > > command line. Fix the typo.
> > >
> > > Sorry and merci pour la fix!
> > > Reviewed-by: Andy Shevchenko <[email protected]>
> >
> > Applied, thanks!
>
> Has this been picked up by one of the driver-core branches yet? I was
> poking around that
> git repo and didn't see any commit with this title. This breaks
> fw_devlink in a severe manner, so I want to make sure it gets into
> 5.18.

Look in linux-next:
117ef574074d ("device property: Fix recent breakage of fwnode_get_next_parent_dev()")

Rafael's tree is not my tree :)

thanks,

greg k-h