* [PATCH] drm/i915: Disable some extra clang warnings
@ 2018-03-17 0:31 Matthias Kaehlcke
2018-03-17 0:46 ` ✗ Fi.CI.BAT: failure for " Patchwork
2018-03-19 8:21 ` [PATCH] " Jani Nikula
0 siblings, 2 replies; 3+ messages in thread
From: Matthias Kaehlcke @ 2018-03-17 0:31 UTC (permalink / raw)
To: Jani Nikula, Joonas Lahtinen, Rodrigo Vivi, David Airlie
Cc: Guenter Roeck, intel-gfx, Matthias Kaehlcke, linux-kernel,
dri-devel
Commit 39bf4de89ff7 ("drm/i915: Add -Wall -Wextra to our build, set
warnings to full") enabled extra warnings for i915 to spot possible
bugs in new code, and then disabled a subset of these warnings to keep
the current code building without warnings (with gcc). Enabling the
extra warnings also enabled some additional clang-only warnings, as a
result building i915 with clang currently is extremely noisy. For now
also disable the clang warnings sign-compare, sometimes-uninitialized,
unneeded-internal-declaration and initializer-overrides. If desired
they can be re-enabled after the code has been fixed.
Fixes: 39bf4de89ff7 ("drm/i915: Add -Wall -Wextra to our build, set
warnings to full")
Signed-off-by: Matthias Kaehlcke <mka@chromium.org>
---
drivers/gpu/drm/i915/Makefile | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/drivers/gpu/drm/i915/Makefile b/drivers/gpu/drm/i915/Makefile
index 091aef281963..ad05796a96ba 100644
--- a/drivers/gpu/drm/i915/Makefile
+++ b/drivers/gpu/drm/i915/Makefile
@@ -17,6 +17,10 @@ subdir-ccflags-y += $(call cc-disable-warning, unused-parameter)
subdir-ccflags-y += $(call cc-disable-warning, type-limits)
subdir-ccflags-y += $(call cc-disable-warning, missing-field-initializers)
subdir-ccflags-y += $(call cc-disable-warning, implicit-fallthrough)
+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, unneeded-internal-declaration)
+subdir-ccflags-y += $(call cc-disable-warning, initializer-overrides)
subdir-ccflags-$(CONFIG_DRM_I915_WERROR) += -Werror
# Fine grained warnings disable
--
2.16.2.804.g6dcf76e118-goog
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel
^ permalink raw reply related [flat|nested] 3+ messages in thread
* ✗ Fi.CI.BAT: failure for drm/i915: Disable some extra clang warnings
2018-03-17 0:31 [PATCH] drm/i915: Disable some extra clang warnings Matthias Kaehlcke
@ 2018-03-17 0:46 ` Patchwork
2018-03-19 8:21 ` [PATCH] " Jani Nikula
1 sibling, 0 replies; 3+ messages in thread
From: Patchwork @ 2018-03-17 0:46 UTC (permalink / raw)
To: Matthias Kaehlcke; +Cc: intel-gfx
== Series Details ==
Series: drm/i915: Disable some extra clang warnings
URL : https://patchwork.freedesktop.org/series/40145/
State : failure
== Summary ==
Applying: drm/i915: Disable some extra clang warnings
error: Failed to merge in the changes.
Using index info to reconstruct a base tree...
M drivers/gpu/drm/i915/Makefile
Falling back to patching base and 3-way merge...
Auto-merging drivers/gpu/drm/i915/Makefile
CONFLICT (content): Merge conflict in drivers/gpu/drm/i915/Makefile
Patch failed at 0001 drm/i915: Disable some extra clang warnings
The copy of the patch that failed is found in: .git/rebase-apply/patch
When you have resolved this problem, run "git am --continue".
If you prefer to skip this patch, run "git am --skip" instead.
To restore the original branch and stop patching, run "git am --abort".
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] drm/i915: Disable some extra clang warnings
2018-03-17 0:31 [PATCH] drm/i915: Disable some extra clang warnings Matthias Kaehlcke
2018-03-17 0:46 ` ✗ Fi.CI.BAT: failure for " Patchwork
@ 2018-03-19 8:21 ` Jani Nikula
1 sibling, 0 replies; 3+ messages in thread
From: Jani Nikula @ 2018-03-19 8:21 UTC (permalink / raw)
To: Joonas Lahtinen, Rodrigo Vivi, David Airlie
Cc: Guenter Roeck, intel-gfx, Matthias Kaehlcke, linux-kernel,
dri-devel
On Fri, 16 Mar 2018, Matthias Kaehlcke <mka@chromium.org> wrote:
> Commit 39bf4de89ff7 ("drm/i915: Add -Wall -Wextra to our build, set
> warnings to full") enabled extra warnings for i915 to spot possible
> bugs in new code, and then disabled a subset of these warnings to keep
> the current code building without warnings (with gcc). Enabling the
> extra warnings also enabled some additional clang-only warnings, as a
> result building i915 with clang currently is extremely noisy. For now
> also disable the clang warnings sign-compare, sometimes-uninitialized,
> unneeded-internal-declaration and initializer-overrides. If desired
> they can be re-enabled after the code has been fixed.
>
> Fixes: 39bf4de89ff7 ("drm/i915: Add -Wall -Wextra to our build, set
> warnings to full")
> Signed-off-by: Matthias Kaehlcke <mka@chromium.org>
Thanks for the patch, I think it's the right thing to do. I'm afraid it
doesn't apply to current code, however. Please rebase on top of drm-tip
branch of [1].
> ---
> drivers/gpu/drm/i915/Makefile | 4 ++++
> 1 file changed, 4 insertions(+)
>
> diff --git a/drivers/gpu/drm/i915/Makefile b/drivers/gpu/drm/i915/Makefile
> index 091aef281963..ad05796a96ba 100644
> --- a/drivers/gpu/drm/i915/Makefile
> +++ b/drivers/gpu/drm/i915/Makefile
> @@ -17,6 +17,10 @@ subdir-ccflags-y += $(call cc-disable-warning, unused-parameter)
> subdir-ccflags-y += $(call cc-disable-warning, type-limits)
> subdir-ccflags-y += $(call cc-disable-warning, missing-field-initializers)
> subdir-ccflags-y += $(call cc-disable-warning, implicit-fallthrough)
While at it, please add a comment here noting that the below disables
are for Clang.
Thanks,
Jani.
[1] https://bugs.freedesktop.org/enter_bug.cgi?product=DRI&component=DRM/Intel
> +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, unneeded-internal-declaration)
> +subdir-ccflags-y += $(call cc-disable-warning, initializer-overrides)
> subdir-ccflags-$(CONFIG_DRM_I915_WERROR) += -Werror
>
> # Fine grained warnings disable
--
Jani Nikula, Intel Open Source Technology Center
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2018-03-19 8:21 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-03-17 0:31 [PATCH] drm/i915: Disable some extra clang warnings Matthias Kaehlcke
2018-03-17 0:46 ` ✗ Fi.CI.BAT: failure for " Patchwork
2018-03-19 8:21 ` [PATCH] " Jani Nikula
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).