Skip to contentSkip to conversation

fm10k: conditionally compile DCB and DebugFS support

PATCH Superseded Jacob Keller 2 participants 6 messages Oct 26, 2015 – Oct 28, 2015

Subsystems (2)

v2 of 5 Superseded Latest is v5 →

lore
Share & tools
lore
#0 lore raw

PATCH v2 1/1 fm10k: conditionally compile DCB and DebugFS support

Rather than wrapping fm10k_dcbnl.c and fm10k_debugfs.c support with
#ifdef blocks, just conditionally include the .o files in the Makefile.
Also, since we're modifying it, update the copyright year on the Makefile.

---
This replaces in-place the previous version of the patch currently in the queue, fixing a compilation error

-v2
* Fix issue when DCB is disabled, since the function didn't take the same parameters.

 drivers/net/ethernet/intel/fm10k/Makefile        | 20 +++++++++++++++-----
 drivers/net/ethernet/intel/fm10k/fm10k.h         |  4 ++++
 drivers/net/ethernet/intel/fm10k/fm10k_dcbnl.c   |  4 ----
 drivers/net/ethernet/intel/fm10k/fm10k_debugfs.c |  4 ----
 4 files changed, 19 insertions(+), 13 deletions(-)
drivers/net/ethernet/intel/fm10k/Makefile +15 -5
index 08859dd220a8..b006ff66d028 100644
@@ -1,7 +1,7 @@
 ################################################################################
 #
 # Intel Ethernet Switch Host Interface Driver
-# Copyright(c) 2013 - 2014 Intel Corporation.
+# Copyright(c) 2013 - 2015 Intel Corporation.
 #
 # This program is free software; you can redistribute it and/or modify it
 # under the terms and conditions of the GNU General Public License,
@@ -27,7 +27,17 @@
 
 obj-$(CONFIG_FM10K) += fm10k.o
 
-fm10k-objs := fm10k_main.o fm10k_common.o fm10k_pci.o \
-	      fm10k_netdev.o fm10k_ethtool.o fm10k_pf.o fm10k_vf.o \
-	      fm10k_mbx.o fm10k_iov.o fm10k_tlv.o \
-	      fm10k_debugfs.o fm10k_ptp.o fm10k_dcbnl.o
+fm10k-y := fm10k_main.o \
+	   fm10k_common.o \
+	   fm10k_pci.o \
+	   fm10k_ptp.o \
+	   fm10k_netdev.o \
+	   fm10k_ethtool.o \
+	   fm10k_pf.o \
+	   fm10k_vf.o \
+	   fm10k_mbx.o \
+	   fm10k_iov.o \
+	   fm10k_tlv.o
+
+fm10k-$(CONFIG_DEBUG_FS) += fm10k_debugfs.o
+fm10k-$(CONFIG_DCB) += fm10k_dcbnl.o
drivers/net/ethernet/intel/fm10k/fm10k.h +4 -0
index 48809e5d3f79..2e1e3e9c59c9 100644
@@ -551,5 +551,9 @@ int fm10k_get_ts_config(struct net_device *netdev, struct ifreq *ifr);
 int fm10k_set_ts_config(struct net_device *netdev, struct ifreq *ifr);
 
 /* DCB */
+#ifdef CONFIG_DCB
 void fm10k_dcbnl_set_ops(struct net_device *dev);
+#else
+static inline void fm10k_dcbnl_set_ops(struct net_device __always_unused *dev) {}
+#endif
 #endif /* _FM10K_H_ */
drivers/net/ethernet/intel/fm10k/fm10k_dcbnl.c +0 -4
index 5c7a4d7662d8..2be4361839db 100644
@@ -20,7 +20,6 @@
 
 #include "fm10k.h"
 
-#ifdef CONFIG_DCB
 /**
  * fm10k_dcbnl_ieee_getets - get the ETS configuration for the device
  * @dev: netdev interface for the device
@@ -155,7 +154,6 @@ static const struct dcbnl_rtnl_ops fm10k_dcbnl_ops = {
 	.setdcbx	= fm10k_dcbnl_setdcbx,
 };
 
-#endif /* CONFIG_DCB */
 /**
  * fm10k_dcbnl_set_ops - Configures dcbnl ops pointer for netdev
  * @dev: netdev interface for the device
@@ -164,11 +162,9 @@ static const struct dcbnl_rtnl_ops fm10k_dcbnl_ops = {
  **/
 void fm10k_dcbnl_set_ops(struct net_device *dev)
 {
-#ifdef CONFIG_DCB
 	struct fm10k_intfc *interface = netdev_priv(dev);
 	struct fm10k_hw *hw = &interface->hw;
 
 	if (hw->mac.type == fm10k_mac_pf)
 		dev->dcbnl_ops = &fm10k_dcbnl_ops;
-#endif /* CONFIG_DCB */
 }
drivers/net/ethernet/intel/fm10k/fm10k_debugfs.c +0 -4
index 5304bc1fbecd..5d6137faf7d1 100644
@@ -18,8 +18,6 @@
  * Intel Corporation, 5200 N.E. Elam Young Parkway, Hillsboro, OR 97124-6497
  */
 
-#ifdef CONFIG_DEBUG_FS
-
 #include "fm10k.h"
 
 #include <linux/debugfs.h>
@@ -258,5 +256,3 @@ void fm10k_dbg_exit(void)
 	debugfs_remove_recursive(dbg_root);
 	dbg_root = NULL;
 }
-
-#endif /* CONFIG_DEBUG_FS */
Signature · 1 line
2.6.1.264.gbab76a9
#1 lore raw

PATCH v2 1/1 fm10k: conditionally compile DCB and DebugFS support

Quoted 82 lines

-----Original Message-----
From: Keller, Jacob E
Sent: Monday, October 26, 2015 3:18 PM
To: Intel Wired LAN
Cc: Keller, Jacob E; Allan, Bruce W
Subject: [next-queue v2] fm10k: conditionally compile DCB and DebugFS support

Rather than wrapping fm10k_dcbnl.c and fm10k_debugfs.c support with
#ifdef blocks, just conditionally include the .o files in the Makefile.
Also, since we're modifying it, update the copyright year on the Makefile.

---
This replaces in-place the previous version of the patch currently in the queue, fixing a compilation error

-v2
* Fix issue when DCB is disabled, since the function didn't take the same parameters.

 drivers/net/ethernet/intel/fm10k/Makefile        | 20 +++++++++++++++----
(quoted diff) +0 -1
-
 drivers/net/ethernet/intel/fm10k/fm10k.h         |  4 ++++
 drivers/net/ethernet/intel/fm10k/fm10k_dcbnl.c   |  4 ----
 drivers/net/ethernet/intel/fm10k/fm10k_debugfs.c |  4 ----
 4 files changed, 19 insertions(+), 13 deletions(-)
drivers/net/ethernet/intel/fm10k/Makefile +1 -1
index 08859dd220a8..b006ff66d028 100644
@@ -1,7 +1,7 @@
 
 ##########################################################
 ######################
 #
 # Intel Ethernet Switch Host Interface Driver
-# Copyright(c) 2013 - 2014 Intel Corporation.
+# Copyright(c) 2013 - 2015 Intel Corporation.
 #

# This program is free software; you can redistribute it and/or modify it

 # under the terms and conditions of the GNU General Public License,
drivers/net/ethernet/intel/fm10k/Makefile +14 -4
@@ -27,7 +27,17 @@
 
 obj-$(CONFIG_FM10K) += fm10k.o
 
-fm10k-objs := fm10k_main.o fm10k_common.o fm10k_pci.o \
-	      fm10k_netdev.o fm10k_ethtool.o fm10k_pf.o fm10k_vf.o \
-	      fm10k_mbx.o fm10k_iov.o fm10k_tlv.o \
-	      fm10k_debugfs.o fm10k_ptp.o fm10k_dcbnl.o
+fm10k-y := fm10k_main.o \
+	   fm10k_common.o \
+	   fm10k_pci.o \
+	   fm10k_ptp.o \
+	   fm10k_netdev.o \
+	   fm10k_ethtool.o \
+	   fm10k_pf.o \
+	   fm10k_vf.o \
+	   fm10k_mbx.o \
+	   fm10k_iov.o \
+	   fm10k_tlv.o
+
+fm10k-$(CONFIG_DEBUG_FS) += fm10k_debugfs.o
+fm10k-$(CONFIG_DCB) += fm10k_dcbnl.o
drivers/net/ethernet/intel/fm10k/fm10k.h +3 -0
index 48809e5d3f79..2e1e3e9c59c9 100644
@@ -551,5 +551,9 @@ int fm10k_get_ts_config(struct net_device *netdev,
 struct ifreq *ifr);
 int fm10k_set_ts_config(struct net_device *netdev, struct ifreq *ifr);
 
 /* DCB */
+#ifdef CONFIG_DCB
 void fm10k_dcbnl_set_ops(struct net_device *dev);
+#else
+static inline void fm10k_dcbnl_set_ops(struct net_device
Quoted 1 line

__always_unused *dev) {}

"__always_unused" is unnecessary.

Quoted 60 lines
drivers/net/ethernet/intel/fm10k/fm10k.h +1 -0
+#endif
 #endif /* _FM10K_H_ */
drivers/net/ethernet/intel/fm10k/fm10k_dcbnl.c +0 -2
index 5c7a4d7662d8..2be4361839db 100644
@@ -20,7 +20,6 @@
 
 #include "fm10k.h"
 
-#ifdef CONFIG_DCB
 /**
  * fm10k_dcbnl_ieee_getets - get the ETS configuration for the device
  * @dev: netdev interface for the device
@@ -155,7 +154,6 @@ static const struct dcbnl_rtnl_ops fm10k_dcbnl_ops
 = {
 	.setdcbx	= fm10k_dcbnl_setdcbx,
 };
 
-#endif /* CONFIG_DCB */
 /**
  * fm10k_dcbnl_set_ops - Configures dcbnl ops pointer for netdev

* @dev: netdev interface for the device

drivers/net/ethernet/intel/fm10k/fm10k_dcbnl.c +0 -2
@@ -164,11 +162,9 @@ static const struct dcbnl_rtnl_ops fm10k_dcbnl_ops
 = {
  **/
 void fm10k_dcbnl_set_ops(struct net_device *dev)
 {
-#ifdef CONFIG_DCB
 	struct fm10k_intfc *interface = netdev_priv(dev);
 	struct fm10k_hw *hw = &interface->hw;
 
 	if (hw->mac.type == fm10k_mac_pf)
 		dev->dcbnl_ops = &fm10k_dcbnl_ops;
-#endif /* CONFIG_DCB */

}

drivers/net/ethernet/intel/fm10k/fm10k_debugfs.c +0 -0
index 5304bc1fbecd..5d6137faf7d1 100644
@@ -18,8 +18,6 @@
  * Intel Corporation, 5200 N.E. Elam Young Parkway, Hillsboro, OR 97124-

6497
*/

drivers/net/ethernet/intel/fm10k/fm10k_debugfs.c +0 -5
-#ifdef CONFIG_DEBUG_FS
-
 #include "fm10k.h"
 
 #include <linux/debugfs.h>
@@ -258,5 +256,3 @@ void fm10k_dbg_exit(void)
 	debugfs_remove_recursive(dbg_root);
 	dbg_root = NULL;
 }
-
-#endif /* CONFIG_DEBUG_FS */
--

2.6.1.264.gbab76a9

#2 lore raw

PATCH v2 1/1 fm10k: conditionally compile DCB and DebugFS support

Quoted 85 lines

-----Original Message-----
From: Allan, Bruce W
Sent: Tuesday, October 27, 2015 11:57 AM
To: Keller, Jacob E; Intel Wired LAN
Subject: RE: [next-queue v2] fm10k: conditionally compile DCB and DebugFS support

drivers/net/ethernet/intel/fm10k/fm10k.h int fm10k_get_ts_config(struct net_device

Quoted 74 lines

-----Original Message-----
From: Keller, Jacob E
Sent: Monday, October 26, 2015 3:18 PM
To: Intel Wired LAN
Cc: Keller, Jacob E; Allan, Bruce W
Subject: [next-queue v2] fm10k: conditionally compile DCB and DebugFS support

Rather than wrapping fm10k_dcbnl.c and fm10k_debugfs.c support with
#ifdef blocks, just conditionally include the .o files in the Makefile.
Also, since we're modifying it, update the copyright year on the Makefile.

---
This replaces in-place the previous version of the patch currently in the queue, fixing a compilation error

-v2
* Fix issue when DCB is disabled, since the function didn't take the same parameters.

 drivers/net/ethernet/intel/fm10k/Makefile        | 20 +++++++++++++++----
(quoted diff) +0 -1
-
 drivers/net/ethernet/intel/fm10k/fm10k.h         |  4 ++++
 drivers/net/ethernet/intel/fm10k/fm10k_dcbnl.c   |  4 ----
 drivers/net/ethernet/intel/fm10k/fm10k_debugfs.c |  4 ----
 4 files changed, 19 insertions(+), 13 deletions(-)
drivers/net/ethernet/intel/fm10k/Makefile +1 -1
index 08859dd220a8..b006ff66d028 100644
@@ -1,7 +1,7 @@
 
 ##########################################################
 ######################
 #
 # Intel Ethernet Switch Host Interface Driver
-# Copyright(c) 2013 - 2014 Intel Corporation.
+# Copyright(c) 2013 - 2015 Intel Corporation.
 #

# This program is free software; you can redistribute it and/or modify it

 # under the terms and conditions of the GNU General Public License,
drivers/net/ethernet/intel/fm10k/Makefile +14 -4
@@ -27,7 +27,17 @@
 
 obj-$(CONFIG_FM10K) += fm10k.o
 
-fm10k-objs := fm10k_main.o fm10k_common.o fm10k_pci.o \
-	      fm10k_netdev.o fm10k_ethtool.o fm10k_pf.o fm10k_vf.o \
-	      fm10k_mbx.o fm10k_iov.o fm10k_tlv.o \
-	      fm10k_debugfs.o fm10k_ptp.o fm10k_dcbnl.o
+fm10k-y := fm10k_main.o \
+	   fm10k_common.o \
+	   fm10k_pci.o \
+	   fm10k_ptp.o \
+	   fm10k_netdev.o \
+	   fm10k_ethtool.o \
+	   fm10k_pf.o \
+	   fm10k_vf.o \
+	   fm10k_mbx.o \
+	   fm10k_iov.o \
+	   fm10k_tlv.o
+
+fm10k-$(CONFIG_DEBUG_FS) += fm10k_debugfs.o
+fm10k-$(CONFIG_DCB) += fm10k_dcbnl.o
drivers/net/ethernet/intel/fm10k/fm10k.h +0 -0
index 48809e5d3f79..2e1e3e9c59c9 100644
@@ -551,5 +551,9 @@ int fm10k_get_ts_config(struct net_device

*netdev,

Quoted 3 lines
drivers/net/ethernet/intel/fm10k/fm10k.h +0 -0
 struct ifreq *ifr);
 int fm10k_set_ts_config(struct net_device *netdev, struct ifreq *ifr);
 
Quoted 9 lines
Quoted 6 lines
drivers/net/ethernet/intel/fm10k/fm10k.h +3 -0
 /* DCB */
+#ifdef CONFIG_DCB
 void fm10k_dcbnl_set_ops(struct net_device *dev);
+#else
+static inline void fm10k_dcbnl_set_ops(struct net_device

__always_unused *dev) {}

"__always_unused" is unnecessary.

Not sure I agree..? This version of the function would otherwise complain under W=1 with warn about unused parameters, and I believe in keeping W=1 pretty clean of these sort of things to make it more useful.

Regards,
Jake

#3 lore raw

PATCH v2 1/1 fm10k: conditionally compile DCB and DebugFS support

Quoted 105 lines

-----Original Message-----
From: Keller, Jacob E
Sent: Tuesday, October 27, 2015 12:28 PM
To: Allan, Bruce W; Intel Wired LAN
Subject: RE: [next-queue v2] fm10k: conditionally compile DCB and DebugFS support

Quoted 5 lines

-----Original Message-----
From: Allan, Bruce W
Sent: Tuesday, October 27, 2015 11:57 AM
To: Keller, Jacob E; Intel Wired LAN
Subject: RE: [next-queue v2] fm10k: conditionally compile DCB and

DebugFS

Quoted 26 lines

support

Quoted 24 lines

-----Original Message-----
From: Keller, Jacob E
Sent: Monday, October 26, 2015 3:18 PM
To: Intel Wired LAN
Cc: Keller, Jacob E; Allan, Bruce W
Subject: [next-queue v2] fm10k: conditionally compile DCB and DebugFS support

Rather than wrapping fm10k_dcbnl.c and fm10k_debugfs.c support with
#ifdef blocks, just conditionally include the .o files in the Makefile.
Also, since we're modifying it, update the copyright year on the Makefile.

---
This replaces in-place the previous version of the patch currently in the queue, fixing a compilation error

-v2
* Fix issue when DCB is disabled, since the function didn't take the same parameters.

 drivers/net/ethernet/intel/fm10k/Makefile        | 20

+++++++++++++++----

Quoted 6 lines
Quoted 6 lines

-

 drivers/net/ethernet/intel/fm10k/fm10k.h         |  4 ++++
 drivers/net/ethernet/intel/fm10k/fm10k_dcbnl.c   |  4 ----
 drivers/net/ethernet/intel/fm10k/fm10k_debugfs.c |  4 ----
 4 files changed, 19 insertions(+), 13 deletions(-)
Quoted 8 lines

drivers/net/ethernet/intel/fm10k/Makefile line 2

Quoted 8 lines
drivers/net/ethernet/intel/fm10k/Makefile +0 -0
index 08859dd220a8..b006ff66d028 100644
@@ -1,7 +1,7 @@
 
 

##########################################################

Quoted 40 lines

drivers/net/ethernet/intel/fm10k/fm10k.h int fm10k_get_ts_config(struct net_device

Quoted 36 lines
drivers/net/ethernet/intel/fm10k/Makefile +1 -1
 ######################
 #
 # Intel Ethernet Switch Host Interface Driver
-# Copyright(c) 2013 - 2014 Intel Corporation.
+# Copyright(c) 2013 - 2015 Intel Corporation.
 #

# This program is free software; you can redistribute it and/or modify it

 # under the terms and conditions of the GNU General Public License,
drivers/net/ethernet/intel/fm10k/Makefile +14 -4
@@ -27,7 +27,17 @@
 
 obj-$(CONFIG_FM10K) += fm10k.o
 
-fm10k-objs := fm10k_main.o fm10k_common.o fm10k_pci.o \
-	      fm10k_netdev.o fm10k_ethtool.o fm10k_pf.o fm10k_vf.o \
-	      fm10k_mbx.o fm10k_iov.o fm10k_tlv.o \
-	      fm10k_debugfs.o fm10k_ptp.o fm10k_dcbnl.o
+fm10k-y := fm10k_main.o \
+	   fm10k_common.o \
+	   fm10k_pci.o \
+	   fm10k_ptp.o \
+	   fm10k_netdev.o \
+	   fm10k_ethtool.o \
+	   fm10k_pf.o \
+	   fm10k_vf.o \
+	   fm10k_mbx.o \
+	   fm10k_iov.o \
+	   fm10k_tlv.o
+
+fm10k-$(CONFIG_DEBUG_FS) += fm10k_debugfs.o
+fm10k-$(CONFIG_DCB) += fm10k_dcbnl.o
drivers/net/ethernet/intel/fm10k/fm10k.h +0 -0
index 48809e5d3f79..2e1e3e9c59c9 100644
@@ -551,5 +551,9 @@ int fm10k_get_ts_config(struct net_device

*netdev,

Quoted 3 lines
drivers/net/ethernet/intel/fm10k/fm10k.h +0 -0
 struct ifreq *ifr);
 int fm10k_set_ts_config(struct net_device *netdev, struct ifreq *ifr);
 
Quoted 9 lines
Quoted 6 lines
drivers/net/ethernet/intel/fm10k/fm10k.h +3 -0
 /* DCB */
+#ifdef CONFIG_DCB
 void fm10k_dcbnl_set_ops(struct net_device *dev);
+#else
+static inline void fm10k_dcbnl_set_ops(struct net_device

__always_unused *dev) {}

"__always_unused" is unnecessary.

Quoted 6 lines

Not sure I agree..? This version of the function would otherwise complain under W=1 with warn about unused parameters, and I believe in keeping W=1 pretty clean of these sort of things to make it more useful.

Regards,
Jake

Are you sure a warning will be generated in this case?!? I think not.

#4 lore raw

PATCH v2 1/1 fm10k: conditionally compile DCB and DebugFS support

Quoted 116 lines

-----Original Message-----
From: Allan, Bruce W
Sent: Tuesday, October 27, 2015 12:33 PM
To: Keller, Jacob E; Intel Wired LAN
Subject: RE: [next-queue v2] fm10k: conditionally compile DCB and DebugFS support

Quoted 5 lines

-----Original Message-----
From: Keller, Jacob E
Sent: Tuesday, October 27, 2015 12:28 PM
To: Allan, Bruce W; Intel Wired LAN
Subject: RE: [next-queue v2] fm10k: conditionally compile DCB and

DebugFS

Quoted 16 lines

support

Quoted 5 lines

-----Original Message-----
From: Allan, Bruce W
Sent: Tuesday, October 27, 2015 11:57 AM
To: Keller, Jacob E; Intel Wired LAN
Subject: RE: [next-queue v2] fm10k: conditionally compile DCB and

DebugFS

Quoted 8 lines

support

Quoted 6 lines

-----Original Message-----
From: Keller, Jacob E
Sent: Monday, October 26, 2015 3:18 PM
To: Intel Wired LAN
Cc: Keller, Jacob E; Allan, Bruce W
Subject: [next-queue v2] fm10k: conditionally compile DCB and

DebugFS

Quoted 3 lines
Quoted 3 lines
Quoted 3 lines

support

Rather than wrapping fm10k_dcbnl.c and fm10k_debugfs.c support

with

Quoted 31 lines
Quoted 10 lines
Quoted 10 lines

#ifdef blocks, just conditionally include the .o files in the Makefile.
Also, since we're modifying it, update the copyright year on the Makefile.

---
This replaces in-place the previous version of the patch currently in the queue, fixing a compilation error

Quoted 5 lines
Quoted 5 lines

-v2
* Fix issue when DCB is disabled, since the function didn't take the same parameters.

 drivers/net/ethernet/intel/fm10k/Makefile        | 20

+++++++++++++++----

Quoted 6 lines
Quoted 6 lines

-

 drivers/net/ethernet/intel/fm10k/fm10k.h         |  4 ++++
 drivers/net/ethernet/intel/fm10k/fm10k_dcbnl.c   |  4 ----
 drivers/net/ethernet/intel/fm10k/fm10k_debugfs.c |  4 ----
 4 files changed, 19 insertions(+), 13 deletions(-)
Quoted 8 lines

drivers/net/ethernet/intel/fm10k/Makefile line 2

Quoted 8 lines
drivers/net/ethernet/intel/fm10k/Makefile +0 -0
index 08859dd220a8..b006ff66d028 100644
@@ -1,7 +1,7 @@
 
 

##########################################################

Quoted 7 lines
Quoted 7 lines
Quoted 7 lines
drivers/net/ethernet/intel/fm10k/Makefile +1 -1
 ######################
 #
 # Intel Ethernet Switch Host Interface Driver
-# Copyright(c) 2013 - 2014 Intel Corporation.
+# Copyright(c) 2013 - 2015 Intel Corporation.
 #

# This program is free software; you can redistribute it and/or modify

it

Quoted 43 lines
Quoted 42 lines

drivers/net/ethernet/intel/fm10k/fm10k.h int fm10k_get_ts_config(struct net_device

Quoted 29 lines
 # under the terms and conditions of the GNU General Public License,
drivers/net/ethernet/intel/fm10k/Makefile +14 -4
@@ -27,7 +27,17 @@
 
 obj-$(CONFIG_FM10K) += fm10k.o
 
-fm10k-objs := fm10k_main.o fm10k_common.o fm10k_pci.o \
-	      fm10k_netdev.o fm10k_ethtool.o fm10k_pf.o fm10k_vf.o \
-	      fm10k_mbx.o fm10k_iov.o fm10k_tlv.o \
-	      fm10k_debugfs.o fm10k_ptp.o fm10k_dcbnl.o
+fm10k-y := fm10k_main.o \
+	   fm10k_common.o \
+	   fm10k_pci.o \
+	   fm10k_ptp.o \
+	   fm10k_netdev.o \
+	   fm10k_ethtool.o \
+	   fm10k_pf.o \
+	   fm10k_vf.o \
+	   fm10k_mbx.o \
+	   fm10k_iov.o \
+	   fm10k_tlv.o
+
+fm10k-$(CONFIG_DEBUG_FS) += fm10k_debugfs.o
+fm10k-$(CONFIG_DCB) += fm10k_dcbnl.o
drivers/net/ethernet/intel/fm10k/fm10k.h +0 -0
index 48809e5d3f79..2e1e3e9c59c9 100644
@@ -551,5 +551,9 @@ int fm10k_get_ts_config(struct net_device

*netdev,

Quoted 9 lines
drivers/net/ethernet/intel/fm10k/fm10k.h +3 -0
 struct ifreq *ifr);
 int fm10k_set_ts_config(struct net_device *netdev, struct ifreq *ifr);
 
 /* DCB */
+#ifdef CONFIG_DCB
 void fm10k_dcbnl_set_ops(struct net_device *dev);
+#else
+static inline void fm10k_dcbnl_set_ops(struct net_device

__always_unused *dev) {}

"__always_unused" is unnecessary.

Quoted 8 lines
Quoted 6 lines

Not sure I agree..? This version of the function would otherwise complain under W=1 with warn about unused parameters, and I believe in keeping W=1 pretty clean of these sort of things to make it more useful.

Regards,
Jake

Are you sure a warning will be generated in this case?!? I think not.

You're right. I did a few tests and apparently compiler is smart enough to ignore this function. I'll drop the unused macro.

Thanks,
Jake

#5 lore raw

PATCH v2 1/1 fm10k: conditionally compile DCB and DebugFS support

In reply to Jacob Keller

-----Original Message-----
From: Intel-wired-lan [mailto:intel-wired-lan-bounces at lists.osuosl.org] On Behalf Of Jacob Keller
Sent: Monday, October 26, 2015 3:18 PM
To: Intel Wired LAN <[email protected]>
Subject: [Intel-wired-lan] [next-queue v2] fm10k: conditionally compile DCB and DebugFS support

Rather than wrapping fm10k_dcbnl.c and fm10k_debugfs.c support with #ifdef blocks, just conditionally include the .o files in the Makefile. Also, since we're modifying it, update the copyright year on the Makefile.

---