From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751209AbcBJVJy (ORCPT ); Wed, 10 Feb 2016 16:09:54 -0500 Received: from out4-smtp.messagingengine.com ([66.111.4.28]:33487 "EHLO out4-smtp.messagingengine.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751014AbcBJVJv (ORCPT ); Wed, 10 Feb 2016 16:09:51 -0500 X-Sasl-enc: E8vxTeUmkM1FJFMEGMwcB4x5R/tomGf2YZ3Ya8H5+7Vu 1455138590 From: Colin Vidal To: Greg Kroah-Hartman , devel@driverdev.osuosl.org (open list:STAGING SUBSYSTEM), linux-kernel@vger.kernel.org (open list) Cc: Colin Vidal Subject: [PATCH v2] Staging: fix coding style in rtl8188eu/core Date: Wed, 10 Feb 2016 22:09:28 +0100 Message-Id: <1455138571-12956-1-git-send-email-colin@cvidal.org> X-Mailer: git-send-email 2.5.0 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Set constant operand on right of test, and refactor the code in a more compact and readable way. Signed-off-by: Colin Vidal --- 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 +#include -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