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
_______________________________________________
devel mailing list
devel@xxxxxxxxxxxxxxxxxxxxxx
http://driverdev.linuxdriverproject.org/mailman/listinfo/devel


[Index of Archives]     [Linux Driver Backports]     [DMA Engine]     [Linux GPIO]     [Linux SPI]     [Video for Linux]     [Linux USB Devel]     [Linux Coverity]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]
  Powered by Linux