From: "Mutharaju, Prasanna (P.)" <mkarthi3@visteon.com>
To: Johnny Kim <johnny.kim@atmel.com>,
Rachel Kim <rachel.kim@atmel.com>, Dean Lee <dean.lee@atmel.com>,
Chris Park <chris.park@atmel.com>,
Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: "linux-wireless@vger.kernel.org" <linux-wireless@vger.kernel.org>
Subject: [PATCH] staging:wilc1000: code cleanup Fix reported by coccinelle
Date: Mon, 29 Jun 2015 12:43:32 +0000 [thread overview]
Message-ID: <20150629124227.GA16645@ubuntu> (raw)
From: Prasanna Karthik <mkarthi3@visteon.com>
Removed {} for single statement if block
Signed-off-by: Prasanna Karthik <mkarthi3@visteon.com>
---
drivers/staging/wilc1000/fifo_buffer.c | 11 +++++------
1 files changed, 5 insertions(+), 6 deletions(-)
diff --git a/drivers/staging/wilc1000/fifo_buffer.c b/drivers/staging/wilc1000/fifo_buffer.c
index b6c07cf..be38493 100644
--- a/drivers/staging/wilc1000/fifo_buffer.c
+++ b/drivers/staging/wilc1000/fifo_buffer.c
@@ -31,11 +31,10 @@ u32 FIFO_DeInit(tHANDLE hFifo)
u32 u32Error = 0;
tstrFifoHandler *pstrFifoHandler = (tstrFifoHandler *) hFifo;
if (pstrFifoHandler) {
- if (pstrFifoHandler->pu8Buffer) {
+ if (pstrFifoHandler->pu8Buffer)
WILC_FREE (pstrFifoHandler->pu8Buffer);
- } else {
+ else
u32Error = 1;
- }
WILC_FREE (pstrFifoHandler);
} else {
@@ -52,11 +51,11 @@ u32 FIFO_ReadBytes(tHANDLE hFifo, u8 *pu8Buffer, u32 u32BytesToRead, u32 *pu32By
if (pstrFifoHandler->u32TotalBytes) {
down(&pstrFifoHandler->SemBuffer);
- if (u32BytesToRead > pstrFifoHandler->u32TotalBytes) {
+ if (u32BytesToRead > pstrFifoHandler->u32TotalBytes)
*pu32BytesRead = pstrFifoHandler->u32TotalBytes;
- } else {
+ else
*pu32BytesRead = u32BytesToRead;
- }
+
if ((pstrFifoHandler->u32ReadOffset + u32BytesToRead) <= pstrFifoHandler->u32BufferLength) {
WILC_memcpy(pu8Buffer, pstrFifoHandler->pu8Buffer + pstrFifoHandler->u32ReadOffset,
*pu32BytesRead);
--
1.7.0.4
reply other threads:[~2015-06-29 13:16 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=20150629124227.GA16645@ubuntu \
--to=mkarthi3@visteon.com \
--cc=chris.park@atmel.com \
--cc=dean.lee@atmel.com \
--cc=gregkh@linuxfoundation.org \
--cc=johnny.kim@atmel.com \
--cc=linux-wireless@vger.kernel.org \
--cc=rachel.kim@atmel.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;
as well as URLs for NNTP newsgroup(s).