On 06/16/16 16:07, Matias Elo wrote:
--- a/platform/linux-generic/odp_packet_flags.c
+++ b/platform/linux-generic/odp_packet_flags.c
@@ -7,26 +7,27 @@
  #include <odp/api/packet_flags.h>
  #include <odp_packet_internal.h>
-#define retflag(p, x) do { \
-       odp_packet_hdr_t *pkt_hdr = odp_packet_hdr(p); \
-       if (packet_parse_not_complete(pkt_hdr))        \
-               packet_parse_full(pkt_hdr);            \
-       return pkt_hdr->x;                          \
+#define retflag(pkt, x) do {                             \
+       odp_packet_hdr_t *pkt_hdr = odp_packet_hdr(pkt); \
+       if (packet_parse_not_complete(pkt_hdr))          \
+               packet_parse_full(pkt_hdr);              \
+       return pkt_hdr->p.x;                             \
        } while (0)
Checkpatch warns about flow control function in macros. But it's not related to current patch. What do you think about making this static inline function instead of macro? I think it will make
code more debug friendly and also will make checkpatch happy.

Maxim.
_______________________________________________
lng-odp mailing list
[email protected]
https://lists.linaro.org/mailman/listinfo/lng-odp

Reply via email to