lkml.org 
[lkml]   [2015]   [Jun]   [17]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH v2 11/15] KVM: MTRR: sort variable MTRRs


On 15/06/2015 10:55, Xiao Guangrong wrote:
> + /* add it to the list if it's valid. */
> + if (var_mtrr_range_is_valid(&mtrr_state->var_ranges[index])) {
> + list_for_each_entry(tmp, &mtrr_state->head, node)
> + if (cur->base < tmp->base)
> + list_add_tail(&cur->node, &tmp->node);
> + list_add_tail(&cur->node, &mtrr_state->head);

Also, this loop looks weird. Is this what you wanted?

list_for_each_entry(tmp, &mtrr_state->head, node)
if (cur->base >= tmp->base)
break;
list_add_tail(&cur->node, &tmp->node);

If so, can you look at kvm/queue and see if it is okay for you (so that
we can get the series in 4.2)?

Paolo

> + }
> +}


\
 
 \ /
  Last update: 2015-06-17 18:41    [W:0.159 / U:0.148 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site