[RFC 3/3] ath10k: make target endianess more explicit

Kalle Valo kvalo at qca.qualcomm.com
Fri Aug 8 02:45:12 PDT 2014


Michal Kazior <michal.kazior at tieto.com> writes:

> Some copy engine structures are target specific
> and are uploaded to the device during
> init/configuration.
>
> This also cleans up a bit diag_mem_read/write
> implicit byteswap mess leaving only
> diag_access_read/write with an implicit endianess
> byteswap.
>
> Signed-off-by: Michal Kazior <michal.kazior at tieto.com>

[...]

> @@ -567,8 +562,17 @@ static int ath10k_pci_diag_read_access(struct ath10k *ar, u32 address,
>  				       u32 *data)
>  {
>  	/* Assume range doesn't cross this boundary */
> -	if (address >= DRAM_BASE_ADDRESS)
> -		return ath10k_pci_diag_read_mem(ar, address, data, sizeof(u32));
> +	if (address >= DRAM_BASE_ADDRESS) {
> +		__le32 val;
> +		int ret;

For simplicity I would prefer to have variable declaration in the
beginning of the function.

-- 
Kalle Valo



More information about the ath10k mailing list