Missed CCing Russell because of --suppress-cc :( CCing now.
On Wed, Jul 27, 2016 at 11:19 PM, Pratyush Anand <pan...@redhat.com> wrote: > ranges->ranges is "struct memory_range *", however each element which need > to be sorted is of type "struct memory_range". So, correct "size" argument > of qsort() as sizeof(*ranges->ranges). > > Signed-off-by: Pratyush Anand <pan...@redhat.com> > Cc:Russell King <r...@arm.linux.org.uk> > Cc:Simon Horman <ho...@verge.net.au> > --- > kexec/mem_regions.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/kexec/mem_regions.c b/kexec/mem_regions.c > index e61c07472f1b..50c8abccb93a 100644 > --- a/kexec/mem_regions.c > +++ b/kexec/mem_regions.c > @@ -24,7 +24,7 @@ static int mem_range_cmp(const void *a1, const void *a2) > */ > void mem_regions_sort(struct memory_ranges *ranges) > { > - qsort(ranges->ranges, ranges->size, sizeof(ranges->ranges), > + qsort(ranges->ranges, ranges->size, sizeof(*ranges->ranges), > mem_range_cmp); > } > > -- > 2.5.5 > _______________________________________________ kexec mailing list kexec@lists.infradead.org http://lists.infradead.org/mailman/listinfo/kexec