Static code analyzer annotations in driver code?
Jani Nikula
jani.nikula at linux.intel.com
Thu Jan 5 11:38:22 UTC 2017
On Wed, 04 Jan 2017, Thomas Hellstrom <thellstrom at vmware.com> wrote:
> What is the general opinion about out-of-tree static analyzer
> annotations in drm driver code, for example comments like
>
> /* coverity[missing_lock] */
>
> which typically squelches false positives in constructors or destructors
> of refcounted structs that contain members that are elsewhere protected
> by locks.
It's not about out-of-tree, it's about proprietary. We already have
annotations for sparse, though they're extra attributes rather than
comments. Anyone can run sparse, or other open source tools. Not so with
properietary tools. When you don't have the crowds maintaining the
annotations, they will bitrot, becoming just stale comments in source.
I know the intention is good, but I'm not convinced.
BR,
Jani.
--
Jani Nikula, Intel Open Source Technology Center
More information about the dri-devel
mailing list