Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1647564

Re: [PATCH 1/3] mm/slub: Only define kmalloc_large_node_hook() for NUMA systems

From David Rientjes <rientjes@google.com>
Newsgroups linux.kernel
Subject Re: [PATCH 1/3] mm/slub: Only define kmalloc_large_node_hook() for NUMA systems
Date 2017-05-23 03:40 +0200
Message-ID <tK6XM-4R7-11@gated-at.bofh.it> (permalink)
References <tIXjP-7UF-11@gated-at.bofh.it> <tIXjQ-7UF-37@gated-at.bofh.it> <tK2hr-1Tl-7@gated-at.bofh.it> <tK2AO-1ZI-9@gated-at.bofh.it> <tK3nb-2zS-9@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


On Mon, 22 May 2017, Andrew Morton wrote:

> > > Is clang not inlining kmalloc_large_node_hook() for some reason?  I don't 
> > > think this should ever warn on gcc.
> > 
> > clang warns about unused static inline functions outside of header
> > files, in difference to gcc.
> 
> I wish it wouldn't.  These patches just add clutter.
> 

Matthias, what breaks if you do this?

diff --git a/include/linux/compiler-clang.h b/include/linux/compiler-clang.h
index de179993e039..e1895ce6fa1b 100644
--- a/include/linux/compiler-clang.h
+++ b/include/linux/compiler-clang.h
@@ -15,3 +15,8 @@
  * with any version that can compile the kernel
  */
 #define __UNIQUE_ID(prefix) __PASTE(__PASTE(__UNIQUE_ID_, prefix), __COUNTER__)
+
+#ifdef inline
+#undef inline
+#define inline __attribute__((unused))
+#endif

Back to linux.kernel | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

[PATCH 1/3] mm/slub: Only define kmalloc_large_node_hook() for NUMA systems Matthias Kaehlcke <mka@chromium.org> - 2017-05-19 23:10 +0200
  Re: [PATCH 1/3] mm/slub: Only define kmalloc_large_node_hook() for  NUMA systems David Rientjes <rientjes@google.com> - 2017-05-22 22:40 +0200
    Re: [PATCH 1/3] mm/slub: Only define kmalloc_large_node_hook() for  NUMA systems Matthias Kaehlcke <mka@chromium.org> - 2017-05-22 23:00 +0200
      Re: [PATCH 1/3] mm/slub: Only define kmalloc_large_node_hook() for  NUMA systems Andrew Morton <akpm@linux-foundation.org> - 2017-05-22 23:50 +0200
        Re: [PATCH 1/3] mm/slub: Only define kmalloc_large_node_hook() for  NUMA systems David Rientjes <rientjes@google.com> - 2017-05-23 03:40 +0200
          Re: [PATCH 1/3] mm/slub: Only define kmalloc_large_node_hook() for  NUMA systems Matthias Kaehlcke <mka@chromium.org> - 2017-05-23 19:00 +0200
            Re: [PATCH 1/3] mm/slub: Only define kmalloc_large_node_hook() for  NUMA systems Doug Anderson <dianders@chromium.org> - 2017-05-23 19:20 +0200
            Re: [PATCH 1/3] mm/slub: Only define kmalloc_large_node_hook() for  NUMA systems David Rientjes <rientjes@google.com> - 2017-05-24 22:40 +0200
              Re: [PATCH 1/3] mm/slub: Only define kmalloc_large_node_hook() for  NUMA systems Matthias Kaehlcke <mka@chromium.org> - 2017-05-25 00:20 +0200

csiph-web