@@ -372,9 +372,7 @@ static int ath11k_dp_scatter_idle_link_desc_setup(struct ath11k_base *ab,
HAL_LINK_DESC_SIZE;
paddr = link_desc_banks[i].paddr;
while (n_entries) {
- ath11k_hal_set_link_desc_addr(
- (struct buffer_addr *)scatter_buf, i,
- paddr);
+ ath11k_hal_set_link_desc_addr(scatter_buf, i, paddr);
n_entries--;
paddr += HAL_LINK_DESC_SIZE;
if (rem_entries) {
@@ -391,8 +389,7 @@ static int ath11k_dp_scatter_idle_link_desc_setup(struct ath11k_base *ab,
}
ath11k_hal_setup_link_idle_list(ab, slist, num_scatter_buf,
- n_link_desc,
- (u8 *)scatter_buf -
+ n_link_desc, (u8 *)scatter_buf -
(u8 *)slist[scatter_idx].vaddr);
return 0;
@@ -576,9 +573,7 @@ int ath11k_dp_link_desc_setup(struct ath11k_base *ab,
paddr = link_desc_banks[i].paddr;
while (n_entries &&
(desc = ath11k_hal_srng_src_get_next_entry(ab, srng))) {
- ath11k_hal_set_link_desc_addr(
- (struct buffer_addr *)desc, i,
- paddr);
+ ath11k_hal_set_link_desc_addr(desc, i, paddr);
n_entries--;
paddr += HAL_LINK_DESC_SIZE;
}
@@ -689,7 +689,7 @@ u32 ath11k_hal_ce_dst_status_get_length(void *buf)
return len;
}
-void ath11k_hal_set_link_desc_addr(void *buf, u32 cookie, dma_addr_t paddr)
+void ath11k_hal_set_link_desc_addr(u32 *buf, u32 cookie, dma_addr_t paddr)
{
struct buffer_addr *desc = (struct buffer_addr *)buf;
@@ -875,7 +875,7 @@ dma_addr_t ath11k_hal_srng_get_tp_addr(struct ath11k_base *ab,
struct hal_srng *srng);
dma_addr_t ath11k_hal_srng_get_hp_addr(struct ath11k_base *ab,
struct hal_srng *srng);
-void ath11k_hal_set_link_desc_addr(void *buf, u32 cookie, dma_addr_t paddr);
+void ath11k_hal_set_link_desc_addr(u32 *buf, u32 cookie, dma_addr_t paddr);
u32 ath11k_hal_ce_get_desc_size(enum hal_ce_desc type);
void ath11k_hal_ce_src_set_desc(void *buf, dma_addr_t paddr, u32 len, u32 id,
u8 byte_swap_data);
It is not necessary to typecast scatter_buf while calling ath11k_hal_set_link_desc_addr(). Few more trivial clean ups related to scatter_buf typecast. Signed-off-by: Vasanthakumar Thiagarajan <vthiagar@codeaurora.org> --- drivers/net/wireless/ath/ath11k/dp.c | 11 +++-------- drivers/net/wireless/ath/ath11k/hal.c | 2 +- drivers/net/wireless/ath/ath11k/hal.h | 2 +- 3 files changed, 5 insertions(+), 10 deletions(-)