From ee5cd91532d181dabadc38a6380ef28d5d37afb4 Mon Sep 17 00:00:00 2001 From: Jiawen Wu Date: Mon, 9 Nov 2020 15:43:46 +0800 Subject: [PATCH] net/txgbe: remove direct use of compiler attribute Remove direct use of compiler attribute. Signed-off-by: Jiawen Wu Reviewed-by: Ferruh Yigit --- drivers/net/txgbe/base/txgbe_dummy.h | 2 +- drivers/net/txgbe/base/txgbe_osdep.h | 6 ++---- 2 files changed, 3 insertions(+), 5 deletions(-) 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) -- 2.20.1