[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <3ae62405-6ebf-4da4-a946-deb74cd4f93e@icloud.com>
Date: Mon, 14 Apr 2025 19:10:33 +0800
From: Zijun Hu <zijun_hu@...oud.com>
To: Andy Shevchenko <andriy.shevchenko@...ux.intel.com>
Cc: 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>,
"Rafael J. Wysocki" <rafael@...nel.org>, Danilo Krummrich <dakr@...nel.org>,
linux-acpi@...r.kernel.org, linux-kernel@...r.kernel.org,
Zijun Hu <quic_zijuhu@...cinc.com>
Subject: Re: [PATCH 1/2] software node: Add comment for the first ERR_CAST()
in fwnode_create_software_node()
On 2025/4/14 16:00, Andy Shevchenko wrote:
>> From: Zijun Hu <quic_zijuhu@...cinc.com>
>>
>> ERR_CAST() is normally used to cast an error-valued pointer type to
>> another different type, But the first ERR_CAST() is to cast away the
>> const in fwnode_create_software_node().
>>
>> Add comment for this unusual ERR_CAST() usage.
> ...
>
>> + /* Only cast away the const by ERR_CAST() */
>> if (IS_ERR(parent))
>> return ERR_CAST(parent);
> TBH, I don't see the value of this comment. And looking into the code, I would
thank you Andy for comments.
will drop this patch in v2.
> rather drop this part. The current users do not rely on the any specific code
> to be returned and also they check parent to be valid beforehand.
>
> But let's hear others first.
Powered by blists - more mailing lists