[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <YlcVFRQ9wJIH+sjI@smile.fi.intel.com>
Date: Wed, 13 Apr 2022 21:23:17 +0300
From: Andy Shevchenko <andriy.shevchenko@...ux.intel.com>
To: "Rafael J. Wysocki" <rafael@...nel.org>
Cc: Rob Herring <robh@...nel.org>,
ACPI Devel Maling List <linux-acpi@...r.kernel.org>,
Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
"open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS"
<devicetree@...r.kernel.org>, Daniel Scally <djrscally@...il.com>,
Heikki Krogerus <heikki.krogerus@...ux.intel.com>,
Sakari Ailus <sakari.ailus@...ux.intel.com>,
Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
Rob Herring <robh+dt@...nel.org>,
Frank Rowand <frowand.list@...il.com>,
Len Brown <lenb@...nel.org>
Subject: Re: [PATCH v6 4/5] device property: Constify fwnode_handle_get()
On Wed, Apr 13, 2022 at 09:19:28PM +0300, Andy Shevchenko wrote:
> On Wed, Apr 13, 2022 at 08:10:22PM +0200, Rafael J. Wysocki wrote:
> > On Fri, Apr 8, 2022 at 8:49 PM Andy Shevchenko
> > <andriy.shevchenko@...ux.intel.com> wrote:
...
> > > -struct fwnode_handle *fwnode_handle_get(struct fwnode_handle *fwnode)
> > > +struct fwnode_handle *fwnode_handle_get(const struct fwnode_handle *fwnode)
> > > {
>
> > > if (!fwnode_has_op(fwnode, get))
> > > return fwnode;
>
> ^^^^, so it needs a casting, but then we have to comment why is so.
Note, it means that the fwnode parameter either invalid or has no given option.
It's not a problem to drop casting in the first case, but the second one should
be justified and Sakari wants to be sure that the initial container is not
const, which seems can't be achieved even with the original code.
> > Why is 0-day complaining about this one?
--
With Best Regards,
Andy Shevchenko
Powered by blists - more mailing lists