Thread (15 messages) 15 messages, 3 authors, 2017-03-20

Re: [PATCH v2 1/2] net/mlx4: split the definitions to the header file

From: Ferruh Yigit <hidden>
Date: 2017-02-22 19:04:38

On 2/22/2017 1:42 PM, Vasily Philipov wrote:
quoted hunk ↗ jump to hunk
Make some structs/defines visible from different source files by placing
them into mlx4.h header.

Signed-off-by: Vasily Philipov <redacted>
---
 drivers/net/mlx4/mlx4.c | 183 ++--------------------------------------------
 drivers/net/mlx4/mlx4.h | 187 +++++++++++++++++++++++++++++++++++++++++++++++-
 2 files changed, 189 insertions(+), 181 deletions(-)
diff --git a/drivers/net/mlx4/mlx4.c b/drivers/net/mlx4/mlx4.c
index 79efaaa..82ccac8 100644
--- a/drivers/net/mlx4/mlx4.c
+++ b/drivers/net/mlx4/mlx4.c
@@ -1,8 +1,8 @@
 /*-
  *   BSD LICENSE
  *
- *   Copyright 2012-2015 6WIND S.A.
- *   Copyright 2012 Mellanox.
+ *   Copyright 2012-2017 6WIND S.A.
+ *   Copyright 2012-2017 Mellanox.
Can someone knowledgeable about Copyright help please?

What is the year field in Copyright line for?
And above change updates Copyright from 2012 to 2012-2017, is this correct?
quoted hunk ↗ jump to hunk
  *
  *   Redistribution and use in source and binary forms, with or without
  *   modification, are permitted provided that the following conditions
@@ -68,10 +68,6 @@
 #pragma GCC diagnostic error "-Wpedantic"
 #endif
Above invisible lines are  "#include <infiniband/verbs.h>" wrapped with
#pragma for pedantic.

That piece moved to "mlx4.h" [1], which included a few lines later, so
can these line be removed from this line?
 
-/* DPDK headers don't like -pedantic. */
-#ifdef PEDANTIC
-#pragma GCC diagnostic ignored "-Wpedantic"
-#endif
Comment says "DPDK headers don't like -pedantic", won't removing #pragma
cause compile error with pedantic option?
quoted hunk ↗ jump to hunk
 #include <rte_ether.h>
 #include <rte_ethdev.h>
 #include <rte_dev.h>
@@ -86,9 +82,6 @@
 #include <rte_log.h>
 #include <rte_alarm.h>
 #include <rte_memory.h>
-#ifdef PEDANTIC
-#pragma GCC diagnostic error "-Wpedantic"
-#endif
 
 /* Generated configuration header. */
 #include "mlx4_autoconf.h"
@@ -96,21 +89,6 @@
 /* PMD header. */
 #include "mlx4.h"
 
<...>
quoted hunk ↗ jump to hunk
diff --git a/drivers/net/mlx4/mlx4.h b/drivers/net/mlx4/mlx4.h
index 4c7505e..70c9ecd 100644
--- a/drivers/net/mlx4/mlx4.h
+++ b/drivers/net/mlx4/mlx4.h
<...>
+
+/* Verbs header. */
+/* ISO C doesn't support unnamed structs/unions, disabling -pedantic. */
+#ifdef PEDANTIC
+#pragma GCC diagnostic ignored "-Wpedantic"
+#endif
+#include <infiniband/verbs.h>
+#ifdef PEDANTIC
+#pragma GCC diagnostic error "-Wpedantic"
+#endif
--> [1]

<...>
+
+void priv_lock(struct priv *priv);
+void priv_unlock(struct priv *priv);
It can be good to mention in commit log that these functions are now
exported.
+
 #endif /* RTE_PMD_MLX4_H_ */
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help