diff options
| author | Greg Kroah-Hartman <gregkh@google.com> | 2018-07-31 20:11:21 +0200 |
|---|---|---|
| committer | Greg Kroah-Hartman <gregkh@google.com> | 2018-07-31 20:11:21 +0200 |
| commit | 7bbfac190345ca532ea790c9d9ccb15682d7b99b (patch) | |
| tree | 783947e7aeaded9bcaba976b6d2ad590fdb3bae1 /include/linux/compiler-gcc.h | |
| parent | 8ec9fd8936b20ca2d18160f8b18acb4b732c2771 (diff) | |
| parent | a8ea6276d00555387deaaa5eaeb380cd5c17bdc9 (diff) | |
Merge 4.4.143 into android-4.4
Changes in 4.4.143
compiler, clang: suppress warning for unused static inline functions
compiler, clang: properly override 'inline' for clang
compiler, clang: always inline when CONFIG_OPTIMIZE_INLINING is disabled
compiler-gcc.h: Add __attribute__((gnu_inline)) to all inline declarations
x86/asm: Add _ASM_ARG* constants for argument registers to <asm/asm.h>
Revert "sit: reload iphdr in ipip6_rcv"
ocfs2: subsystem.su_mutex is required while accessing the item->ci_parent
bcm63xx_enet: correct clock usage
bcm63xx_enet: do not write to random DMA channel on BCM6345
crypto: crypto4xx - remove bad list_del
crypto: crypto4xx - fix crypto4xx_build_pdr, crypto4xx_build_sdr leak
atm: zatm: Fix potential Spectre v1
net: dccp: avoid crash in ccid3_hc_rx_send_feedback()
net: dccp: switch rx_tstamp_last_feedback to monotonic clock
net/mlx5: Fix incorrect raw command length parsing
net: sungem: fix rx checksum support
qed: Limit msix vectors in kdump kernel to the minimum required count.
r8152: napi hangup fix after disconnect
tcp: fix Fast Open key endianness
tcp: prevent bogus FRTO undos with non-SACK flows
vhost_net: validate sock before trying to put its fd
net_sched: blackhole: tell upper qdisc about dropped packets
net/mlx5: Fix command interface race in polling mode
net: cxgb3_main: fix potential Spectre v1
rtlwifi: rtl8821ae: fix firmware is not ready to run
MIPS: Call dump_stack() from show_regs()
MIPS: Use async IPIs for arch_trigger_cpumask_backtrace()
netfilter: ebtables: reject non-bridge targets
KEYS: DNS: fix parsing multiple options
rds: avoid unenecessary cong_update in loop transport
net/nfc: Avoid stalls when nfc_alloc_send_skb() returned NULL.
Linux 4.4.143
Change-Id: Icacfd188cbb6075bf82a48ec1066e8653eb73ae4
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
Diffstat (limited to 'include/linux/compiler-gcc.h')
| -rw-r--r-- | include/linux/compiler-gcc.h | 29 |
1 files changed, 22 insertions, 7 deletions
diff --git a/include/linux/compiler-gcc.h b/include/linux/compiler-gcc.h index 557dae96ce74..143d40e8a1ea 100644 --- a/include/linux/compiler-gcc.h +++ b/include/linux/compiler-gcc.h @@ -65,25 +65,40 @@ #endif /* + * Feature detection for gnu_inline (gnu89 extern inline semantics). Either + * __GNUC_STDC_INLINE__ is defined (not using gnu89 extern inline semantics, + * and we opt in to the gnu89 semantics), or __GNUC_STDC_INLINE__ is not + * defined so the gnu89 semantics are the default. + */ +#ifdef __GNUC_STDC_INLINE__ +# define __gnu_inline __attribute__((gnu_inline)) +#else +# define __gnu_inline +#endif + +/* * Force always-inline if the user requests it so via the .config, * or if gcc is too old. * GCC does not warn about unused static inline functions for * -Wunused-function. This turns out to avoid the need for complex #ifdef * directives. Suppress the warning in clang as well by using "unused" * function attribute, which is redundant but not harmful for gcc. + * Prefer gnu_inline, so that extern inline functions do not emit an + * externally visible function. This makes extern inline behave as per gnu89 + * semantics rather than c99. This prevents multiple symbol definition errors + * of extern inline functions at link time. + * A lot of inline functions can cause havoc with function tracing. */ #if !defined(CONFIG_ARCH_SUPPORTS_OPTIMIZED_INLINING) || \ !defined(CONFIG_OPTIMIZE_INLINING) || (__GNUC__ < 4) -#define inline inline __attribute__((always_inline,unused)) notrace -#define __inline__ __inline__ __attribute__((always_inline,unused)) notrace -#define __inline __inline __attribute__((always_inline,unused)) notrace +#define inline \ + inline __attribute__((always_inline, unused)) notrace __gnu_inline #else -/* A lot of inline functions can cause havoc with function tracing */ -#define inline inline __attribute__((unused)) notrace -#define __inline__ __inline__ __attribute__((unused)) notrace -#define __inline __inline __attribute__((unused)) notrace +#define inline inline __attribute__((unused)) notrace __gnu_inline #endif +#define __inline__ inline +#define __inline inline #define __always_inline inline __attribute__((always_inline)) #define noinline __attribute__((noinline)) |
