Skip to contentSkip to conversation

linux-next: build warning after merge of the akpm-current tree

DISCUSSION Stephen Rothwell 2 participants 3 messages Mar 29, 2019 – Apr 16, 2019

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

Hi all,

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")

Signature · 2 lines
Cheers,
Stephen Rothwell
#1 lore raw

Hi all,

Quoted 11 lines · On Fri, 29 Mar 2019 13:39:14 +1100 Stephen Rothwell <[email protected]>…

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 :-(

Signature · 2 lines
Cheers,
Stephen Rothwell
maintainer
#2 lore raw
Quoted 11 lines · On Tue, 16 Apr 2019 16:52:56 +1000 Stephen Rothwell <[email protected]>…

Hi all,

Quoted 8 lines · On Fri, 29 Mar 2019 13:39:14 +1100 Stephen Rothwell <[email protected]>…

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 *);
                                    ^~~~~~~~~
Quoted 5 lines
Quoted 3 lines

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.

lib/list_sort.c renamed from lib/list_sort.c~lib-list_sort-simplify-and-remove-max_list_length_bits-fix +1 -7
@@ -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 *);
 
 /*

_