net: l2: Remove unnecessary()

When compiling network subsystem, I was getting the following compiler
warning:

```
In file included from /home/markus/src/wrp-n4m/zephyr/include/net/net_if.h:29,
                 from /home/markus/src/wrp-n4m/app/src/main/node/main.cpp:20:
/home/markus/src/wrp-n4m/zephyr/include/net/net_l2.h:80:32: warning: unnecessary parentheses in declaration of '__net_l2_OPENTHREAD' [-Wparentheses]
   80 | #define NET_L2_GET_NAME(_name) (__net_l2_##_name)
      |                                ^
/home/markus/src/wrp-n4m/zephyr/include/net/net_l2.h:82:29: note: in
expansion of macro 'NET_L2_GET_NAME'
   82 |  extern const struct net_l2 NET_L2_GET_NAME(_name)
      |                             ^~~~~~~~~~~~~~~
/home/markus/src/wrp-n4m/zephyr/include/net/net_l2.h:114:1: note: in
expansion of macro 'NET_L2_DECLARE_PUBLIC'
  114 | NET_L2_DECLARE_PUBLIC(OPENTHREAD_L2);
      | ^~~~~~~~~~~~~~~~~~~~~
```

This patch fixes the warning.

Signed-off-by: Markus Becker <markus.becker@tridonic.com>
This commit is contained in:
Markus Becker 2020-06-15 16:53:15 +02:00 committed by Jukka Rissanen
commit 81d5425210

View file

@ -77,7 +77,7 @@ struct net_l2 {
};
/** @cond INTERNAL_HIDDEN */
#define NET_L2_GET_NAME(_name) (__net_l2_##_name)
#define NET_L2_GET_NAME(_name) __net_l2_##_name
#define NET_L2_DECLARE_PUBLIC(_name) \
extern const struct net_l2 NET_L2_GET_NAME(_name)
#define NET_L2_GET_CTX_TYPE(_name) _name##_CTX_TYPE