Received: by 2002:a05:6a10:9848:0:0:0:0 with SMTP id x8csp1845600pxf; Sat, 3 Apr 2021 02:15:35 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxdzOoCxqywZ35tFeFZMRdJ43hJeJn4uoDYiBdOUrtj1By5hNSp+ULxejamVQWfvxChZ3zK X-Received: by 2002:a05:6402:520b:: with SMTP id s11mr20428950edd.212.1617441335094; Sat, 03 Apr 2021 02:15:35 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1617441335; cv=none; d=google.com; s=arc-20160816; b=k14oQ0jq1IZYjOXaUYFGrl4hD7kHZ11PICtaoSq61r8AuKjQ8OLznRQlQVGfZhOv/i VLq7oo/Vg1UxTEjm9O7+JJ7HYuz4U/9zaJawr0iPnbklWPJGu0kVSUkIN56+qU99bswy FysNs14TIb6YVO1Oghp07WaT89zXvLFg3XcPG3FnPKy/aCifmnN5Wi/wAeP8XL2l/HJP G7KfSHhf6zOW4CQD2ZtajazhU8nHRTrxeuPtYms3AB+khrOL4Ca68xOXvfUuvs71fb3F 2ZluA1nyASuQ0Un+fSeCdjnXeDsGmCmb0vuBZ87y/tTRyoEazYlSwFzPH8AylM4vMguQ 3BUg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=fmNzf36fyYg+0AMkEesws+QYsMSDK6OKbz+EDQka0qY=; b=vltfQFV7PsEA7AXcmmc/RwZetsIG1/gk4gH8JNUc6wYO46h/2IBS1IVV3tpFUj5Qsu /BYShOJS2MKshLb3wED0dEq7vd/bm9PwF8W4xEAyJxiGsb08DUmmjv8+zf7x40J/319/ csaBSaibui1cGOZ979oVN537rEuhHKUJIQHnA64HJ+yQxkgZlXK+7OY+yW0q40T8DKv2 My5+oEfCZ4XcLfWJru78E3O200iaEkO33M6BHqV4mHw/gJgHbsNZSg5zz6MLSPopa9Ha qQ5dau7TSNO/Pi4TajnSaGQw+ZP9HR2zNM+hk2hmlPXS8acRMkRvDMBT4G96SY8noT11 EqTQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=OF3MaYVe; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id a3si8752023ejj.228.2021.04.03.02.15.12; Sat, 03 Apr 2021 02:15:35 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=OF3MaYVe; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S236594AbhDCJOh (ORCPT + 99 others); Sat, 3 Apr 2021 05:14:37 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33582 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236133AbhDCJO1 (ORCPT ); Sat, 3 Apr 2021 05:14:27 -0400 Received: from mail-wm1-x332.google.com (mail-wm1-x332.google.com [IPv6:2a00:1450:4864:20::332]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D2BABC0613E6 for ; Sat, 3 Apr 2021 02:14:24 -0700 (PDT) Received: by mail-wm1-x332.google.com with SMTP id o20-20020a05600c4fd4b0290114265518afso512853wmq.4 for ; Sat, 03 Apr 2021 02:14:24 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=fmNzf36fyYg+0AMkEesws+QYsMSDK6OKbz+EDQka0qY=; b=OF3MaYVen20ahO2lYKyHhBOyDK0TPCvTet7QBkA5HphhSnP/tXF9+nPIQOEtw72GQt OXJkphOGzMpn4hWniKfVAwbbKRML6Ig+B++9xurHoVof7a712Im+8HYXOK3qdhqUAayV +NQGXzv4fqsBWStcntMrNYuGZXkJv6Znz+jxDF1/LdDuo2MD+Gpg+W2vyZU0gPhKJ8tV kbr8KLroZSRGP0ZXRN2k1uv3XMDTFa0/RPNUkBd1qJmLdq6OyIBCrezveWNx9UtCRA8e WKYZb3bP9M6fpwycjnhjKPuSSeEbT96gRDOBt1auc4XegF55eeLAfPip2DfjzGIybmw6 AVSQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=fmNzf36fyYg+0AMkEesws+QYsMSDK6OKbz+EDQka0qY=; b=ZMIx6GF5z6O+uaapv6N+sIREceXN2nWyIZgcgUZ32vRpcVv/iuUwmi36eRLpx2bmnh 0w8oIB1jnBpvYJcuU7q9TS4SldERJBDykk7Qc6d1IBaWREofIZtDt2k9RR3HL1SmqBI4 zQGKpWzCfm/DHBQjjs2FGPXCM8VKgDf5o//FnbNpziyhwJcmsf9Gdklki0pKHyrAieUA nZgd6mf8L1mhdm5mPRO/hfaKib+PqpH4HUBO03OvLi+bRiI9VJtDDNiiH826xAdQ8qyZ +acu+69SZfIVo7+3szuLXNT9kbFk28aRrkc27s7E/5kDlxKShC8IwEjvPG5K7Ycrbhxu zlqw== X-Gm-Message-State: AOAM533nqxFy2HJSWVfC1MgjKikZx9QOFAmliNaKDdc2rARu4yZYY5hs ts4hglo9UaLcu7489FfsteU= X-Received: by 2002:a7b:c312:: with SMTP id k18mr2239986wmj.89.1617441263672; Sat, 03 Apr 2021 02:14:23 -0700 (PDT) Received: from agape ([5.171.72.64]) by smtp.gmail.com with ESMTPSA id f2sm18414208wrq.34.2021.04.03.02.14.23 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 03 Apr 2021 02:14:23 -0700 (PDT) From: Fabio Aiuto To: gregkh@linuxfoundation.org Cc: dan.carpenter@oracle.com, joe@perches.com, linux-staging@lists.linux.dev, linux-kernel@vger.kernel.org, Fabio Aiuto Subject: [PATCH v3 06/30] staging: rtl8723bs: remove all RT_TRACE logs in core/rtw_eeprom.c Date: Sat, 3 Apr 2021 11:13:28 +0200 Message-Id: X-Mailer: git-send-email 2.20.1 In-Reply-To: References: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Remove all of the RT_TRACE logs in the core/rtw_eeprom.c file as they currently do nothing as they require the code to be modified by hand in order to be turned on. This obviously has not happened since the code was merged. Moreover it relies on an unneeded private log level tracing which overrides the in-kernel public one, so just remove them as they are unused. Signed-off-by: Fabio Aiuto --- drivers/staging/rtl8723bs/core/rtw_eeprom.c | 56 ++++++++------------- 1 file changed, 22 insertions(+), 34 deletions(-) diff --git a/drivers/staging/rtl8723bs/core/rtw_eeprom.c b/drivers/staging/rtl8723bs/core/rtw_eeprom.c index 3cbd65dee741..32d5e5b23337 100644 --- a/drivers/staging/rtl8723bs/core/rtw_eeprom.c +++ b/drivers/staging/rtl8723bs/core/rtw_eeprom.c @@ -35,10 +35,9 @@ void shift_out_bits(_adapter *padapter, u16 data, u16 count) u16 x, mask; _func_enter_; - if (padapter->bSurpriseRemoved == true) { - RT_TRACE(_module_rtl871x_eeprom_c_, _drv_err_, ("padapter->bSurpriseRemoved==true")); + if (padapter->bSurpriseRemoved == true) goto out; - } + mask = 0x01 << (count - 1); x = rtw_read8(padapter, EE_9346CR); @@ -48,20 +47,18 @@ _func_enter_; x &= ~_EEDI; if (data & mask) x |= _EEDI; - if (padapter->bSurpriseRemoved == true) { - RT_TRACE(_module_rtl871x_eeprom_c_, _drv_err_, ("padapter->bSurpriseRemoved==true")); - goto out; - } + if (padapter->bSurpriseRemoved == true) + goto out; + rtw_write8(padapter, EE_9346CR, (u8)x); udelay(CLOCK_RATE); up_clk(padapter, &x); down_clk(padapter, &x); mask = mask >> 1; } while (mask); - if (padapter->bSurpriseRemoved == true) { - RT_TRACE(_module_rtl871x_eeprom_c_, _drv_err_, ("padapter->bSurpriseRemoved==true")); + if (padapter->bSurpriseRemoved == true) goto out; - } + x &= ~_EEDI; rtw_write8(padapter, EE_9346CR, (u8)x); out: @@ -72,10 +69,9 @@ u16 shift_in_bits(_adapter *padapter) { u16 x, d = 0, i; _func_enter_; - if (padapter->bSurpriseRemoved == true) { - RT_TRACE(_module_rtl871x_eeprom_c_, _drv_err_, ("padapter->bSurpriseRemoved==true")); + if (padapter->bSurpriseRemoved == true) goto out; - } + x = rtw_read8(padapter, EE_9346CR); x &= ~(_EEDO | _EEDI); @@ -84,10 +80,9 @@ _func_enter_; for (i = 0; i < 16; i++) { d = d << 1; up_clk(padapter, &x); - if (padapter->bSurpriseRemoved == true) { - RT_TRACE(_module_rtl871x_eeprom_c_, _drv_err_, ("padapter->bSurpriseRemoved==true")); + if (padapter->bSurpriseRemoved == true) goto out; - } + x = rtw_read8(padapter, EE_9346CR); x &= ~(_EEDI); @@ -122,26 +117,22 @@ void eeprom_clean(_adapter *padapter) { u16 x; _func_enter_; - if (padapter->bSurpriseRemoved == true) { - RT_TRACE(_module_rtl871x_eeprom_c_, _drv_err_, ("padapter->bSurpriseRemoved==true")); + if (padapter->bSurpriseRemoved == true) goto out; - } + x = rtw_read8(padapter, EE_9346CR); - if (padapter->bSurpriseRemoved == true) { - RT_TRACE(_module_rtl871x_eeprom_c_, _drv_err_, ("padapter->bSurpriseRemoved==true")); + if (padapter->bSurpriseRemoved == true) goto out; - } + x &= ~(_EECS | _EEDI); rtw_write8(padapter, EE_9346CR, (u8)x); - if (padapter->bSurpriseRemoved == true) { - RT_TRACE(_module_rtl871x_eeprom_c_, _drv_err_, ("padapter->bSurpriseRemoved==true")); + if (padapter->bSurpriseRemoved == true) goto out; - } + up_clk(padapter, &x); - if (padapter->bSurpriseRemoved == true) { - RT_TRACE(_module_rtl871x_eeprom_c_, _drv_err_, ("padapter->bSurpriseRemoved==true")); + if (padapter->bSurpriseRemoved == true) goto out; - } + down_clk(padapter, &x); out: _func_exit_; @@ -155,17 +146,14 @@ u16 eeprom_read16(_adapter *padapter, u16 reg) /*ReadEEprom*/ _func_enter_; - if (padapter->bSurpriseRemoved == true) { - RT_TRACE(_module_rtl871x_eeprom_c_, _drv_err_, ("padapter->bSurpriseRemoved==true")); + if (padapter->bSurpriseRemoved == true) goto out; - } + /* select EEPROM, reset bits, set _EECS*/ x = rtw_read8(padapter, EE_9346CR); - if (padapter->bSurpriseRemoved == true) { - RT_TRACE(_module_rtl871x_eeprom_c_, _drv_err_, ("padapter->bSurpriseRemoved==true")); + if (padapter->bSurpriseRemoved == true) goto out; - } x &= ~(_EEDI | _EEDO | _EESK | _EEM0); x |= _EEM1 | _EECS; -- 2.20.1