Thread (2 messages) flat view 2 messages, 2 authors, 2016-05-06

Re: [PATCH 2/2] powerpc: Update of_remove_property() call sites to remove null checking

From: Suraj Jitindar Singh <sjitindarsingh@gmail.com>
Date: 2016-05-06 01:01:26
Also in: linux-devicetree


On 05/05/16 16:50, Michael Ellerman wrote:
On Tue, 2016-05-03 at 15:32 -0700, Tyrel Datwyler wrote: >> On 04/27/2016 10:34 PM, Suraj Jitindar Singh wrote: >>> diff --git a/arch/powerpc/platforms/pseries/mobility.c b/arch/powerpc/platforms/pseries/mobility.c >>> index ceb18d3..a560a98 100644 >>> --- a/arch/powerpc/platforms/pseries/mobility.c >>> +++ b/arch/powerpc/platforms/pseries/mobility.c >>> @@ -191,8 +191,8 @@ static int update_dt_node(__be32 phandle, s32 scope) >>>                  break; >>>  >>>              case 0x80000000: >>> -                prop = of_find_property(dn, prop_name, NULL); >>> -                of_remove_property(dn, prop); >>> +                of_remove_property(dn, of_find_property(dn, >>> +                            prop_name, NULL)); >>>                  prop = NULL; >>>                  break; >>> >> >> You haven't removed a NULL check here, as suggested by the changelog, >> but instead made a cosmetic change to the code that still leaves behind >> a now unnecessary "prop = NULL;" to bit rot. > > Yeah I think you're right. Though it's not
very clear how prop is used in that > function. > > Please one of you send me an incremental to remove the prop = NULL; > > cheers >

I didn't delete the prop = NULL; initially as I didn't fully understand
how it was used in the rest of the function and the effect of deleting
it.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help