Received: by 2002:a05:6358:a55:b0:ec:fcf4:3ecf with SMTP id 21csp608016rwb; Fri, 13 Jan 2023 01:47:22 -0800 (PST) X-Google-Smtp-Source: AMrXdXtYxJlRucShRDN7amO/GXdhPN97Xlo4WPmn9frEFeqW8d01WX2ZxeJzJ7yYr+SCDBn3v8cD X-Received: by 2002:a17:907:8744:b0:7c1:277:cb05 with SMTP id qo4-20020a170907874400b007c10277cb05mr86587752ejc.6.1673603242687; Fri, 13 Jan 2023 01:47:22 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1673603242; cv=none; d=google.com; s=arc-20160816; b=knNqkCpW0SAC8Jm5d7IUqE9INvxpPaQtePOmi4I8ys6WxOEFDVDjxilWhFz2M3szOV fXQb2V6xkHpq2U6/NOEE3bP6XW2NP0HroaxMbqbq0ZelSgzwZGInF3eAVp8OtOJUIJAc WGOyXk4qtwy14h/i6mXDEeKBGN2ncaNmf6qF2RJuCsxYFkxiU6NvdYsSzV28qVRWkGCy MDBoQVpLb5YmUdG8ZyvycwzA1L3nsMmckmIsNwUjHAPbez6zrtKN0nACh7YsFwcCouc9 XGOaX3b45TIGDKXHzTCvIN4TQMznZcGnkW7ZOhLeXVe1+gFKPeqrzuCHcrMxxn6Kf1rb dgSg== 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=mbYjfwXtybxvK2x1rmS+Aqs5hquVvYCoeK7ypOAiG9w=; b=EbIRRrbzxQf5WB3Z0lg5N15SlJP91A+0NhS4Fo78keUBHGeB7km2UIJnqvK8Y+oszk ljvaL79796bXUCsPJct7dOJAMqZfw1hJreTkNKEFksK2SchdTTevaDmgDV0S4bnCSLdm l6Y12nXuTclvAWcF3TWV81jn49AG2kaID4LcMIjWYfYMD0jecHUeRqREoW2kIQIOG8+A ohPwyPmTmJ3QqrpS+tr+uKXxHdBCWz+mD/Ji63FRsxdpBULTaCznuOfgAqcGaeGM6DWT ByCYeMCOhZiFGNp1k7LftlNtF/cnAJ84vPrtFqDdDeOu+gg4Y3fMRpayAcYzo6LFitaY sF6Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=k24CFPF0; 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 xa5-20020a170906fd8500b0084d7c8a4bdfsi10679693ejb.276.2023.01.13.01.47.10; Fri, 13 Jan 2023 01:47:22 -0800 (PST) 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=k24CFPF0; 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 S241188AbjAMJe5 (ORCPT + 51 others); Fri, 13 Jan 2023 04:34:57 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:55070 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S241268AbjAMJbr (ORCPT ); Fri, 13 Jan 2023 04:31:47 -0500 Received: from mga01.intel.com (mga01.intel.com [192.55.52.88]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 34CE618E3E for ; Fri, 13 Jan 2023 01:27:22 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1673602042; x=1705138042; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=Msf7Ux2UBgkRWznDZIyNsLYT/We1sSSckwpIyVPyhL0=; b=k24CFPF0XV7d/QY7jk9Y7m/SwipZm4ZoGDLF2LWB2V0XA5kxz86fNYT0 NXb7Qxh1ruAOLJrYuAMK8uX/9IeFxb8wcmyyN3qbQclBzqe6EJxEmNMx2 TJf3utOcIOH9GIEdIhPBXO8RCetvyp1Ig/ulnpPLk/koXetjfxOZvRVtI Ovr2PnXjEagTEbajO0jUEnt/JUWlFDba6YMkEQ3Knrw/DCyhUbLV1u+xA qrcgzHInxJx5vydO9kRDF0OSULqwhksyYyN5GhxL+fiL/jzKJxza1EyQH 5BOYeukBWBhWDSZlRu2a54Oiy1/Oe4ap/QJ5kw0v/NmYHIKBPyF0TmIal g==; X-IronPort-AV: E=McAfee;i="6500,9779,10588"; a="351189434" X-IronPort-AV: E=Sophos;i="5.97,213,1669104000"; d="scan'208";a="351189434" Received: from orsmga003.jf.intel.com ([10.7.209.27]) by fmsmga101.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 13 Jan 2023 01:27:21 -0800 X-IronPort-AV: E=McAfee;i="6500,9779,10588"; a="608116087" X-IronPort-AV: E=Sophos;i="5.97,213,1669104000"; d="scan'208";a="608116087" Received: from bard-ubuntu.sh.intel.com ([10.239.185.57]) by orsmga003-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 13 Jan 2023 01:27:20 -0800 From: Bard Liao To: alsa-devel@alsa-project.org, vkoul@kernel.org Cc: vinod.koul@linaro.org, linux-kernel@vger.kernel.org, pierre-louis.bossart@linux.intel.com, bard.liao@intel.com Subject: [PATCH 1/5] soundwire: stream: uniquify dev_err() logs Date: Fri, 13 Jan 2023 17:35:28 +0800 Message-Id: <20230113093532.3872113-2-yung-chuan.liao@linux.intel.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20230113093532.3872113-1-yung-chuan.liao@linux.intel.com> References: <20230113093532.3872113-1-yung-chuan.liao@linux.intel.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-4.3 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_EF,RCVD_IN_DNSWL_MED, RCVD_IN_MSPIKE_H3,RCVD_IN_MSPIKE_WL,SPF_HELO_NONE,SPF_NONE 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 From: Pierre-Louis Bossart There are a couple of duplicate logs which makes harder than needed to follow the error flows. Add __func__ or make the log unique. Signed-off-by: Pierre-Louis Bossart Reviewed-by: Ranjani Sridharan Signed-off-by: Bard Liao --- drivers/soundwire/stream.c | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/drivers/soundwire/stream.c b/drivers/soundwire/stream.c index df3b36670df4..e0eae0b98267 100644 --- a/drivers/soundwire/stream.c +++ b/drivers/soundwire/stream.c @@ -1389,7 +1389,7 @@ static int _sdw_prepare_stream(struct sdw_stream_runtime *stream, ret = do_bank_switch(stream); if (ret < 0) { - dev_err(bus->dev, "Bank switch failed: %d\n", ret); + dev_err(bus->dev, "do_bank_switch failed: %d\n", ret); goto restore_params; } @@ -1477,7 +1477,7 @@ static int _sdw_enable_stream(struct sdw_stream_runtime *stream) /* Program params */ ret = sdw_program_params(bus, false); if (ret < 0) { - dev_err(bus->dev, "Program params failed: %d\n", ret); + dev_err(bus->dev, "%s: Program params failed: %d\n", __func__, ret); return ret; } @@ -1567,7 +1567,7 @@ static int _sdw_disable_stream(struct sdw_stream_runtime *stream) /* Program params */ ret = sdw_program_params(bus, false); if (ret < 0) { - dev_err(bus->dev, "Program params failed: %d\n", ret); + dev_err(bus->dev, "%s: Program params failed: %d\n", __func__, ret); return ret; } } @@ -1664,7 +1664,7 @@ static int _sdw_deprepare_stream(struct sdw_stream_runtime *stream) /* Program params */ ret = sdw_program_params(bus, false); if (ret < 0) { - dev_err(bus->dev, "Program params failed: %d\n", ret); + dev_err(bus->dev, "%s: Program params failed: %d\n", __func__, ret); return ret; } } @@ -1893,7 +1893,8 @@ int sdw_stream_add_master(struct sdw_bus *bus, m_rt = sdw_master_rt_alloc(bus, stream); if (!m_rt) { - dev_err(bus->dev, "Master runtime alloc failed for stream:%s\n", stream->name); + dev_err(bus->dev, "%s: Master runtime alloc failed for stream:%s\n", + __func__, stream->name); ret = -ENOMEM; goto unlock; } @@ -2012,7 +2013,8 @@ int sdw_stream_add_slave(struct sdw_slave *slave, */ m_rt = sdw_master_rt_alloc(slave->bus, stream); if (!m_rt) { - dev_err(&slave->dev, "Master runtime alloc failed for stream:%s\n", stream->name); + dev_err(&slave->dev, "%s: Master runtime alloc failed for stream:%s\n", + __func__, stream->name); ret = -ENOMEM; goto unlock; } -- 2.25.1