All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] [media] atomisp: don't treat warnings as errors
@ 2017-05-18  8:45 Mauro Carvalho Chehab
  2017-05-18  9:05 ` Arnd Bergmann
  0 siblings, 1 reply; 3+ messages in thread
From: Mauro Carvalho Chehab @ 2017-05-18  8:45 UTC (permalink / raw)
  Cc: Mauro Carvalho Chehab, Linux Media Mailing List,
	Mauro Carvalho Chehab, Greg Kroah-Hartman, Alan Cox,
	Arnd Bergmann, devel

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@s-opensource.com>
---
 drivers/staging/media/atomisp/i2c/Makefile          | 2 --
 drivers/staging/media/atomisp/i2c/imx/Makefile      | 2 --
 drivers/staging/media/atomisp/i2c/ov5693/Makefile   | 2 --
 drivers/staging/media/atomisp/pci/atomisp2/Makefile | 2 +-
 4 files changed, 1 insertion(+), 7 deletions(-)

diff --git a/drivers/staging/media/atomisp/i2c/Makefile b/drivers/staging/media/atomisp/i2c/Makefile
index 8ea01904c0ea..466517c7c8e6 100644
--- a/drivers/staging/media/atomisp/i2c/Makefile
+++ b/drivers/staging/media/atomisp/i2c/Makefile
@@ -19,5 +19,3 @@ obj-$(CONFIG_VIDEO_AP1302)     += ap1302.o
 
 obj-$(CONFIG_VIDEO_LM3554) += lm3554.o
 
-ccflags-y += -Werror
-
diff --git a/drivers/staging/media/atomisp/i2c/imx/Makefile b/drivers/staging/media/atomisp/i2c/imx/Makefile
index 1d7f7ab94cac..6b13a3a66e49 100644
--- a/drivers/staging/media/atomisp/i2c/imx/Makefile
+++ b/drivers/staging/media/atomisp/i2c/imx/Makefile
@@ -4,5 +4,3 @@ imx1x5-objs := imx.o drv201.o ad5816g.o dw9714.o dw9719.o dw9718.o vcm.o otp.o o
 
 ov8858_driver-objs := ../ov8858.o dw9718.o vcm.o
 obj-$(CONFIG_VIDEO_OV8858)     += ov8858_driver.o
-
-ccflags-y += -Werror
diff --git a/drivers/staging/media/atomisp/i2c/ov5693/Makefile b/drivers/staging/media/atomisp/i2c/ov5693/Makefile
index fceb9e9b881b..c9c0e1245858 100644
--- a/drivers/staging/media/atomisp/i2c/ov5693/Makefile
+++ b/drivers/staging/media/atomisp/i2c/ov5693/Makefile
@@ -1,3 +1 @@
 obj-$(CONFIG_VIDEO_OV5693) += ov5693.o
-
-ccflags-y += -Werror
diff --git a/drivers/staging/media/atomisp/pci/atomisp2/Makefile b/drivers/staging/media/atomisp/pci/atomisp2/Makefile
index 3fa7c1c1479f..f126a89a08e9 100644
--- a/drivers/staging/media/atomisp/pci/atomisp2/Makefile
+++ b/drivers/staging/media/atomisp/pci/atomisp2/Makefile
@@ -351,5 +351,5 @@ DEFINES := -DHRT_HW -DHRT_ISP_CSS_CUSTOM_HOST -DHRT_USE_VIR_ADDRS -D__HOST__
 DEFINES += -DATOMISP_POSTFIX=\"css2400b0_v21\" -DISP2400B0
 DEFINES += -DSYSTEM_hive_isp_css_2400_system -DISP2400
 
-ccflags-y += $(INCLUDES) $(DEFINES) -fno-common -Werror
+ccflags-y += $(INCLUDES) $(DEFINES) -fno-common
 
-- 
2.9.3

^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH] [media] atomisp: don't treat warnings as errors
  2017-05-18  8:45 [PATCH] [media] atomisp: don't treat warnings as errors Mauro Carvalho Chehab
@ 2017-05-18  9:05 ` Arnd Bergmann
  2017-05-18 10:00   ` Mauro Carvalho Chehab
  0 siblings, 1 reply; 3+ messages in thread
From: Arnd Bergmann @ 2017-05-18  9:05 UTC (permalink / raw)
  To: Mauro Carvalho Chehab
  Cc: Linux Media Mailing List, Mauro Carvalho Chehab,
	Greg Kroah-Hartman, Alan Cox, devel

On Thu, May 18, 2017 at 10:45 AM, Mauro Carvalho Chehab
<mchehab@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@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

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] [media] atomisp: don't treat warnings as errors
  2017-05-18  9:05 ` Arnd Bergmann
@ 2017-05-18 10:00   ` Mauro Carvalho Chehab
  0 siblings, 0 replies; 3+ messages in thread
From: Mauro Carvalho Chehab @ 2017-05-18 10:00 UTC (permalink / raw)
  To: Arnd Bergmann
  Cc: Linux Media Mailing List, Mauro Carvalho Chehab,
	Greg Kroah-Hartman, Alan Cox, devel

Em Thu, 18 May 2017 11:05:24 +0200
Arnd Bergmann <arnd@arndb.de> escreveu:

> On Thu, May 18, 2017 at 10:45 AM, Mauro Carvalho Chehab
> <mchehab@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@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

That sounds very promising!

> 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?

Yeah, sure!

Thanks,
Mauro

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2017-05-18 10:00 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-05-18  8:45 [PATCH] [media] atomisp: don't treat warnings as errors Mauro Carvalho Chehab
2017-05-18  9:05 ` Arnd Bergmann
2017-05-18 10:00   ` Mauro Carvalho Chehab

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.