[PATCH 10/15] staging: ath6kl: Add configuration for excessive TX retry threshold
Dan Carpenter
error27 at gmail.com
Sat Feb 19 10:00:27 UTC 2011
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
More information about the devel
mailing list