aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/ethernet/intel/ice/ice_dcb_nl.h
diff options
context:
space:
mode:
authorJesse Brandeburg <jesse.brandeburg@intel.com>2021-05-06 08:39:56 -0700
committerTony Nguyen <anthony.l.nguyen@intel.com>2021-06-07 08:59:01 -0700
commit96cf4f689bf7e074c8ab8917a82a24114370cbeb (patch)
tree3c2eab26d3d5312b1f5970de0663c71d5b0a4ea5 /drivers/net/ethernet/intel/ice/ice_dcb_nl.h
parentice: Re-organizes reqstd/avail {R, T}XQ check/code for efficiency (diff)
downloadlinux-dev-96cf4f689bf7e074c8ab8917a82a24114370cbeb.tar.xz
linux-dev-96cf4f689bf7e074c8ab8917a82a24114370cbeb.zip
ice: use static inline for dummy functions
Trivial: The driver had previously attempted to use #define macros to make functions that have no use in certain configs disappear. Using static inlines instead allows for certain static checkers to process the code better, and results in no functional change. Signed-off-by: Jesse Brandeburg <jesse.brandeburg@intel.com> Tested-by: Tony Brelinski <tonyx.brelinski@intel.com> Signed-off-by: Tony Nguyen <anthony.l.nguyen@intel.com>
Diffstat (limited to 'drivers/net/ethernet/intel/ice/ice_dcb_nl.h')
-rw-r--r--drivers/net/ethernet/intel/ice/ice_dcb_nl.h9
1 files changed, 5 insertions, 4 deletions
diff --git a/drivers/net/ethernet/intel/ice/ice_dcb_nl.h b/drivers/net/ethernet/intel/ice/ice_dcb_nl.h
index 6c630a362293..eac2f34bdcdd 100644
--- a/drivers/net/ethernet/intel/ice/ice_dcb_nl.h
+++ b/drivers/net/ethernet/intel/ice/ice_dcb_nl.h
@@ -11,9 +11,10 @@ void
ice_dcbnl_flush_apps(struct ice_pf *pf, struct ice_dcbx_cfg *old_cfg,
struct ice_dcbx_cfg *new_cfg);
#else
-#define ice_dcbnl_setup(vsi) do {} while (0)
-#define ice_dcbnl_set_all(vsi) do {} while (0)
-#define ice_dcbnl_flush_apps(pf, old_cfg, new_cfg) do {} while (0)
+static inline void ice_dcbnl_setup(struct ice_vsi *vsi) { }
+static inline void ice_dcbnl_set_all(struct ice_vsi *vsi) { }
+static inline void
+ice_dcbnl_flush_apps(struct ice_pf *pf, struct ice_dcbx_cfg *old_cfg,
+ struct ice_dcbx_cfg *new_cfg) { }
#endif /* CONFIG_DCB */
-
#endif /* _ICE_DCB_NL_H_ */