* [PATCH v2] drm/i915: Disable -Wuninitialized
@ 2019-01-26 7:11 Nathan Chancellor
2019-01-26 7:17 ` Nathan Chancellor
2019-01-26 7:34 ` Nick Desaulniers
0 siblings, 2 replies; 6+ messages in thread
From: Nathan Chancellor @ 2019-01-26 7:11 UTC (permalink / raw)
To: Jani Nikula, Joonas Lahtinen, Rodrigo Vivi
Cc: intel-gfx, dri-devel, linux-kernel, Nick Desaulniers,
Chris Wilson, Matthias Kaehlcke, Nathan Chancellor
This warning is disabled by default in scripts/Makefile.extrawarn when
W= is not provided but this Makefile adds -Wall after this warning is
disabled so it shows up in the build when it shouldn't:
In file included from drivers/gpu/drm/i915/intel_breadcrumbs.c:895:
drivers/gpu/drm/i915/selftests/intel_breadcrumbs.c:350:34: error:
variable 'wq' is uninitialized when used within its own initialization
[-Werror,-Wuninitialized]
DECLARE_WAIT_QUEUE_HEAD_ONSTACK(wq);
^~
./include/linux/wait.h:74:63: note: expanded from macro
'DECLARE_WAIT_QUEUE_HEAD_ONSTACK'
struct wait_queue_head name = __WAIT_QUEUE_HEAD_INIT_ONSTACK(name)
~~~~ ^~~~
./include/linux/wait.h:72:33: note: expanded from macro
'__WAIT_QUEUE_HEAD_INIT_ONSTACK'
({ init_waitqueue_head(&name); name; })
^~~~
1 error generated.
Explicitly disable the warning like commit 46e2068081e9 ("drm/i915:
Disable some extra clang warnings").
Link: https://github.com/ClangBuiltLinux/linux/issues/220
Signed-off-by: Nathan Chancellor <natechancellor@gmail.com>
---
v1 -> v2:
* Rather than disable the warning for the problematic folder, disable it
for the entire folder like Matthias's commit.
drivers/gpu/drm/i915/Makefile | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/gpu/drm/i915/Makefile b/drivers/gpu/drm/i915/Makefile
index 8300efe60fe1..210d0e8777b6 100644
--- a/drivers/gpu/drm/i915/Makefile
+++ b/drivers/gpu/drm/i915/Makefile
@@ -22,6 +22,7 @@ subdir-ccflags-y += $(call cc-disable-warning, unused-but-set-variable)
subdir-ccflags-y += $(call cc-disable-warning, sign-compare)
subdir-ccflags-y += $(call cc-disable-warning, sometimes-uninitialized)
subdir-ccflags-y += $(call cc-disable-warning, initializer-overrides)
+subdir-ccflags-y += $(call cc-disable-warning, uninitialized)
subdir-ccflags-$(CONFIG_DRM_I915_WERROR) += -Werror
# Fine grained warnings disable
--
2.20.1
^ permalink raw reply related [flat|nested] 6+ messages in thread
* Re: [PATCH v2] drm/i915: Disable -Wuninitialized
2019-01-26 7:11 [PATCH v2] drm/i915: Disable -Wuninitialized Nathan Chancellor
@ 2019-01-26 7:17 ` Nathan Chancellor
2019-01-26 7:34 ` Nick Desaulniers
1 sibling, 0 replies; 6+ messages in thread
From: Nathan Chancellor @ 2019-01-26 7:17 UTC (permalink / raw)
To: Jani Nikula, Joonas Lahtinen, Rodrigo Vivi
Cc: intel-gfx, dri-devel, linux-kernel, Nick Desaulniers,
Chris Wilson, Matthias Kaehlcke
On Sat, Jan 26, 2019 at 12:11:23AM -0700, Nathan Chancellor wrote:
> This warning is disabled by default in scripts/Makefile.extrawarn when
> W= is not provided but this Makefile adds -Wall after this warning is
> disabled so it shows up in the build when it shouldn't:
>
> In file included from drivers/gpu/drm/i915/intel_breadcrumbs.c:895:
> drivers/gpu/drm/i915/selftests/intel_breadcrumbs.c:350:34: error:
> variable 'wq' is uninitialized when used within its own initialization
> [-Werror,-Wuninitialized]
> DECLARE_WAIT_QUEUE_HEAD_ONSTACK(wq);
> ^~
> ./include/linux/wait.h:74:63: note: expanded from macro
> 'DECLARE_WAIT_QUEUE_HEAD_ONSTACK'
> struct wait_queue_head name = __WAIT_QUEUE_HEAD_INIT_ONSTACK(name)
> ~~~~ ^~~~
> ./include/linux/wait.h:72:33: note: expanded from macro
> '__WAIT_QUEUE_HEAD_INIT_ONSTACK'
> ({ init_waitqueue_head(&name); name; })
> ^~~~
> 1 error generated.
>
> Explicitly disable the warning like commit 46e2068081e9 ("drm/i915:
> Disable some extra clang warnings").
>
> Link: https://github.com/ClangBuiltLinux/linux/issues/220
> Signed-off-by: Nathan Chancellor <natechancellor@gmail.com>
> ---
>
> v1 -> v2:
>
> * Rather than disable the warning for the problematic folder, disable it
> for the entire folder like Matthias's commit.
>
Link to v1: https://lore.kernel.org/lkml/20181025193601.11746-1-natechancellor@gmail.com/
Since I forgot '--in-reply-to' :(
> drivers/gpu/drm/i915/Makefile | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/drivers/gpu/drm/i915/Makefile b/drivers/gpu/drm/i915/Makefile
> index 8300efe60fe1..210d0e8777b6 100644
> --- a/drivers/gpu/drm/i915/Makefile
> +++ b/drivers/gpu/drm/i915/Makefile
> @@ -22,6 +22,7 @@ subdir-ccflags-y += $(call cc-disable-warning, unused-but-set-variable)
> subdir-ccflags-y += $(call cc-disable-warning, sign-compare)
> subdir-ccflags-y += $(call cc-disable-warning, sometimes-uninitialized)
> subdir-ccflags-y += $(call cc-disable-warning, initializer-overrides)
> +subdir-ccflags-y += $(call cc-disable-warning, uninitialized)
> subdir-ccflags-$(CONFIG_DRM_I915_WERROR) += -Werror
>
> # Fine grained warnings disable
> --
> 2.20.1
>
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH v2] drm/i915: Disable -Wuninitialized
2019-01-26 7:11 [PATCH v2] drm/i915: Disable -Wuninitialized Nathan Chancellor
2019-01-26 7:17 ` Nathan Chancellor
@ 2019-01-26 7:34 ` Nick Desaulniers
2019-01-26 7:35 ` Nick Desaulniers
2019-01-26 7:57 ` Nathan Chancellor
1 sibling, 2 replies; 6+ messages in thread
From: Nick Desaulniers @ 2019-01-26 7:34 UTC (permalink / raw)
To: Nathan Chancellor
Cc: Jani Nikula, Joonas Lahtinen, Rodrigo Vivi, intel-gfx, dri-devel,
LKML, Chris Wilson, Matthias Kaehlcke
On Fri, Jan 25, 2019 at 11:13 PM Nathan Chancellor
<natechancellor@gmail.com> wrote:
>
> This warning is disabled by default in scripts/Makefile.extrawarn when
> W= is not provided but this Makefile adds -Wall after this warning is
> disabled so it shows up in the build when it shouldn't:
>
> In file included from drivers/gpu/drm/i915/intel_breadcrumbs.c:895:
> drivers/gpu/drm/i915/selftests/intel_breadcrumbs.c:350:34: error:
> variable 'wq' is uninitialized when used within its own initialization
> [-Werror,-Wuninitialized]
> DECLARE_WAIT_QUEUE_HEAD_ONSTACK(wq);
> ^~
> ./include/linux/wait.h:74:63: note: expanded from macro
> 'DECLARE_WAIT_QUEUE_HEAD_ONSTACK'
> struct wait_queue_head name = __WAIT_QUEUE_HEAD_INIT_ONSTACK(name)
> ~~~~ ^~~~
> ./include/linux/wait.h:72:33: note: expanded from macro
> '__WAIT_QUEUE_HEAD_INIT_ONSTACK'
> ({ init_waitqueue_head(&name); name; })
> ^~~~
> 1 error generated.
>
> Explicitly disable the warning like commit 46e2068081e9 ("drm/i915:
> Disable some extra clang warnings").
>
> Link: https://github.com/ClangBuiltLinux/linux/issues/220
> Signed-off-by: Nathan Chancellor <natechancellor@gmail.com>
Reviewed-by: Nick Desaulniers <nick.desaulniers@gmail.com>
probably could give Chris Wilson the suggested by tag.
https://lore.kernel.org/lkml/154513398652.1108.7150969916024071452@skylake-alporthouse-com/
> ---
>
> v1 -> v2:
>
> * Rather than disable the warning for the problematic folder, disable it
> for the entire folder like Matthias's commit.
Thanks for following up with a v2.
--
Thanks,
~Nick Desaulniers
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH v2] drm/i915: Disable -Wuninitialized
2019-01-26 7:34 ` Nick Desaulniers
@ 2019-01-26 7:35 ` Nick Desaulniers
2019-01-26 7:57 ` Nathan Chancellor
1 sibling, 0 replies; 6+ messages in thread
From: Nick Desaulniers @ 2019-01-26 7:35 UTC (permalink / raw)
To: Nathan Chancellor
Cc: Jani Nikula, Joonas Lahtinen, Rodrigo Vivi, intel-gfx, dri-devel,
LKML, Chris Wilson, Matthias Kaehlcke
On Fri, Jan 25, 2019 at 11:34 PM Nick Desaulniers
<ndesaulniers@google.com> wrote:
>
> On Fri, Jan 25, 2019 at 11:13 PM Nathan Chancellor
> <natechancellor@gmail.com> wrote:
> >
> > This warning is disabled by default in scripts/Makefile.extrawarn when
> > W= is not provided but this Makefile adds -Wall after this warning is
> > disabled so it shows up in the build when it shouldn't:
> >
> > In file included from drivers/gpu/drm/i915/intel_breadcrumbs.c:895:
> > drivers/gpu/drm/i915/selftests/intel_breadcrumbs.c:350:34: error:
> > variable 'wq' is uninitialized when used within its own initialization
> > [-Werror,-Wuninitialized]
> > DECLARE_WAIT_QUEUE_HEAD_ONSTACK(wq);
> > ^~
> > ./include/linux/wait.h:74:63: note: expanded from macro
> > 'DECLARE_WAIT_QUEUE_HEAD_ONSTACK'
> > struct wait_queue_head name = __WAIT_QUEUE_HEAD_INIT_ONSTACK(name)
> > ~~~~ ^~~~
> > ./include/linux/wait.h:72:33: note: expanded from macro
> > '__WAIT_QUEUE_HEAD_INIT_ONSTACK'
> > ({ init_waitqueue_head(&name); name; })
> > ^~~~
> > 1 error generated.
> >
> > Explicitly disable the warning like commit 46e2068081e9 ("drm/i915:
> > Disable some extra clang warnings").
> >
> > Link: https://github.com/ClangBuiltLinux/linux/issues/220
> > Signed-off-by: Nathan Chancellor <natechancellor@gmail.com>
>
> Reviewed-by: Nick Desaulniers <nick.desaulniers@gmail.com>
gah! I am on my work device, in that case it should be:
Reviewed-by: Nick Desaulniers <ndesaulniers@google.com>
>
> probably could give Chris Wilson the suggested by tag.
> https://lore.kernel.org/lkml/154513398652.1108.7150969916024071452@skylake-alporthouse-com/
>
> > ---
> >
> > v1 -> v2:
> >
> > * Rather than disable the warning for the problematic folder, disable it
> > for the entire folder like Matthias's commit.
>
> Thanks for following up with a v2.
>
> --
> Thanks,
> ~Nick Desaulniers
--
Thanks,
~Nick Desaulniers
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH v2] drm/i915: Disable -Wuninitialized
2019-01-26 7:34 ` Nick Desaulniers
2019-01-26 7:35 ` Nick Desaulniers
@ 2019-01-26 7:57 ` Nathan Chancellor
2019-01-26 17:09 ` Chris Wilson
1 sibling, 1 reply; 6+ messages in thread
From: Nathan Chancellor @ 2019-01-26 7:57 UTC (permalink / raw)
To: Nick Desaulniers
Cc: Jani Nikula, Joonas Lahtinen, Rodrigo Vivi, intel-gfx, dri-devel,
LKML, Chris Wilson, Matthias Kaehlcke
On Fri, Jan 25, 2019 at 11:34:19PM -0800, Nick Desaulniers wrote:
> On Fri, Jan 25, 2019 at 11:13 PM Nathan Chancellor
> <natechancellor@gmail.com> wrote:
> >
> > This warning is disabled by default in scripts/Makefile.extrawarn when
> > W= is not provided but this Makefile adds -Wall after this warning is
> > disabled so it shows up in the build when it shouldn't:
> >
> > In file included from drivers/gpu/drm/i915/intel_breadcrumbs.c:895:
> > drivers/gpu/drm/i915/selftests/intel_breadcrumbs.c:350:34: error:
> > variable 'wq' is uninitialized when used within its own initialization
> > [-Werror,-Wuninitialized]
> > DECLARE_WAIT_QUEUE_HEAD_ONSTACK(wq);
> > ^~
> > ./include/linux/wait.h:74:63: note: expanded from macro
> > 'DECLARE_WAIT_QUEUE_HEAD_ONSTACK'
> > struct wait_queue_head name = __WAIT_QUEUE_HEAD_INIT_ONSTACK(name)
> > ~~~~ ^~~~
> > ./include/linux/wait.h:72:33: note: expanded from macro
> > '__WAIT_QUEUE_HEAD_INIT_ONSTACK'
> > ({ init_waitqueue_head(&name); name; })
> > ^~~~
> > 1 error generated.
> >
> > Explicitly disable the warning like commit 46e2068081e9 ("drm/i915:
> > Disable some extra clang warnings").
> >
> > Link: https://github.com/ClangBuiltLinux/linux/issues/220
> > Signed-off-by: Nathan Chancellor <natechancellor@gmail.com>
>
> Reviewed-by: Nick Desaulniers <nick.desaulniers@gmail.com>
>
> probably could give Chris Wilson the suggested by tag.
> https://lore.kernel.org/lkml/154513398652.1108.7150969916024071452@skylake-alporthouse-com/
>
Ugh you're right, completely slipped my mind.
Suggested-by: Chris Wilson <chris@chris-wilson.co.uk>
> > ---
> >
> > v1 -> v2:
> >
> > * Rather than disable the warning for the problematic folder, disable it
> > for the entire folder like Matthias's commit.
>
> Thanks for following up with a v2.
Thank you for the review!
Nathan
>
> --
> Thanks,
> ~Nick Desaulniers
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH v2] drm/i915: Disable -Wuninitialized
2019-01-26 7:57 ` Nathan Chancellor
@ 2019-01-26 17:09 ` Chris Wilson
0 siblings, 0 replies; 6+ messages in thread
From: Chris Wilson @ 2019-01-26 17:09 UTC (permalink / raw)
To: Nathan Chancellor, Nick Desaulniers
Cc: Jani Nikula, Joonas Lahtinen, Rodrigo Vivi, intel-gfx, dri-devel,
LKML, Matthias Kaehlcke
Quoting Nathan Chancellor (2019-01-26 07:57:49)
> On Fri, Jan 25, 2019 at 11:34:19PM -0800, Nick Desaulniers wrote:
> > On Fri, Jan 25, 2019 at 11:13 PM Nathan Chancellor
> > <natechancellor@gmail.com> wrote:
> > >
> > > This warning is disabled by default in scripts/Makefile.extrawarn when
> > > W= is not provided but this Makefile adds -Wall after this warning is
> > > disabled so it shows up in the build when it shouldn't:
> > >
> > > In file included from drivers/gpu/drm/i915/intel_breadcrumbs.c:895:
> > > drivers/gpu/drm/i915/selftests/intel_breadcrumbs.c:350:34: error:
> > > variable 'wq' is uninitialized when used within its own initialization
> > > [-Werror,-Wuninitialized]
> > > DECLARE_WAIT_QUEUE_HEAD_ONSTACK(wq);
> > > ^~
> > > ./include/linux/wait.h:74:63: note: expanded from macro
> > > 'DECLARE_WAIT_QUEUE_HEAD_ONSTACK'
> > > struct wait_queue_head name = __WAIT_QUEUE_HEAD_INIT_ONSTACK(name)
> > > ~~~~ ^~~~
> > > ./include/linux/wait.h:72:33: note: expanded from macro
> > > '__WAIT_QUEUE_HEAD_INIT_ONSTACK'
> > > ({ init_waitqueue_head(&name); name; })
> > > ^~~~
> > > 1 error generated.
> > >
> > > Explicitly disable the warning like commit 46e2068081e9 ("drm/i915:
> > > Disable some extra clang warnings").
> > >
> > > Link: https://github.com/ClangBuiltLinux/linux/issues/220
> > > Signed-off-by: Nathan Chancellor <natechancellor@gmail.com>
> >
> > Reviewed-by: Nick Desaulniers <nick.desaulniers@gmail.com>
> >
> > probably could give Chris Wilson the suggested by tag.
> > https://lore.kernel.org/lkml/154513398652.1108.7150969916024071452@skylake-alporthouse-com/
> >
>
> Ugh you're right, completely slipped my mind.
>
> Suggested-by: Chris Wilson <chris@chris-wilson.co.uk>
Ignorance is bliss. Applied to dinq, thanks!
-Chris
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2019-01-26 17:09 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-01-26 7:11 [PATCH v2] drm/i915: Disable -Wuninitialized Nathan Chancellor
2019-01-26 7:17 ` Nathan Chancellor
2019-01-26 7:34 ` Nick Desaulniers
2019-01-26 7:35 ` Nick Desaulniers
2019-01-26 7:57 ` Nathan Chancellor
2019-01-26 17:09 ` Chris Wilson
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).