Search Linux Wireless

Re: [PATCH 10/15] staging: ath6kl: Add configuration for excessive TX retry threshold

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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
--
To unsubscribe from this list: send the line "unsubscribe linux-wireless" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Host AP]     [ATH6KL]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [Linux Kernel]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Samba]     [Device Mapper]
  Powered by Linux