mirror of
https://mirrors.bfsu.edu.cn/git/linux.git
synced 2024-11-16 16:54:20 +08:00
i40e/i40evf: Convert macro to static inline
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>
This commit is contained in:
parent
e51d9b8f32
commit
4bd145bed5
@ -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;
|
||||
|
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user