* [PATCH net] net/bonding: Make DRV macros private
@ 2015-04-26 12:55 Or Gerlitz
2015-04-27 3:00 ` David Miller
0 siblings, 1 reply; 2+ messages in thread
From: Or Gerlitz @ 2015-04-26 12:55 UTC (permalink / raw)
To: David S. Miller
Cc: netdev, Andy Gospodarek, Jay Vosburgh, Matan Barak, Or Gerlitz
From: Matan Barak <matanb@mellanox.com>
The bonding modules currently defines four macros with
general names that pollute the global namespace:
DRV_VERSION
DRV_RELDATE
DRV_NAME
DRV_DESCRIPTION
Fixing that by defining a private bonding_priv.h
header files which includes those defines.
Signed-off-by: Matan Barak <matanb@mellanox.com>
Signed-off-by: Or Gerlitz <ogerlitz@mellanox.com>
---
Hi Dave,
We've been hitting this small issue when working on
rdma-next (4.2) features to the IB driver, so just
to avoid unnecessary deps sending it as fix for 4.1-rc1
Matan used the somehow old header for the new file, hope
this is OK, and if not, we'll change...
Or.
drivers/net/bonding/bond_main.c | 2 ++
drivers/net/bonding/bond_procfs.c | 1 +
drivers/net/bonding/bonding_priv.h | 25 +++++++++++++++++++++++++
include/net/bonding.h | 7 -------
4 files changed, 28 insertions(+), 7 deletions(-)
create mode 100644 drivers/net/bonding/bonding_priv.h
diff --git a/drivers/net/bonding/bond_main.c b/drivers/net/bonding/bond_main.c
index 78dde56..3a10551 100644
--- a/drivers/net/bonding/bond_main.c
+++ b/drivers/net/bonding/bond_main.c
@@ -82,6 +82,8 @@
#include <net/bond_3ad.h>
#include <net/bond_alb.h>
+#include "bonding_priv.h"
+
/*---------------------------- Module parameters ----------------------------*/
/* monitor all links that often (in milliseconds). <=0 disables monitoring */
diff --git a/drivers/net/bonding/bond_procfs.c b/drivers/net/bonding/bond_procfs.c
index 62694cf..b20b35a 100644
--- a/drivers/net/bonding/bond_procfs.c
+++ b/drivers/net/bonding/bond_procfs.c
@@ -4,6 +4,7 @@
#include <net/netns/generic.h>
#include <net/bonding.h>
+#include "bonding_priv.h"
static void *bond_info_seq_start(struct seq_file *seq, loff_t *pos)
__acquires(RCU)
diff --git a/drivers/net/bonding/bonding_priv.h b/drivers/net/bonding/bonding_priv.h
new file mode 100644
index 0000000..5a4d81a
--- /dev/null
+++ b/drivers/net/bonding/bonding_priv.h
@@ -0,0 +1,25 @@
+/*
+ * Bond several ethernet interfaces into a Cisco, running 'Etherchannel'.
+ *
+ * Portions are (c) Copyright 1995 Simon "Guru Aleph-Null" Janes
+ * NCM: Network and Communications Management, Inc.
+ *
+ * BUT, I'm the one who modified it for ethernet, so:
+ * (c) Copyright 1999, Thomas Davis, tadavis@lbl.gov
+ *
+ * This software may be used and distributed according to the terms
+ * of the GNU Public License, incorporated herein by reference.
+ *
+ */
+
+#ifndef _BONDING_PRIV_H
+#define _BONDING_PRIV_H
+
+#define DRV_VERSION "3.7.1"
+#define DRV_RELDATE "April 27, 2011"
+#define DRV_NAME "bonding"
+#define DRV_DESCRIPTION "Ethernet Channel Bonding Driver"
+
+#define bond_version DRV_DESCRIPTION ": v" DRV_VERSION " (" DRV_RELDATE ")\n"
+
+#endif
diff --git a/include/net/bonding.h b/include/net/bonding.h
index fda6fee..78ed135 100644
--- a/include/net/bonding.h
+++ b/include/net/bonding.h
@@ -30,13 +30,6 @@
#include <net/bond_alb.h>
#include <net/bond_options.h>
-#define DRV_VERSION "3.7.1"
-#define DRV_RELDATE "April 27, 2011"
-#define DRV_NAME "bonding"
-#define DRV_DESCRIPTION "Ethernet Channel Bonding Driver"
-
-#define bond_version DRV_DESCRIPTION ": v" DRV_VERSION " (" DRV_RELDATE ")\n"
-
#define BOND_MAX_ARP_TARGETS 16
#define BOND_DEFAULT_MIIMON 100
--
1.7.1
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH net] net/bonding: Make DRV macros private
2015-04-26 12:55 [PATCH net] net/bonding: Make DRV macros private Or Gerlitz
@ 2015-04-27 3:00 ` David Miller
0 siblings, 0 replies; 2+ messages in thread
From: David Miller @ 2015-04-27 3:00 UTC (permalink / raw)
To: ogerlitz; +Cc: netdev, gospo, j.vosburgh, matanb
From: Or Gerlitz <ogerlitz@mellanox.com>
Date: Sun, 26 Apr 2015 15:55:57 +0300
> From: Matan Barak <matanb@mellanox.com>
>
> The bonding modules currently defines four macros with
> general names that pollute the global namespace:
> DRV_VERSION
> DRV_RELDATE
> DRV_NAME
> DRV_DESCRIPTION
>
> Fixing that by defining a private bonding_priv.h
> header files which includes those defines.
>
> Signed-off-by: Matan Barak <matanb@mellanox.com>
> Signed-off-by: Or Gerlitz <ogerlitz@mellanox.com>
Applied, thanks.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2015-04-27 3:00 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-04-26 12:55 [PATCH net] net/bonding: Make DRV macros private Or Gerlitz
2015-04-27 3:00 ` David Miller
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).