DPDK patches and discussions
 help / color / mirror / Atom feed
From: Jiawen Wu <jiawenwu@trustnetic.com>
To: dev@dpdk.org
Cc: Jiawen Wu <jiawenwu@trustnetic.com>
Subject: [dpdk-dev] [PATCH] net/txgbe: remove direct use of compiler attribute
Date: Mon,  9 Nov 2020 15:43:46 +0800	[thread overview]
Message-ID: <20201109074346.3896752-1-jiawenwu@trustnetic.com> (raw)

Remove direct use of compiler attribute.

Signed-off-by: Jiawen Wu <jiawenwu@trustnetic.com>
---
 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 0a3a76d0c..3a667dd31 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 f3d443ad3..c5386381c 100644
--- a/drivers/net/txgbe/base/txgbe_osdep.h
+++ b/drivers/net/txgbe/base/txgbe_osdep.h
@@ -30,6 +30,8 @@
 		rte_panic("TXGBE: 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.21.0.windows.1




             reply	other threads:[~2020-11-09  7:42 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-11-09  7:43 Jiawen Wu [this message]
2020-11-09 19:18 ` Ferruh Yigit
2020-11-10  2:09   ` Jiawen Wu

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20201109074346.3896752-1-jiawenwu@trustnetic.com \
    --to=jiawenwu@trustnetic.com \
    --cc=dev@dpdk.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).