Skip to content

CI: add W=1 option to SOF compilation #405

Closed

Description

@plbossart

Reported-by: @andy-shev. Adding this option helps find issues such as below (and stop with warning as errors to make sure people fix them).

  WARNING: Symbol version dump ./Module.symvers
           is missing; modules will have no dependencies and modversions.

  CC [M]  sound/soc/sof/intel/byt.o
  LD [M]  sound/soc/sof/intel/snd-sof-intel-byt.o
  CC [M]  sound/soc/sof/intel/hsw.o
  LD [M]  sound/soc/sof/intel/snd-sof-intel-hsw.o
  CC [M]  sound/soc/sof/intel/bdw.o
  LD [M]  sound/soc/sof/intel/snd-sof-intel-bdw.o
  CC [M]  sound/soc/sof/intel/hda.o
  CC [M]  sound/soc/sof/intel/hda-loader.o
  CC [M]  sound/soc/sof/intel/hda-stream.o
  CC [M]  sound/soc/sof/intel/hda-trace.o
  CC [M]  sound/soc/sof/intel/hda-dsp.o
  CC [M]  sound/soc/sof/intel/hda-ipc.o
  CC [M]  sound/soc/sof/intel/hda-ctrl.o
  CC [M]  sound/soc/sof/intel/hda-pcm.o
  CC [M]  sound/soc/sof/intel/hda-dai.o
sound/soc/sof/intel/hda-dai.c: In function ‘hda_link_hw_free’:
sound/soc/sof/intel/hda-dai.c:213:22: warning: variable ‘sdev’ set but not used [-Wunused-but-set-variable]
  struct snd_sof_dev *sdev;
                      ^~~~
  CC [M]  sound/soc/sof/intel/hda-bus.o
  CC [M]  sound/soc/sof/intel/hda-loader-skl.o
  CC [M]  sound/soc/sof/intel/skl.o
  CC [M]  sound/soc/sof/intel/apl.o
  CC [M]  sound/soc/sof/intel/cnl.o
  LD [M]  sound/soc/sof/intel/snd-sof-intel-hda-common.o
  CC [M]  sound/soc/sof/intel/hda-codec.o
  LD [M]  sound/soc/sof/intel/snd-sof-intel-hda.o
  CC [M]  sound/soc/sof/xtensa/core.o
  LD [M]  sound/soc/sof/xtensa/snd-sof-xtensa-dsp.o
  CC [M]  sound/soc/sof/core.o
  CC [M]  sound/soc/sof/ops.o
  CC [M]  sound/soc/sof/loader.o
  CC [M]  sound/soc/sof/ipc.o
  CC [M]  sound/soc/sof/pcm.o
  CC [M]  sound/soc/sof/pm.o
  CC [M]  sound/soc/sof/debug.o
sound/soc/sof/debug.c: In function ‘sof_dfsentry_read’:
sound/soc/sof/debug.c:62:10: warning: comparison of unsigned expression < 0 is always false [-Wtype-limits]
  if (ret < 0)
          ^
  CC [M]  sound/soc/sof/topology.o
sound/soc/sof/topology.c: In function ‘sof_control_load_volume’:
sound/soc/sof/topology.c:261:28: warning: variable ‘cdata’ set but not used [-Wunused-but-set-variable]
  struct sof_ipc_ctrl_data *cdata;
                            ^~~~~
sound/soc/sof/topology.c: In function ‘snd_sof_load_topology’:
sound/soc/sof/topology.c:2711:27: warning: variable ‘hdr’ set but not used [-Wunused-but-set-variable]
  struct snd_soc_tplg_hdr *hdr;
                           ^~~
  CC [M]  sound/soc/sof/control.o
  CC [M]  sound/soc/sof/trace.o
  CC [M]  sound/soc/sof/utils.o
  CC [M]  sound/soc/sof/compressed.o
  LD [M]  sound/soc/sof/snd-sof.o
  CC [M]  sound/soc/sof/nocodec.o
  LD [M]  sound/soc/sof/snd-sof-nocodec.o
  CC [M]  sound/soc/sof/sof-acpi-dev.o
  CC [M]  sound/soc/sof/sof-pci-dev.o
  CC [M]  sound/soc/sof/sof-spi-dev.o
sound/soc/sof/sof-spi-dev.c:25:32: warning: ‘spi_pm’ defined but not used [-Wunused-const-variable=]
 static const struct dev_pm_ops spi_pm = {
                                ^~~~~~
  CC [M]  sound/soc/sof/hw-spi.o
sound/soc/sof/hw-spi.c: In function ‘spi_irq_handler’:
sound/soc/sof/hw-spi.c:161:22: warning: comparison of unsigned expression >= 0 is always true [-Wtype-limits]
  if (sof_pdata->gpio >= 0 &&
                      ^~
  LD [M]  sound/soc/sof/snd-sof-spi.o
  Building modules, stage 2.
  MODPOST 12 modules
  CC      sound/soc/sof/intel/snd-sof-intel-bdw.mod.o
  LD [M]  sound/soc/sof/intel/snd-sof-intel-bdw.ko
  CC      sound/soc/sof/intel/snd-sof-intel-byt.mod.o
  LD [M]  sound/soc/sof/intel/snd-sof-intel-byt.ko
  CC      sound/soc/sof/intel/snd-sof-intel-hda-common.mod.o
  LD [M]  sound/soc/sof/intel/snd-sof-intel-hda-common.ko
  CC      sound/soc/sof/intel/snd-sof-intel-hda.mod.o
  LD [M]  sound/soc/sof/intel/snd-sof-intel-hda.ko
  CC      sound/soc/sof/intel/snd-sof-intel-hsw.mod.o
  LD [M]  sound/soc/sof/intel/snd-sof-intel-hsw.ko
  CC      sound/soc/sof/snd-sof-nocodec.mod.o
  LD [M]  sound/soc/sof/snd-sof-nocodec.ko
  CC      sound/soc/sof/snd-sof-spi.mod.o
  LD [M]  sound/soc/sof/snd-sof-spi.ko
  CC      sound/soc/sof/snd-sof.mod.o
  LD [M]  sound/soc/sof/snd-sof.ko
  CC      sound/soc/sof/sof-acpi-dev.mod.o
  LD [M]  sound/soc/sof/sof-acpi-dev.ko
  CC      sound/soc/sof/sof-pci-dev.mod.o
  LD [M]  sound/soc/sof/sof-pci-dev.ko
  CC      sound/soc/sof/sof-spi-dev.mod.o
  LD [M]  sound/soc/sof/sof-spi-dev.ko
  CC      sound/soc/sof/xtensa/snd-sof-xtensa-dsp.mod.o
  LD [M]  sound/soc/sof/xtensa/snd-sof-xtensa-dsp.ko

Activity

  1. xiulipan commented on Dec 12, 2018

    @xiulipan

    @plbossart
    Where is this log comes from?
    In travis-ci I added the Werror flag for linux kernel build

  2. plbossart commented on Dec 12, 2018

    @plbossart
    MemberAuthor

    @xiulipan this log just comes from my local compilation with make SUBDIRS=sound/soc/sof W=1
    I am not sure your script works in the same way or it would have flagged these errors, no?

  3. xiulipan commented on Dec 13, 2018

    @xiulipan

    @plbossart
    I will test that, so this is only needed with in sound/soc/sof or all build?

  4. plbossart commented on Dec 13, 2018

    @plbossart
    MemberAuthor

    @plbossart
    I will test that, so this is only needed with in sound/soc/sof or all build?

    Yes make SUBDIRS=sound/soc/sof W=1 is good enough. We don't have to fail on someone else's problems

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

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