lib/zstd/mem.h: replace __inline by inline
authorRasmus Villemoes <linux@rasmusvillemoes.dk>
Thu, 12 Sep 2019 22:19:23 +0000 (00:19 +0200)
committerMiguel Ojeda <miguel.ojeda.sandonis@gmail.com>
Sun, 15 Sep 2019 17:42:16 +0000 (19:42 +0200)
Currently, compiler_types.h #defines __inline as inline (and further
#defines inline to automatically attach some attributes), so this does
not change functionality. It serves as preparation for removing the
#define of __inline.

While at it, also remove the __attribute__((unused)) - it's already
included in the definition of the inline macro, and "open-coded"
__attribute__(()) should be avoided.

Since commit a95b37e20db9 (kbuild: get <linux/compiler_types.h> out of
<linux/kconfig.h>), compiler_types.h is automatically included by all
kernel C code - i.e., the definition of inline including the unused
attribute is guaranteed to be in effect whenever ZSTD_STATIC is
expanded.

Signed-off-by: Rasmus Villemoes <linux@rasmusvillemoes.dk>
Signed-off-by: Miguel Ojeda <miguel.ojeda.sandonis@gmail.com>
lib/zstd/mem.h

index 3a0f34c8706c2907be6634585fc964cf79c56f04..93d7a2c377fe3c8b4a8c0d055786bfa494c9846c 100644 (file)
@@ -27,7 +27,7 @@
 /*-****************************************
 *  Compiler specifics
 ******************************************/
-#define ZSTD_STATIC static __inline __attribute__((unused))
+#define ZSTD_STATIC static inline
 
 /*-**************************************************************
 *  Basic Types