[PATCH] kexec: (bugfix) mem_regions_sort()
AKASHI Takahiro
takahiro.akashi at linaro.org
Sun Jul 31 21:32:30 PDT 2016
On Fri, Jul 29, 2016 at 01:55:37PM +0530, Pratyush Anand wrote:
> On 29/07/2016:05:23:23 PM, AKASHI Takahiro wrote:
> > The third argument of qsort() must be the size of each array element.
>
> Yes, I had sent it day before yesterday which has been ACKed by Russell.
Oops, thanks.
You must have found it in trying my kdump patch.
Thanks,
-Takahiro AKASHI
> >
> > Signed-off-by: AKASHI Takahiro <takahiro.akashi at linaro.org>
> > ---
> > 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 e61c074..a8cb510 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[0]),
> > mem_range_cmp);
> > }
> >
> > --
> > 2.9.0
> >
> >
> > _______________________________________________
> > kexec mailing list
> > kexec at lists.infradead.org
> > http://lists.infradead.org/mailman/listinfo/kexec
More information about the kexec
mailing list