Re: [PATCH] Staging: wlan-ng: fix a wrong type of a assignment

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, Sep 16, 2015 at 09:06:13PM +0800, Navy Cheng wrote:
> The type of value is u16 however the return type of cpu_to_le16() is
> __le16. The incorrect type of assignment is complained by sparse.
> 
> Signed-off-by: Navy Cheng <navych@xxxxxxx>
> ---
>  drivers/staging/wlan-ng/hfa384x.h | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/staging/wlan-ng/hfa384x.h b/drivers/staging/wlan-ng/hfa384x.h
> index 8dfe438..fe7df37 100644
> --- a/drivers/staging/wlan-ng/hfa384x.h
> +++ b/drivers/staging/wlan-ng/hfa384x.h
> @@ -1385,7 +1385,7 @@ static inline int hfa384x_drvr_getconfig16(hfa384x_t *hw, u16 rid, void *val)
>  
>  static inline int hfa384x_drvr_setconfig16(hfa384x_t *hw, u16 rid, u16 val)
>  {
> -	u16 value = cpu_to_le16(val);
> +	__le16 value = cpu_to_le16(val);
>  
>  	return hfa384x_drvr_setconfig(hw, rid, &value, sizeof(value));

but value is a pointer to a u16, doesn't this change now cause another
sparse warning?
_______________________________________________
devel mailing list
devel@xxxxxxxxxxxxxxxxxxxxxx
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel



[Index of Archives]     [Linux Driver Backports]     [DMA Engine]     [Linux GPIO]     [Linux SPI]     [Video for Linux]     [Linux USB Devel]     [Linux Coverity]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]
  Powered by Linux