lkml.org 
[lkml]   [2022]   [Sep]   [27]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH v1 1/5] device property: Keep dev_fwnode() and dev_fwnode_const() separate
Hi Andy,

Thanks for the set.

On Tue, Sep 27, 2022 at 05:28:17PM +0300, Andy Shevchenko wrote:
> It's not fully correct to take a const parameter pointer to a struct
> and return a non-const pointer to a member of that struct.

I guess you could go as far as saying it's not at all correct. :-)

>
> Instead, introduce a const version of the dev_fwnode() API which takes
> and returns const pointers and use it where it's applicable.
>
> Suggested-by: Sakari Ailus <sakari.ailus@linux.intel.com>
> Fixes: aade55c86033 ("device property: Add const qualifier to device_get_match_data() parameter")
> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>

For the set:

Reviewed-by: Sakari Ailus <sakari.ailus@linux.intel.com>

--
Kind regards,

Sakari Ailus

\
 
 \ /
  Last update: 2022-09-27 22:57    [W:0.260 / U:0.160 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site