Commit 85e5a387 authored by Johannes Berg's avatar Johannes Berg Committed by Emmanuel Grumbach

iwlwifi: trans: make various conversion macros inlines

Make the various conversion functions typesafe, so we don't
accidentally try to call them with the wrong pointers and
cast them to something that will crash.
Signed-off-by: default avatarJohannes Berg <johannes.berg@intel.com>
Signed-off-by: default avatarEmmanuel Grumbach <emmanuel.grumbach@intel.com>
parent d29cb664
...@@ -378,8 +378,11 @@ struct iwl_trans_pcie { ...@@ -378,8 +378,11 @@ struct iwl_trans_pcie {
u32 fw_mon_size; u32 fw_mon_size;
}; };
#define IWL_TRANS_GET_PCIE_TRANS(_iwl_trans) \ static inline struct iwl_trans_pcie *
((struct iwl_trans_pcie *) ((_iwl_trans)->trans_specific)) IWL_TRANS_GET_PCIE_TRANS(struct iwl_trans *trans)
{
return (void *)trans->trans_specific;
}
static inline struct iwl_trans * static inline struct iwl_trans *
iwl_trans_pcie_get_trans(struct iwl_trans_pcie *trans_pcie) iwl_trans_pcie_get_trans(struct iwl_trans_pcie *trans_pcie)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment