Skip to content

Build test errors of AMD #5438

Open
Open
@bardliao

Description

@bardliao

Sparse check reports

sound/soc/amd/acp/amd-acpi-mach.c:11:28: error: symbol 'amp_rt1019' was not declared. Should it be static?
sound/soc/amd/acp/amd-acpi-mach.c:16:28: error: symbol 'amp_max' was not declared. Should it be static?
sound/soc/amd/acp/amd-acpi-mach.c:21:26: error: symbol 'snd_soc_acpi_amd_acp_machines' was not declared. Should it be static?
sound/soc/amd/acp/amd-acpi-mach.c:52:26: error: symbol 'snd_soc_acpi_amd_rmb_acp_machines' was not declared. Should it be static?
sound/soc/amd/acp/amd-acpi-mach.c:73:26: error: symbol 'snd_soc_acpi_amd_acp63_acp_machines' was not declared. Should it be static?
sound/soc/amd/acp/amd-acpi-mach.c:82:26: error: symbol 'snd_soc_acpi_amd_acp70_acp_machines' was not declared. Should it be static?

And GCC static -fanalyzer reports

sound/soc/amd/acp/acp-legacy-common.c: In function ‘acp_irq_handler’:
sound/soc/amd/acp/acp-legacy-common.c:103:44: error: use of uninitialized value ‘ext_intr_stat1’ [CWE-457] [-Werror=analyzer-use-of-uninitialized-value]
  103 |                         if (ext_intr_stat1 & stream->irq_bit) {
      |                             ~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~
  ‘acp_irq_handler’: events 1-3
    |
    |   87 |         u32 ext_intr_stat, ext_intr_stat1;
    |      |                            ^~~~~~~~~~~~~~
    |      |                            |
    |      |                            (1) region created on stack here
    |      |                            (2) capacity: 4 bytes
    |   88 | 
    |   89 |         if (rsrc->no_of_ctrls == 2)
    |      |            ~                
    |      |            |
    |      |            (3) following ‘false’ branch...
    |
  ‘acp_irq_handler’: event 4
    |
    |sound/soc/amd/acp/chip_offset_byte.h:33:14:
    |   33 |         (chip->base + chip->rsrc->irq_reg_offset + offset + (ctrl * 0x04))
sound/soc/amd/acp/chip_offset_byte.h:37:44: note: in expansion of macro ‘ACP_EXTERNAL_INTR_REG_ADDR’
    |   37 | #define ACP_EXTERNAL_INTR_STAT(chip, ctrl) ACP_EXTERNAL_INTR_REG_ADDR(chip, \
    |      |                                            ^~~~~~~~~~~~~~~~~~~~~~~~~~
sound/soc/amd/acp/acp-legacy-common.c:92:31: note: in expansion of macro ‘ACP_EXTERNAL_INTR_STAT’
    |   92 |         ext_intr_stat = readl(ACP_EXTERNAL_INTR_STAT(chip, rsrc->irqp_used));
    |      |                               ^~~~~~~~~~~~~~~~~~~~~~
    |
  ‘acp_irq_handler’: event 5
    |
    |./include/linux/list.h:771:14:
    |  771 |              !list_entry_is_head(pos, head, member);                    \
    |      |              ^
    |      |              |
    |      |              (5) following ‘true’ branch...
sound/soc/amd/acp/acp-legacy-common.c:95:9: note: in expansion of macro ‘list_for_each_entry’
    |   95 |         list_for_each_entry(stream, &chip->stream_list, list) {
    |      |         ^~~~~~~~~~~~~~~~~~~
    |
  ‘acp_irq_handler’: events 6-9
    |
    |   96 |                 if (ext_intr_stat & stream->irq_bit) {
    |      |                                     ~~~~~~^~~~~~~~~
    |      |                                           |
    |      |                                           (6) ...to here
    |......
    |  102 |                 if (chip->rsrc->no_of_ctrls == 2) {
    |      |                    ~                       
    |      |                    |
    |      |                    (7) following ‘true’ branch...
    |  103 |                         if (ext_intr_stat1 & stream->irq_bit) {
    |      |                             ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    |      |                                            |       |
    |      |                                            |       (8) ...to here
    |      |                                            (9) use of uninitialized value ‘ext_intr_stat1’ here
    |
sound/soc/amd/acp/acp-legacy-common.c: In function ‘check_acp_config’:
sound/soc/amd/acp/acp-legacy-common.c:584:27: error: use of uninitialized value ‘pdm_addr’ [CWE-457] [-Werror=analyzer-use-of-uninitialized-value]
  584 |                 pdm_dev = acpi_find_child_device(ACPI_COMPANION(&pci->dev), pdm_addr, 0);
      |                           ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  ‘check_acp_config’: events 1-7
    |
    |  559 |         u32 pdm_addr, ret;
    |      |             ^~~~~~~~
    |      |             |
    |      |             (1) region created on stack here
    |      |             (2) capacity: 4 bytes
    |  560 | 
    |  561 |         switch (chip->acp_rev) {
    |      |         ~~~~~~
    |      |         |
    |      |         (3) following ‘default:’ branch...
    |......
    |  583 |         if (chip->is_pdm_config) {
    |      |            ~~~~~~~~~~~~~~~~~~~~
    |      |            |    |
    |      |            |    (4) ...to here
    |      |            (5) following ‘true’ branch...
    |  584 |                 pdm_dev = acpi_find_child_device(ACPI_COMPANION(&pci->dev), pdm_addr, 0);
    |      |                           ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    |      |                           |
    |      |                           (6) ...to here
    |      |                           (7) use of uninitialized value ‘pdm_addr’ here
    |
cc1: all warnings being treated as errors
make[6]: *** [scripts/Makefile.build:203: sound/soc/amd/acp/acp-legacy-common.o] Error 1

@vijendarmukunda Could you take a look?

Metadata

Metadata

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions