提交 bd31dd9d 编写于 作者: J Johannes Berg 提交者: Luca Coelho

iwlwifi: use upper_32_bits/lower_32_bits where appropriate

That's a bit nicer than open-coding it.
Signed-off-by: NJohannes Berg <johannes.berg@intel.com>
Signed-off-by: NLuca Coelho <luciano.coelho@intel.com>
上级 1c17627b
...@@ -647,7 +647,7 @@ struct iwl_rb_status { ...@@ -647,7 +647,7 @@ struct iwl_rb_status {
static inline u8 iwl_get_dma_hi_addr(dma_addr_t addr) static inline u8 iwl_get_dma_hi_addr(dma_addr_t addr)
{ {
return (sizeof(addr) > sizeof(u32) ? (addr >> 16) >> 16 : 0) & 0xF; return (sizeof(addr) > sizeof(u32) ? upper_32_bits(addr) : 0) & 0xF;
} }
/** /**
* struct iwl_tfd_tb transmit buffer descriptor within transmit frame descriptor * struct iwl_tfd_tb transmit buffer descriptor within transmit frame descriptor
......
...@@ -54,8 +54,8 @@ IWL_EXPORT_SYMBOL(iwl_write32); ...@@ -54,8 +54,8 @@ IWL_EXPORT_SYMBOL(iwl_write32);
void iwl_write64(struct iwl_trans *trans, u64 ofs, u64 val) void iwl_write64(struct iwl_trans *trans, u64 ofs, u64 val)
{ {
trace_iwlwifi_dev_iowrite64(trans->dev, ofs, val); trace_iwlwifi_dev_iowrite64(trans->dev, ofs, val);
iwl_trans_write32(trans, ofs, val & 0xffffffff); iwl_trans_write32(trans, ofs, lower_32_bits(val));
iwl_trans_write32(trans, ofs + 4, val >> 32); iwl_trans_write32(trans, ofs + 4, upper_32_bits(val));
} }
IWL_EXPORT_SYMBOL(iwl_write64); IWL_EXPORT_SYMBOL(iwl_write64);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册