mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Colin Vidal <colin@cvidal.org>
To: Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	Colin Vidal <colin@cvidal.org>,
	devel@driverdev.osuosl.org (open list:STAGING SUBSYSTEM),
	linux-kernel@vger.kernel.org (open list)
Subject: [PATCH] Staging: fix coding style in rtl8188eu/core
Date: Tue,  2 Feb 2016 23:54:54 +0100	[thread overview]
Message-ID: <1454453696-10535-1-git-send-email-colin@cvidal.org> (raw)

Set constant operand on right of test, and refactor the code in a more
compact and readable way.

Signed-off-by: Colin Vidal <colin@cvidal.org>
---
 drivers/staging/rtl8188eu/core/rtw_iol.c | 13 +++++--------
 1 file changed, 5 insertions(+), 8 deletions(-)

diff --git a/drivers/staging/rtl8188eu/core/rtw_iol.c b/drivers/staging/rtl8188eu/core/rtw_iol.c
index cdcf0ea..00e1136 100644
--- a/drivers/staging/rtl8188eu/core/rtw_iol.c
+++ b/drivers/staging/rtl8188eu/core/rtw_iol.c
@@ -18,14 +18,11 @@
  *
  ******************************************************************************/
 
-#include<rtw_iol.h>
+#include <rtw_iol.h>
 
-bool rtw_IOL_applied(struct adapter  *adapter)
+bool rtw_IOL_applied(struct adapter *adapter)
 {
-	if (1 == adapter->registrypriv.fw_iol)
-		return true;
-
-	if ((2 == adapter->registrypriv.fw_iol) && (!adapter_to_dvobj(adapter)->ishighspeed))
-		return true;
-	return false;
+	return adapter->registrypriv.fw_iol == 1 ||
+		(adapter->registrypriv.fw_iol == 2 &&
+		 !adapter_to_dvobj(adapter)->ishighspeed);
 }
-- 
2.5.0

             reply	other threads:[~2016-02-02 22:55 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-02-02 22:54 Colin Vidal [this message]
2016-02-02 23:04 ` Colin Vidal
  -- strict thread matches above, loose matches on Subject: below --
2016-02-02 20:57 Colin Vidal
2016-02-02 21:14 ` Joe Perches
2016-02-02 21:28   ` Colin Vidal
2016-02-02 22:51     ` Joe Perches

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=1454453696-10535-1-git-send-email-colin@cvidal.org \
    --to=colin@cvidal.org \
    --cc=devel@driverdev.osuosl.org \
    --cc=gregkh@linuxfoundation.org \
    --cc=linux-kernel@vger.kernel.org \
    /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®