linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Joe Perches <joe@perches.com>
To: Yamanappagouda Patil <goudapatilk@gmail.com>, gregkh@linuxfoundation.org
Cc: wsa@the-dreams.de, devel@driverdev.osuosl.org,
	linux-kernel@vger.kernel.org,
	driverdev-devel@linuxdriverproject.org
Subject: Re: [PATCH] staging: ks7010: fixed 'space prohibited after that *' erros.
Date: Thu, 24 Nov 2016 02:26:57 -0800	[thread overview]
Message-ID: <1479983217.19726.5.camel@perches.com> (raw)
In-Reply-To: <1479979778-9333-1-git-send-email-goudapatilk@gmail.com>

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...

  reply	other threads:[~2016-11-24 10:27 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-11-24  9:29 [PATCH] staging: ks7010: fixed 'space prohibited after that *' erros Yamanappagouda Patil
2016-11-24 10:26 ` Joe Perches [this message]
2016-12-03 12:59 Yamanappagouda Patil

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1479983217.19726.5.camel@perches.com \
    --to=joe@perches.com \
    --cc=devel@driverdev.osuosl.org \
    --cc=driverdev-devel@linuxdriverproject.org \
    --cc=goudapatilk@gmail.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=wsa@the-dreams.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).