Commit 46e2068081e9 ("drm/i915: Disable some extra clang warnings")
disabled -Wsometimes-uninitialized as noisy but there have been a few
fixes to clang that make the false positive rate fairly low so it should
be enabled to help catch obvious mistakes. The first two patches fix
revent instances of this warning then enables it for i915 like the rest
of the tree.
Cheers,
Nathan
Nathan Chancellor (3):
drm/i915/selftests: Do not use import_obj uninitialized
drm/i915/selftests: Always initialize err in
igt_dmabuf_import_same_driver_lmem()
drm/i915: Enable -Wsometimes-uninitialized
drivers/gpu/drm/i915/Makefile | 1 -
drivers/gpu/drm/i915/gem/selftests/i915_gem_dmabuf.c | 7 ++++---
2 files changed, 4 insertions(+), 4 deletions(-)
base-commit: fb43ebc83e069625cfeeb2490efc3ffa0013bfa4
--
2.33.0
This warning helps catch uninitialized variables. It should have been
enabled at the same time as commit b2423184ac33 ("drm/i915: Enable
-Wuninitialized") but I did not realize they were disabled separately.
Enable it now that i915 is clean so that it stays that way.
Signed-off-by: Nathan Chancellor <[email protected]>
---
drivers/gpu/drm/i915/Makefile | 1 -
1 file changed, 1 deletion(-)
diff --git a/drivers/gpu/drm/i915/Makefile b/drivers/gpu/drm/i915/Makefile
index 642a5b5a1b81..335ba9f43d8f 100644
--- a/drivers/gpu/drm/i915/Makefile
+++ b/drivers/gpu/drm/i915/Makefile
@@ -19,7 +19,6 @@ subdir-ccflags-y += $(call cc-disable-warning, missing-field-initializers)
subdir-ccflags-y += $(call cc-disable-warning, unused-but-set-variable)
# clang warnings
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, frame-address)
subdir-ccflags-$(CONFIG_DRM_I915_WERROR) += -Werror
--
2.33.0
On Tue, Aug 24, 2021 at 03:54:24PM -0700, Nathan Chancellor wrote:
> Commit 46e2068081e9 ("drm/i915: Disable some extra clang warnings")
> disabled -Wsometimes-uninitialized as noisy but there have been a few
> fixes to clang that make the false positive rate fairly low so it should
> be enabled to help catch obvious mistakes. The first two patches fix
> revent instances of this warning then enables it for i915 like the rest
> of the tree.
>
> Cheers,
> Nathan
>
> Nathan Chancellor (3):
> drm/i915/selftests: Do not use import_obj uninitialized
> drm/i915/selftests: Always initialize err in
> igt_dmabuf_import_same_driver_lmem()
> drm/i915: Enable -Wsometimes-uninitialized
>
> drivers/gpu/drm/i915/Makefile | 1 -
> drivers/gpu/drm/i915/gem/selftests/i915_gem_dmabuf.c | 7 ++++---
> 2 files changed, 4 insertions(+), 4 deletions(-)
>
>
> base-commit: fb43ebc83e069625cfeeb2490efc3ffa0013bfa4
> --
> 2.33.0
>
>
Ping, could this be picked up for an -rc as these are very clearly bugs?
Cheers,
Nathan
On Tue, Aug 24, 2021 at 3:54 PM Nathan Chancellor <[email protected]> wrote:
>
> This warning helps catch uninitialized variables. It should have been
> enabled at the same time as commit b2423184ac33 ("drm/i915: Enable
> -Wuninitialized") but I did not realize they were disabled separately.
> Enable it now that i915 is clean so that it stays that way.
>
> Signed-off-by: Nathan Chancellor <[email protected]>
Thanks for the series!
Reviewed-by: Nick Desaulniers <[email protected]>
> ---
> drivers/gpu/drm/i915/Makefile | 1 -
> 1 file changed, 1 deletion(-)
>
> diff --git a/drivers/gpu/drm/i915/Makefile b/drivers/gpu/drm/i915/Makefile
> index 642a5b5a1b81..335ba9f43d8f 100644
> --- a/drivers/gpu/drm/i915/Makefile
> +++ b/drivers/gpu/drm/i915/Makefile
> @@ -19,7 +19,6 @@ subdir-ccflags-y += $(call cc-disable-warning, missing-field-initializers)
> subdir-ccflags-y += $(call cc-disable-warning, unused-but-set-variable)
> # clang warnings
> 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, frame-address)
> subdir-ccflags-$(CONFIG_DRM_I915_WERROR) += -Werror
> --
> 2.33.0
>
--
Thanks,
~Nick Desaulniers
On Mon, 13 Sep 2021, Nathan Chancellor <[email protected]> wrote:
> On Tue, Aug 24, 2021 at 03:54:24PM -0700, Nathan Chancellor wrote:
>> Commit 46e2068081e9 ("drm/i915: Disable some extra clang warnings")
>> disabled -Wsometimes-uninitialized as noisy but there have been a few
>> fixes to clang that make the false positive rate fairly low so it should
>> be enabled to help catch obvious mistakes. The first two patches fix
>> revent instances of this warning then enables it for i915 like the rest
>> of the tree.
>>
>> Cheers,
>> Nathan
>>
>> Nathan Chancellor (3):
>> drm/i915/selftests: Do not use import_obj uninitialized
>> drm/i915/selftests: Always initialize err in
>> igt_dmabuf_import_same_driver_lmem()
>> drm/i915: Enable -Wsometimes-uninitialized
>>
>> drivers/gpu/drm/i915/Makefile | 1 -
>> drivers/gpu/drm/i915/gem/selftests/i915_gem_dmabuf.c | 7 ++++---
>> 2 files changed, 4 insertions(+), 4 deletions(-)
>>
>>
>> base-commit: fb43ebc83e069625cfeeb2490efc3ffa0013bfa4
>> --
>> 2.33.0
>>
>>
>
> Ping, could this be picked up for an -rc as these are very clearly bugs?
Thanks for the patches and review. Pushed to drm-intel-gt-next and
cherry-picked to drm-intel-fixes, header to -rc2.
BR,
Jani.
--
Jani Nikula, Intel Open Source Graphics Center
On Tue, Sep 14, 2021 at 08:10:14PM +0300, Jani Nikula wrote:
> On Mon, 13 Sep 2021, Nathan Chancellor <[email protected]> wrote:
> > On Tue, Aug 24, 2021 at 03:54:24PM -0700, Nathan Chancellor wrote:
> >> Commit 46e2068081e9 ("drm/i915: Disable some extra clang warnings")
> >> disabled -Wsometimes-uninitialized as noisy but there have been a few
> >> fixes to clang that make the false positive rate fairly low so it should
> >> be enabled to help catch obvious mistakes. The first two patches fix
> >> revent instances of this warning then enables it for i915 like the rest
> >> of the tree.
> >>
> >> Cheers,
> >> Nathan
> >>
> >> Nathan Chancellor (3):
> >> drm/i915/selftests: Do not use import_obj uninitialized
> >> drm/i915/selftests: Always initialize err in
> >> igt_dmabuf_import_same_driver_lmem()
> >> drm/i915: Enable -Wsometimes-uninitialized
> >>
> >> drivers/gpu/drm/i915/Makefile | 1 -
> >> drivers/gpu/drm/i915/gem/selftests/i915_gem_dmabuf.c | 7 ++++---
> >> 2 files changed, 4 insertions(+), 4 deletions(-)
> >>
> >>
> >> base-commit: fb43ebc83e069625cfeeb2490efc3ffa0013bfa4
> >> --
> >> 2.33.0
> >>
> >>
> >
> > Ping, could this be picked up for an -rc as these are very clearly bugs?
>
> Thanks for the patches and review. Pushed to drm-intel-gt-next and
> cherry-picked to drm-intel-fixes, header to -rc2.
Thanks a lot!
Cheers,
Nathan