Received: by 2002:a05:6a10:9848:0:0:0:0 with SMTP id x8csp306241pxf; Wed, 31 Mar 2021 03:58:13 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyPZSIN8uIDRT2z/GCeQoTPTURQghDxTxKLPQFCTWPyqWBExXnzZ6V1Jf5FwetWocvuBuqy X-Received: by 2002:a05:6402:42d3:: with SMTP id i19mr2946604edc.220.1617188292968; Wed, 31 Mar 2021 03:58:12 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1617188292; cv=none; d=google.com; s=arc-20160816; b=nCtE9BXpzftGR8JbNY4DKBZSto/r84G2p3EqXDU0I2FUiJoe5XLKVZmRiiKX01cfDC grYc8ZjbsN1VbfA0LERaEhq8ZZzJ9zfrgo9AE0LEfDx+cdbKFWldCqb/3jMX0A3DC2kL 0TYdaiHtL9WYJpHopniys4/o296Nvk9gsOc3yIhJ6mNFEELJ0LdFTWvtcqSkvhmlGQUX L0TQ9c8FBkX90L9NJKhJGO2X5JTJjasRSRfELtcpIDIEz4bWwtMSY4oh8Zphu6tSUWL6 qd8CliP2f7/t0c8WjkSp5uHJ43hBN/WJ7RHDKBQ1zHj76cYdWjtFM0Ft/1j410EwFxUD 2PlQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:user-agent:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date :dkim-signature; bh=356R7sQpshoyEfmHEDtb6MkvOb+YyBiiz66/bbaWRKI=; b=LIy/CrbefBcBMMhpqwpMWoEsbk59EYL4LGJCYz9hvOTZD+q/FL31s+kbxiHyjVJqiw CUr1Dy7JZ4kWUB/wE7jJFaltLG1GnmgrG12vAjHFYE9YSUGP3VUBDjBMqv9TGqrX+GM/ 7bUAWUcLhw0MiEWDMbRLSnx+l2rUNtY3pJCDZfZRKpYC2wyjPIXbgOcYSO9Zh/lLtYod T+CsdaivmeeedDXrUylWjXXKoKjy8W32PK9f/dmXGNPk2aV+ZsqF+yYOQ8EmQIFPWwaZ uTCyo4jeGHFCqisBBrgZr5SvGuQr5f2TJUtotsA2u1DW5i87LEsnwi7whAq1ohlowrGL wXuA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b="usqu/C8Y"; 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 r7si1271093ejz.120.2021.03.31.03.57.50; Wed, 31 Mar 2021 03:58:12 -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="usqu/C8Y"; 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 S235083AbhCaK4T (ORCPT + 99 others); Wed, 31 Mar 2021 06:56:19 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56134 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234995AbhCaKz4 (ORCPT ); Wed, 31 Mar 2021 06:55:56 -0400 Received: from mail-ed1-x52e.google.com (mail-ed1-x52e.google.com [IPv6:2a00:1450:4864:20::52e]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 1295AC061574 for ; Wed, 31 Mar 2021 03:55:56 -0700 (PDT) Received: by mail-ed1-x52e.google.com with SMTP id h10so21755460edt.13 for ; Wed, 31 Mar 2021 03:55:55 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=356R7sQpshoyEfmHEDtb6MkvOb+YyBiiz66/bbaWRKI=; b=usqu/C8YTsm17g7Vo36TvPv/O96ZFfzV35x47DmxM20+d2bvcrMcA6nm2XEP+UOGLr FajYxSntyoaRlXNaZ7KkLecXC6HiRGJFVY9BL+avWsgEBRBR+K7+rBLaDaE8WsrLfn+7 1H0LnCHp4p9zvsZgX1o1uDsE1S+0aYcttEVETH8UlfmKeKQI60gh15I9cYZth7l9CEnE TsYTzLw7U5Gk2qwNbGZisF0qn+qm4bnrqzU0XFPn+nskJomAOPzP2iMVlYhmRlDAjpwu 3P6H9Kmmszs9M6CQBi7m6EEGAazge+P5XB9PJIA7Al5QxevWR1NblpKO8LA/dJzOms/S SUxg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=356R7sQpshoyEfmHEDtb6MkvOb+YyBiiz66/bbaWRKI=; b=fh0nMa+HlosUzRsCZt1W2oWEsP5k4b1VA8wC+c4pRRcwGZxrl6sXhiUk0BhHQThJPu Tiai4rn4S+njOqhnARaJFgk4T8A8n+pA/5vQKKDTlDcldwpj6zv6HA8MtSLY48cjc9Cw q3zKyWNmzHqzh8jRLLS7LcBAcJtUK/Rm/3htS4MXDqBHmGzBh99gSO060w5XVvxQsWNO Chtnl/BrvHMW0InpObDc5PHrUR1CwhwJfuQkmLFIMZOB3aULvDEyd6FLREEI3nW+Dmr4 v+bmLzNoY/oEkCxxM9P9n0QmKNPPSbMpuqXIP/Q2bmLAgdtPZEYP08XiKPUXZi80wSXK 4Ttw== X-Gm-Message-State: AOAM530hCxzifUJy+Csei+08rauTW8ISFxZXcZGNpUyAFiHZg5JsctCm pxUys/JXdXwT68g5QOyNzrs= X-Received: by 2002:aa7:d74d:: with SMTP id a13mr3021594eds.199.1617188154873; Wed, 31 Mar 2021 03:55:54 -0700 (PDT) Received: from agape.jhs ([5.171.73.44]) by smtp.gmail.com with ESMTPSA id h13sm1299118edz.71.2021.03.31.03.55.53 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 31 Mar 2021 03:55:54 -0700 (PDT) Date: Wed, 31 Mar 2021 12:55:51 +0200 From: Fabio Aiuto To: Greg KH Cc: dan.carpenter@oracle.com, joe@perches.com, linux-staging@lists.linux.dev, linux-kernel@vger.kernel.org Subject: Re: [PATCH 03/40] staging: rtl8723bs: replace RT_TRACE with public printk wrappers in core/rtw_eeprom.c Message-ID: <20210331105551.GB1450@agape.jhs> References: <39c2cd878bc914a00e71ea988c3cacb651670822.1617183374.git.fabioaiuto83@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.10.1 (2018-07-13) Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Mar 31, 2021 at 12:27:20PM +0200, Greg KH wrote: > On Wed, Mar 31, 2021 at 11:39:31AM +0200, Fabio Aiuto wrote: > > replace private macro RT_TRACE for tracing with in-kernel > > pr_* printk wrappers > > > > Signed-off-by: Fabio Aiuto > > --- > > drivers/staging/rtl8723bs/core/rtw_eeprom.c | 26 ++++++++++----------- > > 1 file changed, 13 insertions(+), 13 deletions(-) > > > > diff --git a/drivers/staging/rtl8723bs/core/rtw_eeprom.c b/drivers/staging/rtl8723bs/core/rtw_eeprom.c > > index 3cbd65dee741..6176d741d60e 100644 > > --- a/drivers/staging/rtl8723bs/core/rtw_eeprom.c > > +++ b/drivers/staging/rtl8723bs/core/rtw_eeprom.c > > @@ -36,7 +36,7 @@ void shift_out_bits(_adapter *padapter, u16 data, u16 count) > > _func_enter_; > > > > if (padapter->bSurpriseRemoved == true) { > > - RT_TRACE(_module_rtl871x_eeprom_c_, _drv_err_, ("padapter->bSurpriseRemoved==true")); > > + pr_err("%s padapter->bSurpriseRemoved==true", DRIVER_PREFIX); > > As Dan said, this is not the same thing. You are now always printing > out this mess, when before you were not unless you explicitly enabled > "tracing". RT_TRACE is enabled if is defined the symbol DEBUG_RTL871X. It doesn't seem to be related to tracing. DEBUG_RTL871X is never declared, is commented out in rtl8723bs/include/autoconf.h that's why RT_TRACE is never printed. If we try to uncomment the symbol definition we have some comiling errors.. > > And you are sending it to the error log? > > And finally, drivers should never be using pr_*() for messages, they > should be using dev_*() instead as they are a driver and have access to > a device pointer. > > thanks, > > greg k-h I still wonder what's best... thanks, fabio