On Tue, 16 Apr 2019 16:52:56 +1000 Stephen Rothwell <sfr@xxxxxxxxxxxxxxxx> wrote: > Hi all, > > On Fri, 29 Mar 2019 13:39:14 +1100 Stephen Rothwell <sfr@xxxxxxxxxxxxxxxx> wrote: > > > > After merging the akpm-current tree, today's linux-next build (arm > > multi_v7_defconfig) produced this warning: > > > > lib/list_sort.c:17:36: warning: 'pure' attribute ignored [-Wattributes] > > struct list_head const *, struct list_head const *); > > ^~~~~~~~~ > > > > Introduced by commit > > > > 820c81be5237 ("lib/list_sort: simplify and remove MAX_LIST_LENGTH_BITS") > > I am still getting that warning :-( Me too and I can't figure it out. Shrug, I guess we take a pass on it until someone has time/inclination to revisit it. --- a/lib/list_sort.c~lib-list_sort-simplify-and-remove-max_list_length_bits-fix +++ a/lib/list_sort.c @@ -7,13 +7,7 @@ #include <linux/list_sort.h> #include <linux/list.h> -/* - * By declaring the compare function with the __pure attribute, we give - * the compiler more opportunity to optimize. Ideally, we'd use this in - * the prototype of list_sort(), but that would involve a lot of churn - * at all call sites, so just cast the function pointer passed in. - */ -typedef int __pure __attribute__((nonnull(2,3))) (*cmp_func)(void *, +typedef int __attribute__((nonnull(2,3))) (*cmp_func)(void *, struct list_head const *, struct list_head const *); /* _