[PATCH] [media] atomisp: don't treat warnings as errors

Arnd Bergmann arnd at arndb.de
Thu May 18 09:05:24 UTC 2017


On Thu, May 18, 2017 at 10:45 AM, Mauro Carvalho Chehab
<mchehab at s-opensource.com> wrote:
> Several atomisp files use:
>          ccflags-y += -Werror
>
> As, on media, our usual procedure is to use W=1, and atomisp
> has *a lot* of warnings with such flag enabled,like:
>
> ./drivers/staging/media/atomisp/pci/atomisp2/css2400/hive_isp_css_common/host/system_local.h:62:26: warning: 'DDR_BASE' defined but not used [-Wunused-const-variable=]
>
> At the end, it causes our build to fail, impacting our workflow.
>
> So, remove this crap. If one wants to force -Werror, he
> can still build with it enabled by passing a parameter to
> make.
>
> Signed-off-by: Mauro Carvalho Chehab <mchehab at s-opensource.com>

Good idea.

On a related note, I have some plans for more fine-grained and more consisten
control of warning and error messages. The same way we already use W=1
or W=12, I would like to allow E=0 E=01 etc to turn warnings of a particular
W= level into errors, and possibly even allow this on a per-file or
per-directory
basis. It depends on some infrastructure to replace scripts/Makefile.extrawarn
with a include/linux/compiler-warnings.h using _Pragma("GCC diagnostic ..."),
but that infrastructure has other benefits as well.

Would you be interested in having the equivalent of W=1 (some extra warnings)
or E=0 (default warnings become errors) enabled for drivers/media if we had
a good way of doing that?

      Arnd


More information about the devel mailing list