Re: [PATCH 04/23] staging: ks7010: change cast from uint16_t to u16

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

 



On Sun, May 13, 2018 at 08:35:39PM +0200, Sergio Paracuellos wrote:
> Header size and event fields of header are declared
> as __le16 and being casted using uint16_t in cpu_to_le16.
> Change cast to use preferred u16.
> 
> Signed-off-by: Sergio Paracuellos <sergio.paracuellos@xxxxxxxxx>
> ---
>  drivers/staging/ks7010/ks7010_sdio.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/staging/ks7010/ks7010_sdio.c b/drivers/staging/ks7010/ks7010_sdio.c
> index f56db07..a51b5e8 100644
> --- a/drivers/staging/ks7010/ks7010_sdio.c
> +++ b/drivers/staging/ks7010/ks7010_sdio.c
> @@ -1061,8 +1061,8 @@ static int send_stop_request(struct sdio_func *func)
>  		return -ENOMEM;
>  
>  	size = sizeof(*pp) - sizeof(pp->header.size);
> -	pp->header.size = cpu_to_le16((uint16_t)size);
> -	pp->header.event = cpu_to_le16((uint16_t)HIF_STOP_REQ);
> +	pp->header.size = cpu_to_le16((u16)size);
> +	pp->header.event = cpu_to_le16((u16)HIF_STOP_REQ);

This is already applied, but actually it's better to just remove the
casts entirely.

regards,
dan carpenter

_______________________________________________
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