lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20170304144216.GE4386@mwanda>
Date:   Sat, 4 Mar 2017 17:42:17 +0300
From:   Dan Carpenter <dan.carpenter@...cle.com>
To:     Ernestas Kulik <ernestas.kulik@...il.com>
Cc:     gregkh@...uxfoundation.org, devel@...verdev.osuosl.org,
        linux-kernel@...r.kernel.org
Subject: Re: [PATCH v2] staging: ks7010: fix sparse warnings

On Sat, Mar 04, 2017 at 10:56:23AM +0200, Ernestas Kulik wrote:
> Currently, sparse generates many warnings for the driver. This commit
> changes the types of struct fields/function variables to match the
> endianness at their assignment.
> 
> Signed-off-by: Ernestas Kulik <ernestas.kulik@...il.com>
> ---
> Changes from v1:
> * Change the type of the variable being passed to ntohs() instead of casting it
> * Don’t remove any struct fields

[ snip ]

> diff --git a/drivers/staging/ks7010/ks7010_sdio.c b/drivers/staging/ks7010/ks7010_sdio.c
> index 6f9f746a3a61..8e644ff8eca8 100644
> --- 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)) {

Don't mix cleanups and bugfixes.  They have to be done in separate
patches.  Also this change wasn't described in the changelog like Joe
explained.

regards,
dan carpenter

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ