[PATCH 1/1] staging: cleanup: Fix incompatible type comparison in wilc1000/host_interface.c

Dan Carpenter dan.carpenter at oracle.com
Wed Dec 2 13:29:23 UTC 2015


Put v2 in the subject.  Also the subsystem prefix is:

[PATCH v3] staging: wilc1000: ...

On Mon, Nov 30, 2015 at 09:09:04PM -0300, Mario J. Rugiero wrote:
> This patch replaces an "if (ptr > 0)" comparison that seems to be a
> confusing way to check for null by a simpler "if (ptr)" check.
> 
> Signed-off-by: Mario J. Rugiero <mrugiero at gmail.com>
> ---
v2: Remove the != NULL because checkpatch complains.

>  drivers/staging/wilc1000/host_interface.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/staging/wilc1000/host_interface.c b/drivers/staging/wilc1000/host_interface.c
> index d5b7725..0c87f6c 100644
> --- a/drivers/staging/wilc1000/host_interface.c
> +++ b/drivers/staging/wilc1000/host_interface.c
> @@ -2270,7 +2270,7 @@ static void Handle_AddBeacon(struct host_if_drv *hif_drv,
>  	*pu8CurrByte++ = ((pstrSetBeaconParam->tail_len >> 16) & 0xFF);
>  	*pu8CurrByte++ = ((pstrSetBeaconParam->tail_len >> 24) & 0xFF);
>  
> -	if (pstrSetBeaconParam->tail > 0)
> +	if (pstrSetBeaconParam->tail)

Probably the intention was to check if "pstrSetBeaconParam->tail_len > 0"
but I'm not sure.  The wilc1000 maintainers are very responsive though
so maybe they will know for sure.

regards,
dan carpenter




More information about the devel mailing list