lkml.org 
[lkml]   [2023]   [Aug]   [2]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 4/5] of: dynamic: Move dead property list check into property add/update functions
On Tue, Aug 01, 2023 at 03:54:47PM -0600, Rob Herring wrote:
> The changeset code checks for a property in the deadprops list when
> adding/updating a property, but of_add_property() and
> of_update_property() do not. As the users of these functions are pretty
> simple, they have not hit this scenario or else the property lists
> would get corrupted.

...

Seems like this...

> + /* If the property is in deadprops then it must be removed */
> + for (next = &np->deadprops; *next; next = &(*next)->next) {
> + if (*next == prop) {
> + *next = prop->next;
> + break;
> + }
> + }

> prop->next = NULL;

...

> + for (next = &np->deadprops; *next; next = &(*next)->next) {
> + if (*next == newprop) {
> + *next = newprop->next;
> + newprop->next = NULL;
> + break;
> + }
> + }

...is a dup of this. Are you planing to have a helper or at least conditional
for_each_*() macro for them?

--
With Best Regards,
Andy Shevchenko


\
 
 \ /
  Last update: 2023-08-02 17:12    [W:0.149 / U:3.204 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site