From: Joe Perches <joe@perches.com>
To: Murilo Opsfelder Araujo <mopsfelder@gmail.com>
Cc: devel@driverdev.osuosl.org, linux-kernel@vger.kernel.org,
gregkh@linuxfoundation.org, klmckinney1@gmail.com,
mail@beyermatthias.de
Subject: Re: [PATCH] Staging: bcm: Bcmchar.c: remove else statement after return
Date: Mon, 28 Jul 2014 18:59:19 -0700 [thread overview]
Message-ID: <1406599159.5285.12.camel@joe-AO725> (raw)
In-Reply-To: <1406592554-9519-1-git-send-email-mopsfelder@gmail.com>
On Mon, 2014-07-28 at 21:09 -0300, Murilo Opsfelder Araujo wrote:
> This patch makes checkpatch.pl script happier by fixing all warnings
> related to else statement after break or return.
[]
> diff --git a/drivers/staging/bcm/Bcmchar.c b/drivers/staging/bcm/Bcmchar.c
[]
> @@ -561,10 +561,10 @@ static int bcm_char_ioctl_gpio_set_request(void __user *argp,
> BCM_DEBUG_PRINT(Adapter, DBG_TYPE_OTHERS, OSAL_DBG, DBG_LVL_ALL,
> "GPIO_MODE_REGISTER read failed");
> return Status;
> - } else {
> - Status = STATUS_SUCCESS;
> }
>
> + Status = STATUS_SUCCESS;
This set of Status is unnecessary
> /* Set the gpio mode register to output */
> *(UINT *)ucResetValue |= (1<<uiBit);
> Status = wrmaltWithLock(Adapter, GPIO_MODE_REGISTER,
as it's immediately overwritten.
> @@ -669,10 +669,10 @@ static int bcm_char_ioctl_gpio_status_request(void __user *argp,
> Status = bytes;
> BCM_DEBUG_PRINT(Adapter, DBG_TYPE_PRINTK, 0, 0,
> "RDM Failed\n");
> - return Status;
> } else {
> Status = STATUS_SUCCESS;
> }
> +
> return Status;
return STATUS_SUCCESS;
prev parent reply other threads:[~2014-07-29 1:59 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-07-29 0:09 Murilo Opsfelder Araujo
2014-07-29 1:59 ` Joe Perches [this message]
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=1406599159.5285.12.camel@joe-AO725 \
--to=joe@perches.com \
--cc=devel@driverdev.osuosl.org \
--cc=gregkh@linuxfoundation.org \
--cc=klmckinney1@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mail@beyermatthias.de \
--cc=mopsfelder@gmail.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®