ASoC: SOF/Intel: remove __func__ from dev_dbg()
Subsystems (4)
cover ASoC: SOF/Intel: remove __func__ from dev_dbg()
Cleanups suggested by Greg KH during SoundWire reviews, since the __func__ information can be added with the dyndbg kernel parameter [1].
The first two patches change the error level in cases where the use of dev_dbg() was inconsistent with an aborted programming sequence.
[1] https://lore.kernel.org/alsa-devel/[email protected]/
Pierre-Louis Bossart (13):
ASoC: SOF: Intel: hda-dsp: report error on power-up/down
ASoC: SOF: Intel: hda-stream: report error on stream not opened
ASoC: SOF: Intel: hda-dai: remove use of __func__ in dev_dbg
ASoC: SOF: Intel: hda-stream: remove use of __func__ in dev_dbg
ASoC: SOF: Intel: mtl: remove use of __func__ in dev_dbg
ASoC: SOF: ipc3-dtrace: remove use of __func__ in dev_dbg
ASoC: SOF: ipc3-loader: remove use of __func__ in dev_dbg
ASoC: SOF: ipc3-topology: remove use of __func__ in dev_dbg
ASoC: SOF: ipc4-topology remove use of __func__ in dev_dbg
ASoC: SOF: sof-client: remove use of __func__ in dev_dbg
ASoC: SOF: ipc4: remove use of __func__ in dev_dbg
ASoC: Intel: boards: hda: remove use of __func__ in dev_dbg
ASoC: Intel: boards: sof_sdw: remove use of __func__ in dev_dbg
sound/soc/intel/boards/hda_dsp_common.c | 4 ++-- sound/soc/intel/boards/skl_hda_dsp_generic.c | 4 ++-- sound/soc/intel/boards/sof_sdw.c | 2 +- sound/soc/sof/intel/hda-dai.c | 6 +++--- sound/soc/sof/intel/hda-dsp.c | 4 ++-- sound/soc/sof/intel/hda-stream.c | 6 +++--- sound/soc/sof/intel/mtl.c | 3 +-- sound/soc/sof/ipc3-dtrace.c | 5 ++--- sound/soc/sof/ipc3-loader.c | 11 +++++------ sound/soc/sof/ipc3-topology.c | 4 ++-- sound/soc/sof/ipc4-topology.c | 18 +++++++++--------- sound/soc/sof/ipc4.c | 2 +- sound/soc/sof/sof-client.c | 4 ++-- 13 files changed, 35 insertions(+), 38 deletions(-)
Signature · 1 line
2.34.1
PATCH 1/13 ASoC: SOF: Intel: hda-dsp: report error on power-up/down
dev_dbg() is not good-enough since the flow returns an error.
--- sound/soc/sof/intel/hda-dsp.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
sound/soc/sof/intel/hda-dsp.c +2 -2
@@ -743,7 +743,7 @@ int hda_dsp_resume(struct snd_sof_dev *sdev)if (hlink->ref_count) { ret =snd_hdac_ext_bus_link_power_up (hlink);if (ret <0 ) { -dev_dbg (sdev->dev, +dev_err (sdev->dev,"error %d in %s: failed to power up links" , ret, __func__);return ret;
@@ -871,7 +871,7 @@ int hda_dsp_suspend(struct snd_sof_dev *sdev, u32 target_state)/* no link can be powered in s0ix state */ ret =snd_hdac_ext_bus_link_power_down_all (bus);if (ret <0 ) { -dev_dbg (sdev->dev, +dev_err (sdev->dev,"error %d in %s: failed to power down links" , ret, __func__);return ret;
Signature · 1 line
2.34.1
PATCH 2/13 ASoC: SOF: Intel: hda-stream: report error on stream not opened
In reply to Pierre-Louis BossartWe report -ENODEV but only use dev_dbg, this is
inconsistent. dev_err() makes sense here.
--- sound/soc/sof/intel/hda-stream.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
sound/soc/sof/intel/hda-stream.c +1 -1
@@ -271,7 +271,7 @@ int hda_dsp_stream_put(struct snd_sof_dev *sdev, int direction, int stream_tag) HDA_VS_INTEL_EM2_L1SEN, HDA_VS_INTEL_EM2_L1SEN);if (!found) { -dev_dbg (sdev->dev,"%s: stream_tag %d not opened!\n" , +dev_err (sdev->dev,"%s: stream_tag %d not opened!\n" , __func__, stream_tag);return -ENODEV ; }
Signature · 1 line
2.34.1
PATCH 3/13 ASoC: SOF: Intel: hda-dai: remove use of __func__ in dev_dbg
In reply to Pierre-Louis BossartThe module and function information can be added with 'modprobe foo dyndbg=+pmf'
--- sound/soc/sof/intel/hda-dai.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-)
sound/soc/sof/intel/hda-dai.c +3 -3
@@ -393,7 +393,7 @@ static int hda_dai_prepare(struct snd_pcm_substream *substream, struct snd_soc_dif (hext_stream && hext_stream->link_prepared)return 0 ; -dev_dbg (sdev->dev,"%s: prepare stream dir %d\n" , __func__, substream->stream); +dev_dbg (sdev->dev,"prepare stream dir %d\n" , substream->stream); ret =hda_link_dma_prepare (substream);if (ret <0 )
@@ -419,7 +419,7 @@ static int ipc3_hda_dai_trigger(struct snd_pcm_substream *substream,struct snd_soc_dapm_widget *w;int ret; -dev_dbg (dai->dev,"%s: cmd=%d dai %s direction %d\n" , __func__, cmd, +dev_dbg (dai->dev,"cmd=%d dai %s direction %d\n" , cmd, dai->name, substream->stream); ret =hda_link_dma_trigger (substream, cmd);
@@ -468,7 +468,7 @@ static int ipc4_hda_dai_trigger(struct snd_pcm_substream *substream,struct snd_soc_dai *cpu_dai;int ret; -dev_dbg (dai->dev,"%s: cmd=%d dai %s direction %d\n" , __func__, cmd, +dev_dbg (dai->dev,"cmd=%d dai %s direction %d\n" , cmd, dai->name, substream->stream); hstream = substream->runtime->private_data;
Signature · 1 line
2.34.1
PATCH 4/13 ASoC: SOF: Intel: hda-stream: remove use of __func__ in dev_dbg
In reply to Pierre-Louis BossartThe module and function information can be added with 'modprobe foo dyndbg=+pmf'
--- sound/soc/sof/intel/hda-stream.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
sound/soc/sof/intel/hda-stream.c +2 -2
@@ -116,13 +116,13 @@ int hda_dsp_stream_setup_bdl(struct snd_sof_dev *sdev,int remain, ioc; period_bytes = hstream->period_bytes; -dev_dbg (sdev->dev,"%s: period_bytes:0x%x\n" , __func__, period_bytes); +dev_dbg (sdev->dev,"period_bytes:0x%x\n" , period_bytes);if (!period_bytes) period_bytes = hstream->bufsize; periods = hstream->bufsize / period_bytes; -dev_dbg (sdev->dev,"%s: periods:%d\n" , __func__, periods); +dev_dbg (sdev->dev,"periods:%d\n" , periods); remain = hstream->bufsize % period_bytes;if (remain)
Signature · 1 line
2.34.1
PATCH 5/13 ASoC: SOF: Intel: mtl: remove use of __func__ in dev_dbg
In reply to Pierre-Louis BossartThe module and function information can be added with 'modprobe foo dyndbg=+pmf'
--- sound/soc/sof/intel/mtl.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-)
sound/soc/sof/intel/mtl.c +1 -2
@@ -540,8 +540,7 @@ static irqreturn_t mtl_ipc_irq_thread(int irq, void *context)if (!ipc_irq) {/* This interrupt is not shared so no need to return IRQ_NONE. */ -dev_dbg_ratelimited (sdev->dev,"%s nothing to do in IPC IRQ thread\n" , - __func__); +dev_dbg_ratelimited (sdev->dev,"nothing to do in IPC IRQ thread\n" ); }return IRQ_HANDLED ;
Signature · 1 line
2.34.1
PATCH 6/13 ASoC: SOF: ipc3-dtrace: remove use of __func__ in dev_dbg
In reply to Pierre-Louis BossartThe module and function information can be added with 'modprobe foo dyndbg=+pmf'
--- sound/soc/sof/ipc3-dtrace.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-)
sound/soc/sof/ipc3-dtrace.c +2 -3
@@ -470,7 +470,7 @@ static int ipc3_dtrace_enable(struct snd_sof_dev *sdev)dev_err (sdev->dev,"Host dtrace init failed: %d\n" , ret);return ret; } -dev_dbg (sdev->dev,"%s: stream_tag: %d\n" , __func__, params.stream_tag); +dev_dbg (sdev->dev,"stream_tag: %d\n" , params.stream_tag);/* send IPC to the DSP */ priv->dtrace_state =SOF_DTRACE_INITIALIZING ;
@@ -544,8 +544,7 @@ static int ipc3_dtrace_init(struct snd_sof_dev *sdev) goto table_err; priv->dma_trace_pages = ret; -dev_dbg (sdev->dev,"%s: dma_trace_pages: %d\n" , __func__, - priv->dma_trace_pages); +dev_dbg (sdev->dev,"dma_trace_pages: %d\n" , priv->dma_trace_pages);if (sdev->first_boot) { ret =debugfs_create_dtrace (sdev);
Signature · 1 line
2.34.1
PATCH 7/13 ASoC: SOF: ipc3-loader: remove use of __func__ in dev_dbg
In reply to Pierre-Louis BossartThe module and function information can be added with 'modprobe foo dyndbg=+pmf'
--- sound/soc/sof/ipc3-loader.c | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-)
sound/soc/sof/ipc3-loader.c +5 -6
@@ -75,13 +75,12 @@ static int ipc3_fw_ext_man_get_config_data(struct snd_sof_dev *sdev, elems_size = config->hdr.size -sizeof (struct sof_ext_man_elem_header ); elems_counter = elems_size /sizeof (struct sof_config_elem ); -dev_dbg (sdev->dev,"%s can hold up to %d config elements\n" , - __func__, elems_counter); +dev_dbg (sdev->dev,"manifest can hold up to %d config elements\n" , elems_counter);for (i =0 ; i < elems_counter; ++i) { elem = &config->elems[i]; -dev_dbg (sdev->dev,"%s get index %d token %d val %d\n" , - __func__, i, elem->token, elem->value); +dev_dbg (sdev->dev,"get index %d token %d val %d\n" , + i, elem->token, elem->value);switch (elem->token) {case SOF_EXT_MAN_CONFIG_EMPTY :/* unused memory space is zero filled - mapped to EMPTY elements */
@@ -323,10 +322,10 @@ static int sof_ipc3_load_fw_to_dsp(struct snd_sof_dev *sdev) header = (struct snd_sof_fw_header *)(fw->data + plat_data->fw_offset); load_module =sof_ops (sdev)->load_module;if (!load_module) { -dev_dbg (sdev->dev,"%s: Using generic module loading\n" , __func__); +dev_dbg (sdev->dev,"Using generic module loading\n" ); load_module = sof_ipc3_parse_module_memcpy; }else { -dev_dbg (sdev->dev,"%s: Using custom module loading\n" , __func__); +dev_dbg (sdev->dev,"Using custom module loading\n" ); }/* parse each module */
Signature · 1 line
2.34.1
PATCH 8/13 ASoC: SOF: ipc3-topology: remove use of __func__ in dev_dbg
In reply to Pierre-Louis BossartThe module and function information can be added with 'modprobe foo dyndbg=+pmf'
--- sound/soc/sof/ipc3-topology.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
sound/soc/sof/ipc3-topology.c +2 -2
@@ -1452,8 +1452,8 @@ static int sof_ipc3_widget_setup_comp_dai(struct snd_sof_widget *swidget)if (ret <0 ) goto free; -dev_dbg (scomp->dev,"%s dai %s: type %d index %d\n" , - __func__, swidget->widget->name, comp_dai->type, comp_dai->dai_index); +dev_dbg (scomp->dev,"dai %s: type %d index %d\n" , + swidget->widget->name, comp_dai->type, comp_dai->dai_index);sof_dbg_comp_config (scomp, &comp_dai->config);/* now update DAI config */
Signature · 1 line
2.34.1
PATCH 9/13 ASoC: SOF: ipc4-topology remove use of __func__ in dev_dbg
In reply to Pierre-Louis BossartThe module and function information can be added with 'modprobe foo dyndbg=+pmf'
--- sound/soc/sof/ipc4-topology.c | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-)
sound/soc/sof/ipc4-topology.c +9 -9
@@ -804,8 +804,8 @@ static int sof_ipc4_init_audio_fmt(struct snd_sof_dev *sdev, valid_bits =SOF_IPC4_AUDIO_FORMAT_CFG_V_BIT_DEPTH (fmt->fmt_cfg);if (params_rate (params) == rate &¶ms_channels (params) == channels && sample_valid_bits == valid_bits) { -dev_dbg (sdev->dev,"%s: matching audio format index for %uHz, %ubit, %u channels: %d\n" , - __func__, rate, valid_bits, channels, i); +dev_dbg (sdev->dev,"matching audio format index for %uHz, %ubit, %u channels: %d\n" , + rate, valid_bits, channels, i);/* copy ibs/obs and input format */ memcpy(base_config, &available_fmt->base_config[i],
@@ -919,8 +919,8 @@ static int snd_sof_get_hw_config_params(struct snd_sof_dev *sdev, struct snd_sof *channel_count =le32_to_cpu (hw_config->tdm_slots); *sample_rate =le32_to_cpu (hw_config->fsync_rate); -dev_dbg (sdev->dev,"%s: sample rate: %d sample width: %d channels: %d\n" , - __func__, *sample_rate, *bit_depth, *channel_count); +dev_dbg (sdev->dev,"sample rate: %d sample width: %d channels: %d\n" , + *sample_rate, *bit_depth, *channel_count);return 0 ; }
@@ -954,8 +954,8 @@ static int snd_sof_get_nhlt_endpoint_data(struct snd_sof_dev *sdev, struct snd_sreturn 0 ; } -dev_dbg (sdev->dev,"%s: dai index %d nhlt type %d direction %d\n" , - __func__, dai_index, nhlt_type, dir); +dev_dbg (sdev->dev,"dai index %d nhlt type %d direction %d\n" , + dai_index, nhlt_type, dir);/* find NHLT blob with matching params */ cfg = intel_nhlt_get_endpoint_blob(sdev->dev, ipc4_data->nhlt, dai_index, nhlt_type,
@@ -1005,7 +1005,7 @@ sof_ipc4_prepare_copier_module(struct snd_sof_widget *swidget,u32 **data;int ipc_size, ret; -dev_dbg (sdev->dev,"%s: copier %s, type %d" , __func__, swidget->widget->name, swidget->id); +dev_dbg (sdev->dev,"copier %s, type %d" , swidget->widget->name, swidget->id);switch (swidget->id) {case snd_soc_dapm_aif_in:
@@ -1446,7 +1446,7 @@ static int sof_ipc4_route_setup(struct snd_sof_dev *sdev, struct snd_sof_route *int dst_queue =0 ;int ret; -dev_dbg (sdev->dev,"%s: bind %s -> %s\n" , __func__, +dev_dbg (sdev->dev,"bind %s -> %s\n" , src_widget->widget->name, sink_widget->widget->name); header = src_fw_module->man4_module_entry.id;
@@ -1483,7 +1483,7 @@ static int sof_ipc4_route_free(struct snd_sof_dev *sdev, struct snd_sof_route *sint dst_queue =0 ;int ret; -dev_dbg (sdev->dev,"%s: unbind modules %s -> %s\n" , __func__, +dev_dbg (sdev->dev,"unbind modules %s -> %s\n" , src_widget->widget->name, sink_widget->widget->name); header = src_fw_module->man4_module_entry.id;
Signature · 1 line
2.34.1
PATCH 10/13 ASoC: SOF: sof-client: remove use of __func__ in dev_dbg
In reply to Pierre-Louis BossartThe module and function information can be added with 'modprobe foo dyndbg=+pmf'
--- sound/soc/sof/sof-client.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
sound/soc/sof/sof-client.c +2 -2
@@ -383,8 +383,8 @@ void sof_client_ipc_rx_dispatcher(struct snd_sof_dev *sdev, void *msg_buf) msg_type =SOF_IPC4_NOTIFICATION_TYPE_GET (msg->primary); }else { -dev_dbg_once (sdev->dev,"%s: Not supported IPC version: %d\n" , - __func__, sdev->pdata->ipc_type); +dev_dbg_once (sdev->dev,"Not supported IPC version: %d\n" , + sdev->pdata->ipc_type);return ; }
Signature · 1 line
2.34.1
PATCH 11/13 ASoC: SOF: ipc4: remove use of __func__ in dev_dbg
In reply to Pierre-Louis BossartThe module and function information can be added with 'modprobe foo dyndbg=+pmf'
--- sound/soc/sof/ipc4.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
sound/soc/sof/ipc4.c +1 -1
@@ -574,7 +574,7 @@ static void sof_ipc4_rx_msg(struct snd_sof_dev *sdev) data_size =sizeof (struct sof_ipc4_notify_resource_data );break ;default : -dev_dbg (sdev->dev,"%s: Unhandled DSP message: %#x|%#x\n" , __func__, +dev_dbg (sdev->dev,"Unhandled DSP message: %#x|%#x\n" , ipc4_msg->primary, ipc4_msg->extension);break ; }
Signature · 1 line
2.34.1
PATCH 12/13 ASoC: Intel: boards: hda: remove use of __func__ in dev_dbg
In reply to Pierre-Louis BossartThe module and function information can be added with 'modprobe foo dyndbg=+pmf'
--- sound/soc/intel/boards/hda_dsp_common.c | 4 ++-- sound/soc/intel/boards/skl_hda_dsp_generic.c | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-)
sound/soc/intel/boards/hda_dsp_common.c +2 -2
@@ -62,8 +62,8 @@ int hda_dsp_hdmi_build_controls(struct snd_soc_card *card, hpcm->pcm = spcm; hpcm->device = spcm->device;dev_dbg (card->dev, -"%s: mapping HDMI converter %d to PCM %d (%p)\n" , - __func__, i, hpcm->device, spcm); +"mapping HDMI converter %d to PCM %d (%p)\n" , + i, hpcm->device, spcm); }else { hpcm->pcm =NULL ; hpcm->device =SNDRV_PCM_INVALID_DEVICE ;
sound/soc/intel/boards/skl_hda_dsp_generic.c +2 -2
@@ -75,7 +75,7 @@ skl_hda_add_dai_link(struct snd_soc_card *card, struct snd_soc_dai_link *link)struct skl_hda_private *ctx =snd_soc_card_get_drvdata (card);int ret =0 ; -dev_dbg (card->dev,"%s: dai link name - %s\n" , __func__, link->name); +dev_dbg (card->dev,"dai link name - %s\n" , link->name); link->platforms->name = ctx->platform_name; link->nonatomic =1 ;
@@ -203,7 +203,7 @@ static int skl_hda_audio_probe(struct platform_device *pdev)struct skl_hda_private *ctx;int ret; -dev_dbg (&pdev->dev,"%s: entry\n" , __func__); +dev_dbg (&pdev->dev,"entry\n" ); ctx =devm_kzalloc (&pdev->dev,sizeof (*ctx),GFP_KERNEL );if (!ctx)
Signature · 1 line
2.34.1
Re: [PATCH 12/13] ASoC: Intel: boards: hda: remove use of __func__ in dev_dbg
Quoted 2 lines · Pierre-Louis Bossart
The module and function information can be added with 'modprobe foo dyndbg=+pmf'
LGTM
PATCH 13/13 ASoC: Intel: boards: sof_sdw: remove use of __func__ in dev_dbg
In reply to Pierre-Louis BossartThe module and function information can be added with 'modprobe foo dyndbg=+pmf'
--- sound/soc/intel/boards/sof_sdw.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
sound/soc/intel/boards/sof_sdw.c +1 -1
@@ -1447,7 +1447,7 @@ static int mc_probe(struct platform_device *pdev)int amp_num =0 , i;int ret; -dev_dbg (&pdev->dev,"Entry %s\n" , __func__); +dev_dbg (&pdev->dev,"Entry\n" ); ctx =devm_kzalloc (&pdev->dev,sizeof (*ctx),GFP_KERNEL );if (!ctx)
Signature · 1 line
2.34.1
Mark Brown
maintainerQuoted 8 lines · Pierre-Louis Bossart
Cleanups suggested by Greg KH during SoundWire reviews, since the
__func__information can be added with the dyndbg kernel parameter [1].The first two patches change the error level in cases where the use of
dev_dbg()was inconsistent with an aborted programming sequence.[...]
Applied to
https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git for-next
Thanks!
[01/13] ASoC: SOF: Intel: hda-dsp: report error on power-up/down
commit: 6d5e37b0f343af70a7e824641f264fb140bbead5
[02/13] ASoC: SOF: Intel: hda-stream: report error on stream not opened
commit: 3abc88730a0e45247296a561a12e811b5d2d2236
[03/13] ASoC: SOF: Intel: hda-dai: remove use of __func__ in dev_dbg
commit: 18701bb1370cb6b34a8f3ad820045930138083dc
[04/13] ASoC: SOF: Intel: hda-stream: remove use of __func__ in dev_dbg
commit: 8bf064f8e439d9b92a023a54adc657f920f4e1a8
[05/13] ASoC: SOF: Intel: mtl: remove use of __func__ in dev_dbg
commit: b837870fe17f21cf80b15d143c9ea0bc6b342741
[06/13] ASoC: SOF: ipc3-dtrace: remove use of __func__ in dev_dbg
commit: 9fd8fcd03451ea3f04af9a419748248d3fa8fb59
[07/13] ASoC: SOF: ipc3-loader: remove use of __func__ in dev_dbg
commit: e16809a74f09b2c2e066b3d7cf1d87be2a75911e
[08/13] ASoC: SOF: ipc3-topology: remove use of __func__ in dev_dbg
commit: f132dc020270976fe83c86f8c826890873023980
[09/13] ASoC: SOF: ipc4-topology remove use of __func__ in dev_dbg
commit: 3809264b53906b8b666b93831ecc23a00e119b68
[10/13] ASoC: SOF: sof-client: remove use of __func__ in dev_dbg
commit: 298e3aba1b56d19dcb70e10ffe93057d1ddd18f6
[11/13] ASoC: SOF: ipc4: remove use of __func__ in dev_dbg
commit: b3ec3eb2baaad057631ab7e09c38ab3ad5c7a42b
[12/13] ASoC: Intel: boards: hda: remove use of __func__ in dev_dbg
commit: 46bc6bc3a6a3af5306e8e3320a083cf3c32350d4
[13/13] ASoC: Intel: boards: sof_sdw: remove use of __func__ in dev_dbg
commit: d2d19cb6ed13eb54dd6c958f3808a23820c3ebbaAll being well this means that it will be integrated into the linux-next tree (usually sometime in the next 24 hours) and sent to Linus during the next merge window (or sooner if it is a bug fix), however if problems are discovered then the patch may be dropped or reverted.
You may get further e-mails resulting from automated or manual testing and review of the tree, please engage with people reporting problems and send followup patches addressing any issues that are reported if needed.
If any updates are required or you are submitting further changes they should be sent as incremental updates against current git, existing patches will not be replaced.
Please add any relevant lists and maintainers to the CCs when replying to this mail.
Thanks,
Mark