Skip to content

Commit

Permalink
lib/zstd/mem.h: replace __inline by inline
Browse files Browse the repository at this point in the history
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 a95b37e (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 <[email protected]>
Signed-off-by: Miguel Ojeda <[email protected]>
  • Loading branch information
Villemoes authored and ojeda committed Sep 15, 2019
1 parent 8b160b1 commit 4bd9242
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/zstd/mem.h
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
/*-****************************************
* Compiler specifics
******************************************/
#define ZSTD_STATIC static __inline __attribute__((unused))
#define ZSTD_STATIC static inline

/*-**************************************************************
* Basic Types
Expand Down

0 comments on commit 4bd9242

Please sign in to comment.