Re: Linux kernel, possible useless continue



Bin Chen wrote:

2.6.20, arch/i386/mm/init.c

Below code I am curious in (A)'s continue will bring flow to (B) but
from (B) to (A) no code updates the value of both pfn and max_low_pfn.
So the condition of 'if' will always true. Is it useless?

Not completely, it skips the remainder of the loop, but the call to
one_md_table_init still gets executed.

It just avoids another indentation level, otherwise it's equivalent
to

if (pfn < max_low_pfn) {
rest_of_the_loop
}

Kind regards,

Iwo

.