Re: [PATCH] perf: remove the extra validity check on nr_pages

2015-01-29 Thread xiakaixu
于 2015/1/27 17:55, Kaixu Xia 写道: ping... > The function is_power_of_2() also do the check on nr_pages, > so the first check performed is unnecessary. On the other > hand, the key point is to ensure @nr_pages is a power-of-two > number and mostly @nr_pages is a nonzero value, so in the > most

Re: [PATCH] perf: remove the extra validity check on nr_pages

2015-01-29 Thread xiakaixu
于 2015/1/27 17:55, Kaixu Xia 写道: ping... The function is_power_of_2() also do the check on nr_pages, so the first check performed is unnecessary. On the other hand, the key point is to ensure @nr_pages is a power-of-two number and mostly @nr_pages is a nonzero value, so in the most cases,

[PATCH] perf: remove the extra validity check on nr_pages

2015-01-27 Thread Kaixu Xia
The function is_power_of_2() also do the check on nr_pages, so the first check performed is unnecessary. On the other hand, the key point is to ensure @nr_pages is a power-of-two number and mostly @nr_pages is a nonzero value, so in the most cases, the function is_power_of_2() will be called.

[PATCH] perf: remove the extra validity check on nr_pages

2015-01-27 Thread Kaixu Xia
The function is_power_of_2() also do the check on nr_pages, so the first check performed is unnecessary. On the other hand, the key point is to ensure @nr_pages is a power-of-two number and mostly @nr_pages is a nonzero value, so in the most cases, the function is_power_of_2() will be called.