Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1031325AbbKEJ51 (ORCPT ); Thu, 5 Nov 2015 04:57:27 -0500 Received: from mail-lf0-f42.google.com ([209.85.215.42]:32904 "EHLO mail-lf0-f42.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1030377AbbKEJ5Y (ORCPT ); Thu, 5 Nov 2015 04:57:24 -0500 Date: Thu, 5 Nov 2015 16:56:38 +0700 From: Ivan Safonov To: devel@driverdev.osuosl.org Cc: Vaishali Thakkar , =?utf-8?B?QnXFo2l1?= Alexandru Octavian , Greg Kroah-Hartman , Ivan Safonov , Hari Prasath Gujulan Elango , Jakub Sitnicki , linux-kernel@vger.kernel.org Subject: [PATCH v2 1/2] staging: rtl8188eu: rarely used macros replaced by their definitions Message-ID: <20151105095638.GA26851@alpha.sfu-kras.ru> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.5.23 (2014-03-12) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 2793 Lines: 64 IS_* macros (except one) occur only once. Signed-off-by: Ivan Safonov --- Changes in v2: - All e-mail addresses of get_mainterner.pl script for this patch placed to the cc header. drivers/staging/rtl8188eu/hal/hal_com.c | 14 +++++++------- drivers/staging/rtl8188eu/hal/rtl8188e_dm.c | 2 +- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/drivers/staging/rtl8188eu/hal/hal_com.c b/drivers/staging/rtl8188eu/hal/hal_com.c index 38e9fdc..3871cda 100644 --- a/drivers/staging/rtl8188eu/hal/hal_com.c +++ b/drivers/staging/rtl8188eu/hal/hal_com.c @@ -32,19 +32,19 @@ void dump_chip_info(struct HAL_VERSION chip_vers) char buf[128]; cnt += sprintf((buf+cnt), "Chip Version Info: CHIP_8188E_"); - cnt += sprintf((buf+cnt), "%s_", IS_NORMAL_CHIP(chip_vers) ? + cnt += sprintf((buf+cnt), "%s_", chip_vers.ChipType == NORMAL_CHIP ? "Normal_Chip" : "Test_Chip"); - cnt += sprintf((buf+cnt), "%s_", IS_CHIP_VENDOR_TSMC(chip_vers) ? + cnt += sprintf((buf+cnt), "%s_", chip_vers.VendorType == CHIP_VENDOR_TSMC ? "TSMC" : "UMC"); - if (IS_A_CUT(chip_vers)) + if (chip_vers.CUTVersion == A_CUT_VERSION) cnt += sprintf((buf+cnt), "A_CUT_"); - else if (IS_B_CUT(chip_vers)) + else if (chip_vers.CUTVersion == B_CUT_VERSION) cnt += sprintf((buf+cnt), "B_CUT_"); - else if (IS_C_CUT(chip_vers)) + else if (chip_vers.CUTVersion == C_CUT_VERSION) cnt += sprintf((buf+cnt), "C_CUT_"); - else if (IS_D_CUT(chip_vers)) + else if (chip_vers.CUTVersion == D_CUT_VERSION) cnt += sprintf((buf+cnt), "D_CUT_"); - else if (IS_E_CUT(chip_vers)) + else if (chip_vers.CUTVersion == E_CUT_VERSION) cnt += sprintf((buf+cnt), "E_CUT_"); else cnt += sprintf((buf+cnt), "UNKNOWN_CUT(%d)_", diff --git a/drivers/staging/rtl8188eu/hal/rtl8188e_dm.c b/drivers/staging/rtl8188eu/hal/rtl8188e_dm.c index fca5909..199a77a 100644 --- a/drivers/staging/rtl8188eu/hal/rtl8188e_dm.c +++ b/drivers/staging/rtl8188eu/hal/rtl8188e_dm.c @@ -67,7 +67,7 @@ static void Init_ODM_ComInfo_88E(struct adapter *Adapter) ODM_CmnInfoInit(dm_odm, ODM_CMNINFO_FAB_VER, fab_ver); ODM_CmnInfoInit(dm_odm, ODM_CMNINFO_CUT_VER, cut_ver); - ODM_CmnInfoInit(dm_odm, ODM_CMNINFO_MP_TEST_CHIP, IS_NORMAL_CHIP(hal_data->VersionID)); + ODM_CmnInfoInit(dm_odm, ODM_CMNINFO_MP_TEST_CHIP, hal_data->VersionID.ChipType == NORMAL_CHIP ? true : false); ODM_CmnInfoInit(dm_odm, ODM_CMNINFO_PATCH_ID, hal_data->CustomerID); ODM_CmnInfoInit(dm_odm, ODM_CMNINFO_BWIFI_TEST, Adapter->registrypriv.wifi_spec); -- 2.4.10 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/