DPDK patches and discussions
 help / color / mirror / Atom feed
* [dpdk-dev] [PATCH] net/txgbe: remove direct use of compiler attribute
@ 2020-11-09  7:43 Jiawen Wu
  2020-11-09 19:18 ` Ferruh Yigit
  0 siblings, 1 reply; 3+ messages in thread
From: Jiawen Wu @ 2020-11-09  7:43 UTC (permalink / raw)
  To: dev; +Cc: Jiawen Wu

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




^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [dpdk-dev] [PATCH] net/txgbe: remove direct use of compiler attribute
  2020-11-09  7:43 [dpdk-dev] [PATCH] net/txgbe: remove direct use of compiler attribute Jiawen Wu
@ 2020-11-09 19:18 ` Ferruh Yigit
  2020-11-10  2:09   ` Jiawen Wu
  0 siblings, 1 reply; 3+ messages in thread
From: Ferruh Yigit @ 2020-11-09 19:18 UTC (permalink / raw)
  To: Jiawen Wu, dev

On 11/9/2020 7:43 AM, Jiawen Wu wrote:
> 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)

Because of build error, removing parenthesis while applying, please double check 
ci build results of the patches [1] and send new version if required.
Were there any specific reason for the parenthesis, am I missing something there?

[1]
http://mails.dpdk.org/archives/test-report/2020-November/165922.html


Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
Applied to dpdk-next-net/main, thanks.

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [dpdk-dev] [PATCH] net/txgbe: remove direct use of compiler attribute
  2020-11-09 19:18 ` Ferruh Yigit
@ 2020-11-10  2:09   ` Jiawen Wu
  0 siblings, 0 replies; 3+ messages in thread
From: Jiawen Wu @ 2020-11-10  2:09 UTC (permalink / raw)
  To: Ferruh Yigit, dev

On Tuesday, November 10, 2020 3:19 AM, Ferruh Yigit wrote:
> On 11/9/2020 7:43 AM, Jiawen Wu wrote:
> > 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)
> 
> Because of build error, removing parenthesis while applying, please double
> check ci build results of the patches [1] and send new version if required.
> Were there any specific reason for the parenthesis, am I missing something
> there?
> 

The parentheses are because of the checkpatch error [1].
But I forgot to build the project again when parentheses added.

[1]
ERROR:COMPLEX_MACRO: Macros with complex values should be enclosed in parentheses

> [1]
> http://mails.dpdk.org/archives/test-report/2020-November/165922.html
> 
> 
> Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com> Applied to
> dpdk-next-net/main, thanks.




^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2020-11-10  2:09 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-11-09  7:43 [dpdk-dev] [PATCH] net/txgbe: remove direct use of compiler attribute Jiawen Wu
2020-11-09 19:18 ` Ferruh Yigit
2020-11-10  2:09   ` Jiawen Wu

DPDK patches and discussions

This inbox may be cloned and mirrored by anyone:

	git clone --mirror https://inbox.dpdk.org/dev/0 dev/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 dev dev/ https://inbox.dpdk.org/dev \
		dev@dpdk.org
	public-inbox-index dev

Example config snippet for mirrors.
Newsgroup available over NNTP:
	nntp://inbox.dpdk.org/inbox.dpdk.dev


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git