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]
Date:   Thu, 24 Nov 2016 02:26:57 -0800
From:   Joe Perches <joe@...ches.com>
To:     Yamanappagouda Patil <goudapatilk@...il.com>,
        gregkh@...uxfoundation.org
Cc:     wsa@...-dreams.de, devel@...verdev.osuosl.org,
        linux-kernel@...r.kernel.org,
        driverdev-devel@...uxdriverproject.org
Subject: Re: [PATCH] staging: ks7010: fixed 'space prohibited after that *'
 erros.

On Thu, 2016-11-24 at 14:59 +0530, Yamanappagouda Patil wrote:
> Fixed checkpatch.pl errors related to "space prohibited after that '*'
> or '&'" in ks_wlan_net.c file.

trivia:

> diff --git a/drivers/staging/ks7010/ks_wlan_net.c b/drivers/staging/ks7010/ks_wlan_net.c
[]
> @@ -389,7 +389,7 @@ static int ks_wlan_set_wap(struct net_device *dev, struct iw_request_info *info,
>  	/* for SLEEP MODE */
>  	if (priv->reg.operation_mode == MODE_ADHOC ||
>  	    priv->reg.operation_mode == MODE_INFRASTRUCTURE) {
> -		memcpy(priv->reg.bssid, (u8 *) & ap_addr->sa_data, ETH_ALEN);
> +		memcpy(priv->reg.bssid, (u8 *) &ap_addr->sa_data, ETH_ALEN);

You could remove the useless cast to (u8 *) too
 
>  		if (is_valid_ether_addr((u8 *) priv->reg.bssid))
>  			priv->need_commit |= SME_MODE_SET;
> @@ -2681,7 +2681,7 @@ static int ks_wlan_set_phy_information_timer(struct net_device *dev,
>  		return -EPERM;
>  	/* for SLEEP MODE */
>  	if (*uwrq >= 0 && *uwrq <= 0xFFFF)	/* 0-65535 */
> -		priv->reg.phy_info_timer = (uint16_t) * uwrq;
> +		priv->reg.phy_info_timer = (uint16_t) *uwrq;

These could be written without the space after the casts

		priv->reg.phy_info_timer = (uint16_t)*uwrq;

etc...

>  	else
>  		return -EINVAL;
> 

These tests could be reversed to reduce indentation for the
expected cases

	if (*uwrq < 0 || *uwrq > 0xffff)etc
		return -EINVAL;
	priv->reg.phy_info_timer = (uint16_t)*uwrq;

etc...

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ