Received: by 2002:a6b:fb09:0:0:0:0:0 with SMTP id h9csp846634iog; Mon, 13 Jun 2022 14:21:55 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyz8/9B8GtkRLsxDF+hu1O6vrseNdk1rTOVlV0+LnlkM/l6tOexnHuDBjBXDvn8CKiAXLwF X-Received: by 2002:a17:906:649b:b0:711:fde7:be43 with SMTP id e27-20020a170906649b00b00711fde7be43mr1523730ejm.294.1655155315371; Mon, 13 Jun 2022 14:21:55 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1655155315; cv=none; d=google.com; s=arc-20160816; b=X2NVGZmDHncx/+QVnyB6B74o1LjLNmiDLO8ICZSOy0xIudN8v4qP76ULTmHW9Apgwl /WBUVYYRhcraTIkF/u6ERD9UOK9/YpLTSLEHjNZYaDsgkUn0hkJ6gJpvkZWH59Z8WAaS CF5bvWDFbyEiF+hFwIjTneQzwLH3abbtrRJv/+8nXyGJtLCRXlXiXrvbnDlLnOxWvB7V /G+J/kTuJRUz8e+C3WKO4MlRoRCDKY+SXZjle1PehIypJzIyx8tzxjzMZ4ICts/fybwB kGxLsPW+kbtTVeHq2iiVUTrOsEth/5yr+8yQXumL/LT//q/DV7CKBoX4dZfZEB8amb3K olsw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to:from :references:cc:to:content-language:subject:user-agent:mime-version :date:message-id:dkim-signature; bh=glbrBmtHDHYn2FMdYwzb4XwRxw3owM/t1pgV1E/OF8o=; b=O1mEc1E+xMRhKHCk0y0ZXzwZkiADmUgOUi4S6aTrC4NpNKM5QvDyvB0vfAQ5DGz0me UVdTQOINZ6wuemhaW2haSxKXnclsj0YfRQoVZL6s23IjeFijrw3ZCuRPgZXRPRd/Tak/ 4IOLTkUztXjj/NpqqTAZ+HIevD466Xkbj/eAFSCU+gM5p8JHe9Ca+f2XDDnhTy3Hk3+8 DGEsywAB/WT3cUXDWeSfWpDz0RiRJWngTQr4PWCOvnKj6TbdDIp+1Xc8pyb2U4ktAxDE 8X99ixMZP/4okLuIOF1Nt73akF5fJyepJExxgHaH0v28aRBTE5jJ34WmZUWJ/IxNLwnN I/mw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=k0sxJENo; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id go35-20020a1709070da300b006f0034e2730si10145180ejc.930.2022.06.13.14.21.29; Mon, 13 Jun 2022 14:21:55 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=k0sxJENo; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229892AbiFMUbs (ORCPT + 99 others); Mon, 13 Jun 2022 16:31:48 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:60248 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1351417AbiFMUa4 (ORCPT ); Mon, 13 Jun 2022 16:30:56 -0400 Received: from mga06.intel.com (mga06b.intel.com [134.134.136.31]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 3901D10F for ; Mon, 13 Jun 2022 12:21:33 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1655148093; x=1686684093; h=message-id:date:mime-version:subject:to:cc:references: from:in-reply-to:content-transfer-encoding; bh=pVQTfp5IU2YdV+5jfNxCHCOaYYaOvPBvgBMV8BSutKI=; b=k0sxJENowsNkKMkbUjmUO8CtSRDypwV5Zd0jWr8vClhr8GdwPBCFpVH2 hpZtp+ZGjIwXjvpWdq3l7iaQS1ZI/2PBJ0t4KHkoOvbEVict+i3MFw6+J JVGHltfHPAY7k6aSgn3JD3GD17ZdPpZ17iyxSgn/fr6cOyuN4FgZyyTJC iRMSnumf07l8hzyPOht/tcTxAhGEQl6uOiwXjrP5FmPXtGOyxsvW5L7jy 40bqOue+G8+f7x+YOyQr4sYHrgdABgeuO9XLQZ4hp2Fnoaa1XrIux+FTe ddxdUPWf9jw8Xy+LNcHRC8HMk+sfhlzMb/oIWRZxutRV98UjcUyVqJQUL Q==; X-IronPort-AV: E=McAfee;i="6400,9594,10377"; a="340058361" X-IronPort-AV: E=Sophos;i="5.91,297,1647327600"; d="scan'208";a="340058361" Received: from fmsmga001.fm.intel.com ([10.253.24.23]) by orsmga104.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 13 Jun 2022 12:21:32 -0700 X-IronPort-AV: E=Sophos;i="5.91,297,1647327600"; d="scan'208";a="726419999" Received: from kyogendr-mobl.amr.corp.intel.com (HELO [10.212.95.68]) ([10.212.95.68]) by fmsmga001-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 13 Jun 2022 12:21:31 -0700 Message-ID: <15ef4ec4-14ae-27fc-919d-b0933454455f@linux.intel.com> Date: Mon, 13 Jun 2022 14:21:31 -0500 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Firefox/91.0 Thunderbird/91.9.1 Subject: Re: [PATCH 1/2] soundwire: intel: uniquify debug message Content-Language: en-US To: Greg KH Cc: alsa-devel@alsa-project.org, vinod.koul@linaro.org, tiwai@suse.de, linux-kernel@vger.kernel.org, vkoul@kernel.org, broonie@kernel.org, srinivas.kandagatla@linaro.org, sanyog.r.kale@intel.com, Bard Liao , bard.liao@intel.com References: <20220610023537.27223-1-yung-chuan.liao@linux.intel.com> <20220610023537.27223-2-yung-chuan.liao@linux.intel.com> <7328fbb2-06af-99c8-5e7f-9d22f8c4e4f6@linux.intel.com> From: Pierre-Louis Bossart In-Reply-To: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-6.7 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_EF,NICE_REPLY_A,RCVD_IN_DNSWL_MED, SPF_HELO_NONE,SPF_NONE,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org >>>>>> @@ -1549,8 +1549,8 @@ static int __maybe_unused intel_pm_prepare(struct device *dev) >>>>>> int ret; >>>>>> >>>>>> if (bus->prop.hw_disabled || !sdw->startup_done) { >>>>>> - dev_dbg(dev, "SoundWire master %d is disabled or not-started, ignoring\n", >>>>>> - bus->link_id); >>>>>> + dev_dbg(dev, "%s: SoundWire master %d is disabled or not-started, ignoring\n", >>>>>> + __func__, bus->link_id); >>>>> >>>>> Not needed, it is provided automatically if you ask the kernel for this. >>>>> Same for all other instances in this patch. >>>> >>>> provided how? Your comment is a bit cryptic here. >>> >>> the dynamic debug code in the kernel already adds the function name >>> where the message was sent from, if you want to know this in userspace. >>> Please read the documentation for details (I think the key is the 'f' >>> flag to be enabled in userspace). >>> >>> So adding __func__ to dev_dbg() calls are redundant and never needed. >> >> Oh wow, I had no idea - and I am not the only one :-) >> >> Here's what I get with a grep on the kernel code >> >> git grep __func__ | grep dev_dbg | wc -l >> >> 3122 >> >> >> Doing this for sound/ gives me 356, and that's for single-line logs only. >> >> There's clearly something that was missed by tons of people. > > Yes, it's not commonly known so cleanups are always welcome. Perhaps > some of those usages predate the feature being added as well. Yep, looks like no one in our team knew about this. We've changed our scripts and I started cleaning this up, changes will be posted upstream soon. https://github.com/thesofproject/linux/pull/3695 This patch will be reverted in our tree, completely unnecessary indeed.