sof icon indicating copy to clipboard operation
sof copied to clipboard

[SKIP CI] .github/sparse: add MTL

Open marc-hb opened this issue 3 years ago • 4 comments

Add the wrong compiler currently expected by the Zephyr build system, very easy one-line change later, get sparse results for MTL NOW!

Signed-off-by: Marc Herbert [email protected]

marc-hb avatar Oct 10 '22 17:10 marc-hb

https://github.com/thesofproject/sof/actions/runs/3221338104/jobs/5269150847 successfully sparsing MTL with the wrong compiler - which does not matter.

marc-hb avatar Oct 10 '22 18:10 marc-hb

BTW, we already managed to accumulate 14 sparse warnings as can be seen in this PR despite the sparse green status:

/zep_workspace/sof/src/audio/module_adapter/module/volume/volume_generic.c:59:61: warning: incorrect type in initializer (different address spaces)
/zep_workspace/sof/src/audio/module_adapter/module/volume/volume_generic.c:59:61:    expected struct audio_stream __cache *source
/zep_workspace/sof/src/audio/module_adapter/module/volume/volume_generic.c:59:61:    got void *data
/zep_workspace/sof/src/audio/module_adapter/module/volume/volume_generic.c:60:57: warning: incorrect type in initializer (different address spaces)
/zep_workspace/sof/src/audio/module_adapter/module/volume/volume_generic.c:60:57:    expected struct audio_stream __cache *sink
/zep_workspace/sof/src/audio/module_adapter/module/volume/volume_generic.c:60:57:    got void *data
/zep_workspace/sof/src/audio/module_adapter/module/volume/volume_generic.c:122:61: warning: incorrect type in initializer (different address spaces)
/zep_workspace/sof/src/audio/module_adapter/module/volume/volume_generic.c:122:61:    expected struct audio_stream __cache *source
/zep_workspace/sof/src/audio/module_adapter/module/volume/volume_generic.c:122:61:    got void *data
/zep_workspace/sof/src/audio/module_adapter/module/volume/volume_generic.c:123:57: warning: incorrect type in initializer (different address spaces)
/zep_workspace/sof/src/audio/module_adapter/module/volume/volume_generic.c:123:57:    expected struct audio_stream __cache *sink
/zep_workspace/sof/src/audio/module_adapter/module/volume/volume_generic.c:123:57:    got void *data
/zep_workspace/sof/src/audio/module_adapter/module/volume/volume_generic.c:189:61: warning: incorrect type in initializer (different address spaces)
/zep_workspace/sof/src/audio/module_adapter/module/volume/volume_generic.c:189:61:    expected struct audio_stream __cache *source
/zep_workspace/sof/src/audio/module_adapter/module/volume/volume_generic.c:189:61:    got void *data
/zep_workspace/sof/src/audio/module_adapter/module/volume/volume_generic.c:190:57: warning: incorrect type in initializer (different address spaces)
/zep_workspace/sof/src/audio/module_adapter/module/volume/volume_generic.c:190:57:    expected struct audio_stream __cache *sink
/zep_workspace/sof/src/audio/module_adapter/module/volume/volume_generic.c:190:57:    got void *data

...

/zep_workspace/sof/src/audio/module_adapter/module_adapter.c:173:56: warning: incorrect type in argument 1 (different address spaces)
/zep_workspace/sof/src/audio/module_adapter/module_adapter.c:173:56:    expected struct audio_stream const __cache *buf
/zep_workspace/sof/src/audio/module_adapter/module_adapter.c:173:56:    got struct audio_stream *
/zep_workspace/sof/src/audio/module_adapter/module_adapter.c:273:44: warning: incorrect type in assignment (different address spaces)
/zep_workspace/sof/src/audio/module_adapter/module_adapter.c:273:44:    expected void *data
/zep_workspace/sof/src/audio/module_adapter/module_adapter.c:273:44:    got void __cache *
/zep_workspace/sof/src/audio/module_adapter/module_adapter.c:286:45: warning: incorrect type in assignment (different address spaces)
/zep_workspace/sof/src/audio/module_adapter/module_adapter.c:286:45:    expected void *data
/zep_workspace/sof/src/audio/module_adapter/module_adapter.c:286:45:    got void __cache *
/zep_workspace/sof/src/audio/module_adapter/module_adapter.c:549:94: warning: incorrect type in argument 2 (different address spaces)
/zep_workspace/sof/src/audio/module_adapter/module_adapter.c:549:94:    expected void __cache *buff
/zep_workspace/sof/src/audio/module_adapter/module_adapter.c:549:94:    got void *data
/zep_workspace/sof/src/audio/module_adapter/module_adapter.c:620:44: warning: incorrect type in assignment (different address spaces)
/zep_workspace/sof/src/audio/module_adapter/module_adapter.c:620:44:    expected void *data
/zep_workspace/sof/src/audio/module_adapter/module_adapter.c:620:44:    got struct audio_stream __cache *
/zep_workspace/sof/src/audio/module_adapter/module_adapter.c:621:45: warning: incorrect type in assignment (different address spaces)
/zep_workspace/sof/src/audio/module_adapter/module_adapter.c:621:45:    expected void *data
/zep_workspace/sof/src/audio/module_adapter/module_adapter.c:621:45:    got struct audio_stream __cache *
/zep_workspace/sof/src/audio/module_adapter/module_adapter.c:652:95: warning: incorrect type in argument 2 (different address spaces)
/zep_workspace/sof/src/audio/module_adapter/module_adapter.c:652:95:    expected void __cache *buff
/zep_workspace/sof/src/audio/module_adapter/module_adapter.c:652:95:    got void *data

lyakh avatar Oct 11 '22 10:10 lyakh

@lyakh https://github.com/thesofproject/sof/actions/runs/3221338104/jobs/5269150847 prints hundreds if not thousands of warnings, always has. I'm guessing (different address spaces) is what makes these more important?

As found in #6311 and before and explained in comments in the source, sparse is not designed for CI: its exit status is meaningless. So I will add a grep-based wrapper workaround in the build as soon as I'm freed from putting out other fires but I need to know what specific warnings and what you're already grepping for. warning.*different address spaces, anything else?

Anyway this should certainly not delay this PR which will provide more testing for the workaround.

EDIT: "different address spaces" warning example in https://github.com/thesofproject/sof/pull/6343#issuecomment-1285184530 with (unmerged) commit https://github.com/thesofproject/sof/commits/9bceaf6711a7963738a3690f617b45674cd646d6

marc-hb avatar Oct 17 '22 22:10 marc-hb

@lyakh https://github.com/thesofproject/sof/actions/runs/3221338104/jobs/5269150847 prints hundreds if not thousands of warnings, always has. I'm guessing (different address spaces) is what makes these more important?

As found in #6311 and before and explained in comments in the source, sparse is not designed for CI: its exit status is meaningless. So I will add a grep-based wrapper workaround in the build as soon as I'm freed from putting out other fires but I need to know what specific warnings and what you're already grepping for. warning.*different address spaces, anything else?

Anyway this should certainly not delay this PR which will provide more testing for the workaround.

Depends on whether you enforce non-zero exit code on errors. If you do (and I'd say we want that), then only "different address spaces," yes. If you don't, then I'd also grep for the "error:" string

lyakh avatar Oct 18 '22 06:10 lyakh

So I will add a grep-based wrapper workaround in the build as soon as I'm freed from putting out other fires

Done:

  • #6510

marc-hb avatar Nov 01 '22 03:11 marc-hb