From: Jeff Kirsher Date: Tue, 9 Dec 2014 10:31:16 +0000 (-0800) Subject: i40e/i40evf: Convert macro to static inline X-Git-Tag: v3.19-rc1~118^2~32^2 X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=4bd145bed5b74b934d4e426c6e8c426a95e37ca9;p=karo-tx-linux.git i40e/i40evf: Convert macro to static inline Inline functions are preferred over macros when they can be used interchangeably. CC: Sergei Shtylyov Reported-by: Joe Perches Signed-off-by: Jeff Kirsher --- diff --git a/drivers/net/ethernet/intel/i40e/i40e_type.h b/drivers/net/ethernet/intel/i40e/i40e_type.h index 844421fba958..c1f2eb963357 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 d8175cddd683..68aec11f6523 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;