Received: by 2002:a05:6a10:9848:0:0:0:0 with SMTP id x8csp2594663pxf; Sun, 4 Apr 2021 07:11:45 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxY37M5e60SoQmNn1G+qPo2rKt7Q9zP3XzGYjwLp8GTC6kpt2tDwV6A7M6xOCWz0y0ea1kf X-Received: by 2002:a17:906:ae88:: with SMTP id md8mr23030731ejb.264.1617545505158; Sun, 04 Apr 2021 07:11:45 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1617545505; cv=none; d=google.com; s=arc-20160816; b=jAftZWlc5drEplJTbrYs3jJAKxzRkV5ipYbcFTuc4WgzYBzyGIkWlmthbbduxHkry8 q+I9R2vB0GhdPrLki2WB/EDTq+YMF3nWFPKKBfekeHvucfAxLatOvAUVAv+VXwa2aZjR bZJcir4L5cnw131H0DAtN39qsf27jnNVin78XZJ0XASDohIaLidXaPQlou4O15Vg6nf3 KqaReR2dRRgWwRQKbNuU7woTN4GJ9vGqpaMqu9Rg6Tg6CdC1AVokeh3e3eZ/yyGVyhlp yNJiNKCNXk52Qy4lX5YXTgYLp4QE+KSmyT9ao9qG8TOl2FG/JKU6GB5Hu/DHDmu7XWuv 9FfA== 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=8gXw9HaOslpcD9hi+0ys594bAsPjkmcQrRqQUMxpklE=; b=cNkEJ366+YPe/vXSzDQLxH52ZiUt3X9Ps4NMVng0ASva9J8wRz2oac3FCrsNG3xdgd 67OCYVm3Okm7XVib1/xbXzsNcgu2IFma4XsfnI4pdibKpP+aB/NSxgchfLjYiA4Mu7iv TFRdwbwrvbUo9LlImOGTRTB0BTeeU3ggwe1vYl6TIraRZw7sgFZIXG6Y3N5LZ/o7pxfO W7ayzanqkxqwzDo5nLLW78Ago0o/v+xNQpgr5fJW9HmthPMlm8ttN6lCCzhiYKIuogV3 xj/eU7K5eDL+ua1PdyW+drkCW7eqUTyHlN+ouvLopFm9ViC9/dDJyvMPhco0ed6t1HXU YlHw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=SbLro9AS; 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 p11si10992069ejg.105.2021.04.04.07.11.22; Sun, 04 Apr 2021 07:11:45 -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=SbLro9AS; 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 S231199AbhDDOKY (ORCPT + 99 others); Sun, 4 Apr 2021 10:10:24 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37498 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231191AbhDDOKK (ORCPT ); Sun, 4 Apr 2021 10:10:10 -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 3AAF0C061788 for ; Sun, 4 Apr 2021 07:10:05 -0700 (PDT) Received: by mail-wm1-x332.google.com with SMTP id j20-20020a05600c1914b029010f31e15a7fso6437111wmq.1 for ; Sun, 04 Apr 2021 07:10:05 -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=8gXw9HaOslpcD9hi+0ys594bAsPjkmcQrRqQUMxpklE=; b=SbLro9ASW0+tOEpgt5mfFr4i7XB19tPFS1YL8YB20OvMsvHSbZa8tBsUPxcq6NLrCx eZvDid27aLKMkUJ9xwm7dk00siClvPR0Nv9/zVa51avyjLnRYmPv8aJ0uBAqDVM/Ad3w jYpR9Dt2XT5JleVLo0Xuo2dCXE8dWJJVY9e7KUlSkYTiNioiz5j/hJn/YlElixhfPmi1 azg4lPipyXv1Bv7QoZY9QnzzfNJSF6Ea1ExYaLoFtqJWUSiAQ3DC6Ywfx6NpMpQACInO xFeE0T4ioNQaQv+chPIbD9+RqHvCrTnGgyaXueR0dxwanSsIGsCLg1LRVt2Q0vAe84cL ofPg== 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=8gXw9HaOslpcD9hi+0ys594bAsPjkmcQrRqQUMxpklE=; b=ayH+OqD0580FAM50xyCENssAOOI2rykZEoP/kWqs3eEQtvveRHkb+cLxZ3/hars43f 59o0G74iGf3Eweke3auOg+VpL0+4i7Dzz6ec/o0mQC2Pa+Vc5f3SstY25EBNYC36ZkHJ Lsa5uMQ+uNjBIv25l3o4lrsxJ/05eSdJNsyQ43c/fBxbug4gRZzdeGPzLZhtLY3O0VPR YXWPENxrIVTovmzh61V0uF//GgikvvsRxdtSAOBNHouWjwADkqOnQCHiIiEGhH8DARVh 0+BsHOXrkz3ddGQCnXqBV7+9r9tPEuysOSBSbu/FZQ9C8tVkhau5npCU77ke9ryzm+0X BGHg== X-Gm-Message-State: AOAM533pNMFpgZ5+OFVnPjK38WeqEUTEJAy/Gg2clyVrut2vjkNot+sr HhaTnK/oV/SOexfk3g6ZBCA= X-Received: by 2002:a05:600c:3515:: with SMTP id h21mr21455481wmq.9.1617545404047; Sun, 04 Apr 2021 07:10:04 -0700 (PDT) Received: from agape ([5.171.81.112]) by smtp.gmail.com with ESMTPSA id s8sm22957602wrn.97.2021.04.04.07.10.03 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 04 Apr 2021 07:10:03 -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 08/30] staging: rtl8723bs: remove all RT_TRACE logs in core/rtw_pwrctrl.c Date: Sun, 4 Apr 2021 16:09:24 +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_pwrctrl.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_pwrctrl.c | 54 ++------------------ 1 file changed, 4 insertions(+), 50 deletions(-) diff --git a/drivers/staging/rtl8723bs/core/rtw_pwrctrl.c b/drivers/staging/rtl8723bs/core/rtw_pwrctrl.c index 8bf80e6f4a11..cc1b0d1a5a7b 100644 --- a/drivers/staging/rtl8723bs/core/rtw_pwrctrl.c +++ b/drivers/staging/rtl8723bs/core/rtw_pwrctrl.c @@ -267,40 +267,26 @@ void rtw_set_rpwm(struct adapter *padapter, u8 pslv) DBG_871X("%s: RPWM timeout, force to set RPWM(0x%02X) again!\n", __func__, pslv); } else { if ((pwrpriv->rpwm == pslv) - || ((pwrpriv->rpwm >= PS_STATE_S2) && (pslv >= PS_STATE_S2))) { - RT_TRACE(_module_rtl871x_pwrctrl_c_, _drv_err_, - ("%s: Already set rpwm[0x%02X], new = 0x%02X!\n", __func__, pwrpriv->rpwm, pslv)); + || ((pwrpriv->rpwm >= PS_STATE_S2) && (pslv >= PS_STATE_S2))) return; - } + } if ((padapter->bSurpriseRemoved) || !(padapter->hw_init_completed)) { - RT_TRACE(_module_rtl871x_pwrctrl_c_, _drv_err_, - ("%s: SurpriseRemoved(%d) hw_init_completed(%d)\n", - __func__, padapter->bSurpriseRemoved, padapter->hw_init_completed)); - pwrpriv->cpwm = PS_STATE_S4; return; } if (padapter->bDriverStopped) { - RT_TRACE(_module_rtl871x_pwrctrl_c_, _drv_err_, - ("%s: change power state(0x%02X) when DriverStopped\n", __func__, pslv)); - - if (pslv < PS_STATE_S2) { - RT_TRACE(_module_rtl871x_pwrctrl_c_, _drv_err_, - ("%s: Reject to enter PS_STATE(0x%02X) lower than S2 when DriverStopped!!\n", __func__, pslv)); + if (pslv < PS_STATE_S2) return; - } } rpwm = pslv | pwrpriv->tog; /* only when from PS_STATE S0/S1 to S2 and higher needs ACK */ if ((pwrpriv->cpwm < PS_STATE_S2) && (pslv >= PS_STATE_S2)) rpwm |= PS_ACK; - RT_TRACE(_module_rtl871x_pwrctrl_c_, _drv_notice_, - ("rtw_set_rpwm: rpwm = 0x%02x cpwm = 0x%02x\n", rpwm, pwrpriv->cpwm)); pwrpriv->rpwm = pslv; @@ -382,14 +368,8 @@ void rtw_set_ps_mode(struct adapter *padapter, u8 ps_mode, u8 smart_ps, u8 bcn_a { struct pwrctrl_priv *pwrpriv = adapter_to_pwrctl(padapter); - RT_TRACE(_module_rtl871x_pwrctrl_c_, _drv_notice_, - ("%s: PowerMode =%d Smart_PS =%d\n", - __func__, ps_mode, smart_ps)); - - if (ps_mode > PM_Card_Disable) { - RT_TRACE(_module_rtl871x_pwrctrl_c_, _drv_err_, ("ps_mode:%d error\n", ps_mode)); + if (ps_mode > PM_Card_Disable) return; - } if (pwrpriv->pwr_mode == ps_mode) if (PS_MODE_ACTIVE == ps_mode) @@ -701,8 +681,6 @@ void cpwm_int_hdl(struct adapter *padapter, struct reportpwrstate_parm *preportp exit: mutex_unlock(&pwrpriv->lock); - RT_TRACE(_module_rtl871x_pwrctrl_c_, _drv_notice_, - ("cpwm_int_hdl: cpwm = 0x%02x\n", pwrpriv->cpwm)); } static void cpwm_event_callback(struct work_struct *work) @@ -817,10 +795,6 @@ s32 rtw_register_task_alive(struct adapter *padapter, u32 task) register_task_alive(pwrctrl, task); if (pwrctrl->bFwCurrentInPSMode) { - RT_TRACE(_module_rtl871x_pwrctrl_c_, _drv_notice_, - ("%s: task = 0x%x cpwm = 0x%02x alives = 0x%08x\n", - __func__, task, pwrctrl->cpwm, pwrctrl->alives)); - if (pwrctrl->cpwm < pslv) { if (pwrctrl->cpwm < PS_STATE_S2) res = _FAIL; @@ -869,10 +843,6 @@ void rtw_unregister_task_alive(struct adapter *padapter, u32 task) unregister_task_alive(pwrctrl, task); if ((pwrctrl->pwr_mode != PS_MODE_ACTIVE) && pwrctrl->bFwCurrentInPSMode) { - RT_TRACE(_module_rtl871x_pwrctrl_c_, _drv_notice_, - ("%s: cpwm = 0x%02x alives = 0x%08x\n", - __func__, pwrctrl->cpwm, pwrctrl->alives)); - if (pwrctrl->cpwm > pslv) if ((pslv >= PS_STATE_S2) || (pwrctrl->alives == 0)) rtw_set_rpwm(padapter, pslv); @@ -910,10 +880,6 @@ s32 rtw_register_tx_alive(struct adapter *padapter) register_task_alive(pwrctrl, XMIT_ALIVE); if (pwrctrl->bFwCurrentInPSMode) { - RT_TRACE(_module_rtl871x_pwrctrl_c_, _drv_notice_, - ("rtw_register_tx_alive: cpwm = 0x%02x alives = 0x%08x\n", - pwrctrl->cpwm, pwrctrl->alives)); - if (pwrctrl->cpwm < pslv) { if (pwrctrl->cpwm < PS_STATE_S2) res = _FAIL; @@ -959,10 +925,6 @@ s32 rtw_register_cmd_alive(struct adapter *padapter) register_task_alive(pwrctrl, CMD_ALIVE); if (pwrctrl->bFwCurrentInPSMode) { - RT_TRACE(_module_rtl871x_pwrctrl_c_, _drv_info_, - ("rtw_register_cmd_alive: cpwm = 0x%02x alives = 0x%08x\n", - pwrctrl->cpwm, pwrctrl->alives)); - if (pwrctrl->cpwm < pslv) { if (pwrctrl->cpwm < PS_STATE_S2) res = _FAIL; @@ -1008,10 +970,6 @@ void rtw_unregister_tx_alive(struct adapter *padapter) unregister_task_alive(pwrctrl, XMIT_ALIVE); if ((pwrctrl->pwr_mode != PS_MODE_ACTIVE) && pwrctrl->bFwCurrentInPSMode) { - RT_TRACE(_module_rtl871x_pwrctrl_c_, _drv_notice_, - ("%s: cpwm = 0x%02x alives = 0x%08x\n", - __func__, pwrctrl->cpwm, pwrctrl->alives)); - if (pwrctrl->cpwm > pslv) if ((pslv >= PS_STATE_S2) || (pwrctrl->alives == 0)) rtw_set_rpwm(padapter, pslv); @@ -1048,10 +1006,6 @@ void rtw_unregister_cmd_alive(struct adapter *padapter) unregister_task_alive(pwrctrl, CMD_ALIVE); if ((pwrctrl->pwr_mode != PS_MODE_ACTIVE) && pwrctrl->bFwCurrentInPSMode) { - RT_TRACE(_module_rtl871x_pwrctrl_c_, _drv_info_, - ("%s: cpwm = 0x%02x alives = 0x%08x\n", - __func__, pwrctrl->cpwm, pwrctrl->alives)); - if (pwrctrl->cpwm > pslv) { if ((pslv >= PS_STATE_S2) || (pwrctrl->alives == 0)) rtw_set_rpwm(padapter, pslv); -- 2.20.1