All of lore.kernel.org
 help / color / mirror / Atom feed
From: Dan Carpenter <error27@gmail.com>
To: Vipin Mehta <vmehta@atheros.com>
Cc: greg@kroah.com, devel@driverdev.osuosl.org,
	linux-wireless@vger.kernel.org
Subject: Re: [PATCH 10/15] staging: ath6kl: Add configuration for excessive TX retry threshold
Date: Sat, 19 Feb 2011 13:00:27 +0300	[thread overview]
Message-ID: <20110219100027.GD4384@bicker> (raw)
In-Reply-To: <1298063596-2096-10-git-send-email-vmehta@atheros.com>

There are style issues with almost all the patches in this series.
Please read Documentation/CodingStyle and run checkpatch.pl on 
your patches before sending.

On Fri, Feb 18, 2011 at 01:13:11PM -0800, Vipin Mehta wrote:
> +static int
> +ar6000_xioctl_set_excess_tx_retry_thres_cmd(struct net_device * dev, char * userdata)
> +{
> +    AR_SOFTC_T     *ar     = (AR_SOFTC_T *)ar6k_priv(dev);
                  ^^^^
White space not needed here.
Better to declare this as:
	struct ar6_softc *ar = (struct ar6_softc *)ar6k_priv(dev);

> +    WMI_SET_EXCESS_TX_RETRY_THRES_CMD cmd;
> +    int ret = 0;
> +
> +    if (ar->arWmiReady == false) {
> +        return -EIO;
> +    }

No curly braces needed.

> +
> +    if (copy_from_user(&cmd, userdata, sizeof(cmd))) {
> +        return -EFAULT;
> +    }

No curly braces needed.

> +
> +    if (wmi_set_excess_tx_retry_thres_cmd(ar->arWmi, &cmd) != 0)
                                                             ^^^^^
Not needed.

> +    {

Curly braces on the wrong line.
Curly braces were not needed.

> +        ret = -EINVAL;

Just return -EINVAL directly.

> +    }
> +    return(ret);
             ^   ^

Parentheses not needed.
Just return 0 directly.

> +}

Please you tabs to indent on new functions.  If the code is inside an
existing function then be consistent, but if it's a new function then
use tabs.

regards,
dan carpenter

  reply	other threads:[~2011-02-19 10:00 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-02-18 21:13 [PATCH 01/15] staging: ath6kl: Fixing a NULL pointer exception Vipin Mehta
2011-02-18 21:13 ` [PATCH 02/15] staging: ath6kl: Fixing key settings for WPA/WPA2 Vipin Mehta
2011-02-18 21:13 ` [PATCH 03/15] staging: ath6kl: Return correct scan complete status Vipin Mehta
2011-02-18 21:13 ` [PATCH 05/15] staging: ath6kl: Fixing driver initialization for manufacturing mode Vipin Mehta
2011-02-18 21:13 ` [PATCH 07/15] staging: ath6kl: Adding support for txop bursting enable/disable Vipin Mehta
2011-02-18 21:13 ` [PATCH 08/15] staging: ath6kl: Fixing a memory leak Vipin Mehta
2011-02-18 21:13 ` [PATCH 10/15] staging: ath6kl: Add configuration for excessive TX retry threshold Vipin Mehta
2011-02-19 10:00   ` Dan Carpenter [this message]
2011-02-18 21:13 ` [PATCH 12/15] staging: ath6kl: Fixing the cached copy of the BSS filter set by user Vipin Mehta
2011-02-18 21:13 ` [PATCH 13/15] staging: ath6kl: Adding state in driver to track the sme state Vipin Mehta
2011-02-18 21:13 ` [PATCH 15/15] staging: ath6kl: Fixing disappearing of scan list due to jiffies wrap over Vipin Mehta
2011-02-18 21:29 ` [PATCH 01/15] staging: ath6kl: Fixing a NULL pointer exception Greg KH
2011-02-18 21:56   ` Joe Perches
2011-02-18 22:40     ` Vipin Mehta

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=20110219100027.GD4384@bicker \
    --to=error27@gmail.com \
    --cc=devel@driverdev.osuosl.org \
    --cc=greg@kroah.com \
    --cc=linux-wireless@vger.kernel.org \
    --cc=vmehta@atheros.com \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.