> Subject: RE: [PATCH] of: fix of_update_property [v2] > > On Fri, 4 Apr 2014 08:30:42 +0000, "Li.Xiubo@xxxxxxxxxxxxx" > <Li.Xiubo@xxxxxxxxxxxxx> wrote: > > > Subject: RE: [PATCH] of: fix of_update_property [v2] > > > > > > On Wed, 2 Apr 2014 05:29:53 +0000, "Li.Xiubo@xxxxxxxxxxxxx" > > > <Li.Xiubo@xxxxxxxxxxxxx> wrote: > > > > > > > > > > > > > > @@ -1776,25 +1776,26 @@ int of_update_property(struct device_node > *np, > > > > > struct property *newprop) > > > > > > if (!newprop->name) > > > > > > return -EINVAL; > > > > > > > > > > > > - oldprop = of_find_property(np, newprop->name, NULL); > > > > > > - if (!oldprop) > > > > > > - return of_add_property(np, newprop); > > > > > > - > > > > > > raw_spin_lock_irqsave(&devtree_lock, flags); > > > > > > - next = &np->properties; > > > > > > - while (*next) { > > > > > > + oldprop = __of_find_property(np, newprop->name, NULL); > > > > > > + if (!oldprop) { > > > > > > + /* add the node */ > > > > > > + rc = __of_add_property(np, newprop); > > > > > > + } else { > > > > > > > > > > if you changed this line to: > > > > > } else while (*next) { > > > > > then most of the other changes go away. You don't need the separate > > > > > while loop > > > > > > > > Well, this will output some errors by using the './scripts/checkpatch.pl' > > Checking. > > > > $ ./scripts/checkpatch.pl > > > > ERROR: trailing statements should be on next line > > #1785: FILE: of/base.c:1785: > > + else while (*next) { > > > > ERROR: trailing statements should be on next line > > #1785: FILE: of/base.c:1785: > > + else while (*next) { > > > > Should be split into two lines... > > Checkpatch is wrong. I won't reject that approach. > Okey, I have sent one version, should I send it again ? Thanks, Brs Xiubo > g. > > -- To unsubscribe from this list: send the line "unsubscribe devicetree" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html