Re: [PATCH] lib/list_sort: fix function type mismatches

From: George Spelvin
Date: Sat Jan 11 2020 - 03:30:24 EST


> typedef int __attribute__((nonnull(2,3))) (*cmp_func)(void *,
> - struct list_head const *, struct list_head const *);
> + struct list_head *, struct list_head *);

I'd prefer to leave the const there for documentation.
Does anyone object to fixing it in the other direction by *adding*
const to all the call sites?

Andy Shevchenko posted a patch last 7 October that did that.
<20191007135656.37734-1-andriy.shevchenko@xxxxxxxxxxxxxxx>

(You could also try taking a second look at why __pure doesn't work,
per AKPM's message of 16 April
<20190416154522.65aaa348161fc581181b56d9@xxxxxxxxxxxxxxxxxxxx>)