mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Dan Carpenter <error27@gmail.com>
To: "Ken O'Brien" <kernel@kenobrien.org>
Cc: gregkh@suse.de, shemminger@vyatta.com, martinez.javier@gmail.com,
	arnd@arndb.de, devel@driverdev.osuosl.org,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH 3/3] staging: bcm: Style cleanup of 1st 500 lines.
Date: Sun, 29 May 2011 23:37:06 +0300	[thread overview]
Message-ID: <20110529203706.GE3099@shale.localdomain> (raw)
In-Reply-To: <1306699685-7906-1-git-send-email-kernel@kenobrien.org>

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

           reply	other threads:[~2011-05-29 20:37 UTC|newest]

Thread overview: expand[flat|nested]  mbox.gz  Atom feed
 [parent not found: <1306699685-7906-1-git-send-email-kernel@kenobrien.org>]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20110529203706.GE3099@shale.localdomain \
    --to=error27@gmail.com \
    --cc=arnd@arndb.de \
    --cc=devel@driverdev.osuosl.org \
    --cc=gregkh@suse.de \
    --cc=kernel@kenobrien.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=martinez.javier@gmail.com \
    --cc=shemminger@vyatta.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®