Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

ASoC: SOF: remove unused functions

hda_dsp_dump_skl() is never used and hda_dsp_get_status_skl() is
only called from that function. Remove both functions.

Reviewed-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
Reviewed-by: Keyon Jie <yang.jie@intel.com>
Signed-off-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Link: https://lore.kernel.org/r/20210208232149.58899-4-pierre-louis.bossart@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>

authored by

Guennadi Liakhovetski and committed by
Mark Brown
3be46fa2 ce1f55ba

-51
-50
sound/soc/sof/intel/hda.c
··· 317 317 {HDA_DSP_ROM_NULL_FW_ENTRY, "error: null FW entry point"}, 318 318 }; 319 319 320 - static void hda_dsp_get_status_skl(struct snd_sof_dev *sdev) 321 - { 322 - u32 status; 323 - int i; 324 - 325 - status = snd_sof_dsp_read(sdev, HDA_DSP_BAR, 326 - HDA_ADSP_FW_STATUS_SKL); 327 - 328 - for (i = 0; i < ARRAY_SIZE(hda_dsp_rom_msg); i++) { 329 - if (status == hda_dsp_rom_msg[i].code) { 330 - dev_err(sdev->dev, "%s - code %8.8x\n", 331 - hda_dsp_rom_msg[i].msg, status); 332 - return; 333 - } 334 - } 335 - 336 - /* not for us, must be generic sof message */ 337 - dev_dbg(sdev->dev, "unknown ROM status value %8.8x\n", status); 338 - } 339 - 340 320 static void hda_dsp_get_status(struct snd_sof_dev *sdev) 341 321 { 342 322 u32 status; ··· 363 383 offset += sizeof(*panic_info); 364 384 sof_block_read(sdev, sdev->mmio_bar, offset, stack, 365 385 stack_words * sizeof(u32)); 366 - } 367 - 368 - void hda_dsp_dump_skl(struct snd_sof_dev *sdev, u32 flags) 369 - { 370 - struct sof_ipc_dsp_oops_xtensa xoops; 371 - struct sof_ipc_panic_info panic_info; 372 - u32 stack[HDA_DSP_STACK_DUMP_SIZE]; 373 - u32 status, panic; 374 - 375 - /* try APL specific status message types first */ 376 - hda_dsp_get_status_skl(sdev); 377 - 378 - /* now try generic SOF status messages */ 379 - status = snd_sof_dsp_read(sdev, HDA_DSP_BAR, 380 - HDA_ADSP_ERROR_CODE_SKL); 381 - 382 - /*TODO: Check: there is no define in spec, but it is used in the code*/ 383 - panic = snd_sof_dsp_read(sdev, HDA_DSP_BAR, 384 - HDA_ADSP_ERROR_CODE_SKL + 0x4); 385 - 386 - if (sdev->fw_state == SOF_FW_BOOT_COMPLETE) { 387 - hda_dsp_get_registers(sdev, &xoops, &panic_info, stack, 388 - HDA_DSP_STACK_DUMP_SIZE); 389 - snd_sof_get_status(sdev, status, panic, &xoops, &panic_info, 390 - stack, HDA_DSP_STACK_DUMP_SIZE); 391 - } else { 392 - dev_err(sdev->dev, "error: status = 0x%8.8x panic = 0x%8.8x\n", 393 - status, panic); 394 - hda_dsp_get_status_skl(sdev); 395 - } 396 386 } 397 387 398 388 /* dump the first 8 dwords representing the extended ROM status */
-1
sound/soc/sof/intel/hda.h
··· 517 517 int hda_dsp_runtime_resume(struct snd_sof_dev *sdev); 518 518 int hda_dsp_runtime_idle(struct snd_sof_dev *sdev); 519 519 int hda_dsp_set_hw_params_upon_resume(struct snd_sof_dev *sdev); 520 - void hda_dsp_dump_skl(struct snd_sof_dev *sdev, u32 flags); 521 520 void hda_dsp_dump(struct snd_sof_dev *sdev, u32 flags); 522 521 void hda_ipc_dump(struct snd_sof_dev *sdev); 523 522 void hda_ipc_irq_dump(struct snd_sof_dev *sdev);