Re: [PATCH 3/3] staging: bcm: Style cleanup of 1st 500 lines.

From: Dan Carpenter
Date: Sun May 29 2011 - 16:37:34 EST


On Sun, May 29, 2011 at 09:08:05PM +0100, Ken O'Brien wrote:
> Applied coding convention rules to 1st 500 lines. These lines no longer throw errors or warnings.
> Subsequent patches will fix the remaining lines.

> - else if (_IOC_DIR(cmd) & _IOC_WRITE)
> - Status = !access_ok(VERIFY_READ, argp, _IOC_SIZE(cmd));
> - else if (_IOC_NONE == (_IOC_DIR(cmd) & _IOC_NONE))
> - Status = STATUS_SUCCESS;
> + else
> + if (_IOC_DIR(cmd) & _IOC_WRITE)
> + Status = !access_ok(VERIFY_READ, argp, _IOC_SIZE(cmd));
> + else
> + if (_IOC_NONE == (_IOC_DIR(cmd) & _IOC_NONE))
> + Status = STATUS_SUCCESS;

The original code was correct, "else if" goes on one line.

> + if (IsReqGpioIsLedInNVM(Adapter, value) == FALSE) {
> + BCM_DEBUG_PRINT(Adapter, DBG_TYPE_OTHERS, OSAL_DBG,
> + DBG_LVL_ALL,
> + "Sorry, Requested GPIO<0x%X> is not correspond to LED !!!",
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
This should be indented to there. I know it makes the line too long
but it's better to ignore checkpatch on this. Even computer
programs like checkpatch can ignored from time to time. There were
several other debug messages like this so it's probably worth
redoing the patch once any other review comments are in.

> + value);
> + Status = -EINVAL;

regards,
dan carpenter
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/