From: Jiawen Wu Date: Mon, 9 Nov 2020 07:43:46 +0000 (+0800) Subject: net/txgbe: remove direct use of compiler attribute X-Git-Url: http://git.droids-corp.org/?a=commitdiff_plain;h=ee5cd91532d181dabadc38a6380ef28d5d37afb4;p=dpdk.git net/txgbe: remove direct use of compiler attribute Remove direct use of compiler attribute. Signed-off-by: Jiawen Wu Reviewed-by: Ferruh Yigit --- diff --git a/drivers/net/txgbe/base/txgbe_dummy.h b/drivers/net/txgbe/base/txgbe_dummy.h index 0a3a76d0c0..c9f2e78934 100644 --- a/drivers/net/txgbe/base/txgbe_dummy.h +++ b/drivers/net/txgbe/base/txgbe_dummy.h @@ -7,7 +7,7 @@ #ifdef TUP #elif defined(__GNUC__) -#define TUP(x) x##_unused __attribute__((unused)) +#define TUP(x) x##_unused txgbe_unused #elif defined(__LCLINT__) #define TUP(x) x /*@unused@*/ #else diff --git a/drivers/net/txgbe/base/txgbe_osdep.h b/drivers/net/txgbe/base/txgbe_osdep.h index 756eb50eb5..e18e400af3 100644 --- a/drivers/net/txgbe/base/txgbe_osdep.h +++ b/drivers/net/txgbe/base/txgbe_osdep.h @@ -30,6 +30,8 @@ PMD_DRV_LOG(ERR, "TXGBE: %d", x); \ } while (0) +#define txgbe_unused __rte_unused + #define usec_delay(x) rte_delay_us(x) #define msec_delay(x) rte_delay_ms(x) #define usleep(x) rte_delay_us(x) @@ -148,10 +150,6 @@ static inline u64 REVERT_BIT_MASK64(u64 mask) ((mask & 0xFFFFFFFF00000000) >> 32); } -#ifndef __rte_weak -#define __rte_weak __attribute__((__weak__)) -#endif - #define IOMEM #define prefetch(x) rte_prefetch0(x)