All of lore.kernel.org
 help / color / mirror / Atom feed
* Re: [PATCH 3/3] staging: bcm: Style cleanup of 1st 500 lines.
       [not found] <1306699685-7906-1-git-send-email-kernel@kenobrien.org>
@ 2011-05-29 20:37 ` Dan Carpenter
  0 siblings, 0 replies; only message in thread
From: Dan Carpenter @ 2011-05-29 20:37 UTC (permalink / raw)
  To: Ken O'Brien
  Cc: gregkh, shemminger, martinez.javier, arnd, devel, linux-kernel

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

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2011-05-29 20:37 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <1306699685-7906-1-git-send-email-kernel@kenobrien.org>
2011-05-29 20:37 ` [PATCH 3/3] staging: bcm: Style cleanup of 1st 500 lines Dan Carpenter

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.