Hi Carl,

On Wed, Oct 10, 2018 at 07:34:29PM +0800, Carl Huang wrote:
> --- a/drivers/net/wireless/ath/ath10k/pci.c
> +++ b/drivers/net/wireless/ath/ath10k/pci.c
> @@ -1071,10 +1071,9 @@ int ath10k_pci_diag_write_mem(struct ath10k *ar, u32 
> address,
>       struct ath10k_ce *ce = ath10k_ce_priv(ar);
>       int ret = 0;
>       u32 *buf;
> -     unsigned int completed_nbytes, orig_nbytes, remaining_bytes;
> +     unsigned int completed_nbytes, alloc_nbytes, remaining_bytes;
>       struct ath10k_ce_pipe *ce_diag;
>       void *data_buf = NULL;
> -     u32 ce_data;    /* Host buffer address in CE space */
>       dma_addr_t ce_data_base = 0;
>       int i;
>  

...

> @@ -1128,7 +1127,7 @@ int ath10k_pci_diag_write_mem(struct ath10k *ar, u32 
> address,
>                * Request CE to send caller-supplied data that
>                * was copied to bounce buffer to Target(!) address.
>                */
> -             ret = ath10k_ce_send_nolock(ce_diag, NULL, (u32)ce_data,
> +             ret = ath10k_ce_send_nolock(ce_diag, NULL, (u32)ce_data_base,

The (u32) cast isn't necessary, is it? ath10k_ce_send_nolock() takes a
dma_addr_t for the 3rd argument.

Incidentally, that'd probably help if you start supporting PCI devices
with >32-bit addressing.

Brian

>                                           nbytes, 0, 0);
>               if (ret != 0)
>                       goto done;
...

Reply via email to