From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754154AbcBBWzU (ORCPT ); Tue, 2 Feb 2016 17:55:20 -0500 Received: from out1-smtp.messagingengine.com ([66.111.4.25]:60183 "EHLO out1-smtp.messagingengine.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751158AbcBBWzS (ORCPT ); Tue, 2 Feb 2016 17:55:18 -0500 X-Sasl-enc: +nIjVAdLuhpyhp14i51PzIkRH5qCBLz5cDd56qrGqE2i 1454453717 From: Colin Vidal To: Greg Kroah-Hartman , Colin Vidal , 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 Message-Id: <1454453696-10535-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