[PATCH] powerpc/pseries: Drop unnecessary continue
rcj4747 at gmail.com
Fri Aug 22 01:51:34 EST 2014
-----BEGIN PGP SIGNED MESSAGE-----
On 08/20/2014 11:41 PM, Michael Ellerman wrote:
> On Wed, 2014-08-13 at 14:48 +0530, Himangi Saraogi wrote:
>> Continue is not needed at the bottom of a loop.
> I wonder though, is the code trying to continue to the outer loop?
> I stared at it for a minute but it wasn't obvious.
> I wonder if Robert still remembers?
I don't recall what the intent was here. Can't believe that it's been
almost 5 years since I wrote this. I wish I had left a few more
comments in the code for me to go on.
Obviously the continue should be removed since it's not doing
anything. I don't believe that we'd want a continue statement in
there to get outer loop. That would change the current cmm_page_array
pointer (pa_curr) to the next in the list after it may have just been
reassigned to pa_last->next.
It may be the case that an earlier version of the code had statements
in the inner loop after that continue that I wanted to skip, or I just
did something silly.
>> diff --git a/arch/powerpc/platforms/pseries/cmm.c
>> b/arch/powerpc/platforms/pseries/cmm.c index 2d8bf15..fc44ad0
>> 100644 --- a/arch/powerpc/platforms/pseries/cmm.c +++
>> b/arch/powerpc/platforms/pseries/cmm.c @@ -555,7 +555,6 @@ static
>> int cmm_mem_going_offline(void *arg) pa_last = pa_last->next;
>> free_page((unsigned long)cmm_page_list); cmm_page_list =
>> pa_last; - continue; } } pa_curr = pa_curr->next;
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1
-----END PGP SIGNATURE-----
More information about the Linuxppc-dev