Received: by 2002:a05:6a10:9848:0:0:0:0 with SMTP id x8csp2594516pxf; Sun, 4 Apr 2021 07:11:31 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwf7z/9/rHc1imPfNKTr0axDQTQSrMRsK5Evc7KiN/wF4F5uzcuxf5BQ9fGsGcDDlF+3tCV X-Received: by 2002:aa7:c3c4:: with SMTP id l4mr25852124edr.335.1617545490846; Sun, 04 Apr 2021 07:11:30 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1617545490; cv=none; d=google.com; s=arc-20160816; b=FTWM8vHjC/w2qr9nhanHeaqwocfu4diO4UyYi2m7r5BzDywmuCCyDHlZTPnuQgMWnH Eb6xh6bAP7jwYK6lvZKx10yvCzlr8UCXba4pMLqTdi64a1pGccpqWhEt3WywKSgURmvu qPKFkf5J8ivzThCQMpPZhSe7A4yhIWg43eaG3tTJ2BiybFVDAMQjHVHhsrLHierCin2T oFiLiwIgZLZLWt31ElaD4y+3HYO8/CsrsNyGQ30ffyvTLasDAGIN91Z4K4/Lzm2ePr4u BqjEp8vFnutCrh3evstQs1plpsftKR1AZN5GTXUS1K4u7YaVjmq+M10zsv3pZ524pfvX F3QQ== 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=kPW62Ir8N4ZkaB9VbLGWbX0rDPFjBCJUsA1r2BjOZjlYpR8A7MpjSiOerEJ+U0o08h ZRgPMc+ZGv4fBrxtGXlVX8RSKzDghc3cXxdAN4POC9GDkcRWA4WZK+LBWOvC53ntneER 1VtGCOFCXTAUp5aptxWmB2ATzOlEOfIjTjCh6tUsraBtnnY98K/yHtOfA9D74lu3hAvP nJnqokRW2s5vUFM76AjhtI+PdHlwQe7zou5Q/r3BJ44ydNtwP1wVJ/+Iw5HSQLqwLfGH n5G2QnAFDLS1aQH8mqv/fhQz+hiu2hKj7RydoPJ52pq4huMjGWGuSuV6jC4pe9PTdLmA W3Kg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=uTdww3EU; 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 a4si10878192ejy.263.2021.04.04.07.11.08; Sun, 04 Apr 2021 07:11:30 -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=uTdww3EU; 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 S231246AbhDDOKS (ORCPT + 99 others); Sun, 4 Apr 2021 10:10:18 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37476 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231152AbhDDOKG (ORCPT ); Sun, 4 Apr 2021 10:10:06 -0400 Received: from mail-wm1-x32a.google.com (mail-wm1-x32a.google.com [IPv6:2a00:1450:4864:20::32a]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A63F9C061756 for ; Sun, 4 Apr 2021 07:10:01 -0700 (PDT) Received: by mail-wm1-x32a.google.com with SMTP id j4-20020a05600c4104b029010c62bc1e20so4472477wmi.3 for ; Sun, 04 Apr 2021 07:10:01 -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=uTdww3EUd2OCcuyKCtmN+7rJjNqmmf1ZGgvk77+Bh2dvIbtPYswMunZw9LOrzVyql7 iFIc1YAkaE363bvyMLsnLdWYAUGkm7EqQIVdUhxmexXz3FiIka/8sRpyF8Gx4PdES4z7 3SR1VRo3B4XZQSUBwBgfyO6tgYRdbLCF0Q1o8JCdq5K7JsKsU1v6bwLKBqESs3GDMilc 3vvNUdNg7cw5TRUhaD5tiXtGWU+3fln2GOMrHf3+Zqdv3uZ7lwT6gZO8/ZMk9VUS25YE K6HHcrS9FJLQU9fQbty8JnwDFfw8cuDn1e5rddOK308kpr94Xvqy1vqMNhxCq6ouEDO2 Rn+w== 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=h8OnIklwXk8SZqCDmqrdG76vpZQq0fiIoABscYO90hEjcqvNNWxYJy//Qp17/vY99a Orw6tdMv2N0ui/ytO2QFoe6sCzObmKAg519Dglmf104AfHZdBvLTp4HoA8keeSWnW5Jj Si15NNM6hcWye2a44XG+izKhLUrGPVfadtKuu3OVNGjAWvin9rtwc/wpWgyeb4mBqqQe qKj57g44g6KlY2ii3SeMY4V6EecLZ/rdL2+c+HjDh+N2meC8RtwwxrkLg1IfIFez/Fzw riJ+GWOhS8fwjbyBB6jYwxBOW35YUsmwwubFEABnH4tU3kxhIKLLxskn78CFJqekl73j Uyfw== X-Gm-Message-State: AOAM530ioUVhN8xm0LZEDnSdNfKYNnwrQdOiToBUxLRY7GSvQ+UOYSqX D3bUP4SEYywHND3zbq/PkNU= X-Received: by 2002:a05:600c:4108:: with SMTP id j8mr20609473wmi.183.1617545400493; Sun, 04 Apr 2021 07:10:00 -0700 (PDT) Received: from agape ([5.171.81.112]) by smtp.gmail.com with ESMTPSA id e10sm7276721wrw.14.2021.04.04.07.09.59 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 04 Apr 2021 07:10:00 -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 v4 06/30] staging: rtl8723bs: remove all RT_TRACE logs in core/rtw_eeprom.c Date: Sun, 4 Apr 2021 16:09:22 +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