Re: [PATCH] staging: ks7010: clean up code

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

 



On Fri, 2017-03-03 at 22:58 +0200, Ernestas Kulik wrote:
> This fixes type warnings generated by sparse, replaces instances of
> ntohs() with be16_to_cpu() and removes unused fields in structs.

There's no real need to convert ntohs to be16_to_cpu

> diff --git a/drivers/staging/ks7010/ks7010_sdio.c b/drivers/staging/ks7010/ks7010_sdio.c
[]
> 
> @@ -297,7 +297,8 @@ static int write_to_device(struct ks_wlan_private *priv, unsigned char *buffer,
>  	hdr = (struct hostif_hdr *)buffer;
>  
>  	DPRINTK(4, "size=%d\n", hdr->size);
> -	if (hdr->event < HIF_DATA_REQ || HIF_REQ_MAX < hdr->event) {
> +	if (le16_to_cpu(hdr->event) < HIF_DATA_REQ ||
> +	    HIF_REQ_MAX < le16_to_cpu(hdr->event)) {
> 

This isn't mentioned and doesn't match the commit message

_______________________________________________
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