]> git.kernelconcepts.de Git - karo-tx-linux.git/commitdiff
i40e/i40evf: Convert macro to static inline
authorJeff Kirsher <jeffrey.t.kirsher@intel.com>
Tue, 9 Dec 2014 10:31:16 +0000 (02:31 -0800)
committerJeff Kirsher <jeffrey.t.kirsher@intel.com>
Tue, 9 Dec 2014 20:57:05 +0000 (12:57 -0800)
Inline functions are preferred over macros when they can be used
interchangeably.

CC: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com>
Reported-by: Joe Perches <joe@perches.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
drivers/net/ethernet/intel/i40e/i40e_type.h
drivers/net/ethernet/intel/i40evf/i40e_type.h

index 844421fba958e85624fd729b00b4ce3be7ee652a..c1f2eb96335771fd9eae58623bd98a90132cbe41 100644 (file)
@@ -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;
index d8175cddd683b10e75c80f60b49fe2fcb8f3b4c1..68aec11f652335c42463066677775200dbbcb333 100644 (file)
@@ -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;