[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <1418160380-29847-14-git-send-email-jeffrey.t.kirsher@intel.com>
Date: Tue, 9 Dec 2014 13:26:20 -0800
From: Jeff Kirsher <jeffrey.t.kirsher@...el.com>
To: davem@...emloft.net
Cc: Jeff Kirsher <jeffrey.t.kirsher@...el.com>, netdev@...r.kernel.org,
nhorman@...hat.com, sassmann@...hat.com, jogreene@...hat.com,
Sergei Shtylyov <sergei.shtylyov@...entembedded.com>
Subject: [net-next v2 13/13] i40e/i40evf: Convert macro to static inline
Inline functions are preferred over macros when they can be used
interchangeably.
CC: Sergei Shtylyov <sergei.shtylyov@...entembedded.com>
Reported-by: Joe Perches <joe@...ches.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@...el.com>
---
v2:
- remove unnecessary parens in the return statement as suggested
by Sergei Shtylyov
drivers/net/ethernet/intel/i40e/i40e_type.h | 5 ++++-
drivers/net/ethernet/intel/i40evf/i40e_type.h | 5 ++++-
2 files changed, 8 insertions(+), 2 deletions(-)
diff --git a/drivers/net/ethernet/intel/i40e/i40e_type.h b/drivers/net/ethernet/intel/i40e/i40e_type.h
index 844421f..c1f2eb9 100644
--- a/drivers/net/ethernet/intel/i40e/i40e_type.h
+++ b/drivers/net/ethernet/intel/i40e/i40e_type.h
@@ -481,7 +481,10 @@ struct i40e_hw {
u32 debug_mask;
};
-#define i40e_is_vf(_hw) ((_hw)->mac.type == I40E_MAC_VF)
+static inline bool i40e_is_vf(struct i40e_hw *hw)
+{
+ return hw->mac.type == I40E_MAC_VF;
+}
struct i40e_driver_version {
u8 major_version;
diff --git a/drivers/net/ethernet/intel/i40evf/i40e_type.h b/drivers/net/ethernet/intel/i40evf/i40e_type.h
index d8175cd..68aec11 100644
--- a/drivers/net/ethernet/intel/i40evf/i40e_type.h
+++ b/drivers/net/ethernet/intel/i40evf/i40e_type.h
@@ -475,7 +475,10 @@ struct i40e_hw {
u32 debug_mask;
};
-#define i40e_is_vf(_hw) ((_hw)->mac.type == I40E_MAC_VF)
+static inline bool i40e_is_vf(struct i40e_hw *hw)
+{
+ return hw->mac.type == I40E_MAC_VF;
+}
struct i40e_driver_version {
u8 major_version;
--
1.9.3
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists