Re: [PATCH 31/64] fortify: Explicitly disable Clang support

2021-07-27 Thread Nathan Chancellor
On 7/27/2021 1:58 PM, Kees Cook wrote: Clang has never correctly compiled the FORTIFY_SOURCE defenses due to a couple bugs: Eliding inlines with matching __builtin_* names https://bugs.llvm.org/show_bug.cgi?id=50322 Incorrect __builtin_constant_p() of some globals

[PATCH] drm/exynos: Always initialize mapping in exynos_drm_register_dma()

2021-07-27 Thread Nathan Chancellor
is no more warning and the driver does not change during runtime. Reported-by: kernel test robot Signed-off-by: Nathan Chancellor --- drivers/gpu/drm/exynos/exynos_drm_dma.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/gpu/drm/exynos/exynos_drm_dma.c b/drivers/gpu/drm/exy

[PATCH] drm/tegra: Fix shift overflow in tegra_shared_plane_atomic_update

2021-04-15 Thread Nathan Chancellor
and will not overflow. Fixes: 7b6f846785f4 ("drm/tegra: Support sector layout on Tegra194") Link: https://github.com/ClangBuiltLinux/linux/issues/1351 Signed-off-by: Nathan Chancellor --- drivers/gpu/drm/tegra/hub.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dr

[PATCH] drm/i915/selftest: Fix use of err in igt_reset_{fail, nop}_engine()

2021-08-13 Thread Nathan Chancellor
"drm/i915/selftest: Bump selftest timeouts for hangcheck") Reported-by: Dan Carpenter Signed-off-by: Nathan Chancellor --- drivers/gpu/drm/i915/gt/selftest_hangcheck.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/gpu/drm/i915/gt/selftest_hangcheck.c b/drivers

[PATCH] drm/radeon: Add break to switch statement in radeonfb_create_pinned_object()

2021-08-15 Thread Nathan Chancellor
default: ^ break; 1 warning generated. Clang's version of this warning is a little bit more pedantic than GCC's. Add the missing break to satisfy it to match what has been done all over the kernel tree. Signed-off-by: Nathan Chancellor --- drivers/gpu/drm/radeon/radeo

Re: [Intel-gfx] [PATCH] drm/i915/selftest: Fix use of err in igt_reset_{fail, nop}_engine()

2021-08-23 Thread Nathan Chancellor
Ping? This is a pretty clear bug and it is not fixed in -next or drm-intel at this point. On Fri, Aug 13, 2021 at 10:11:58AM -0700, Nathan Chancellor wrote: > Clang warns: > > In file included from drivers/gpu/drm/i915/gt/intel_reset.c:1514: > drivers/gpu/drm/i915/gt/selftest_hangch

[PATCH 0/3] drm/i915: Enable -Wsometimes-uninitialized

2021-08-24 Thread Nathan Chancellor
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-uni

[PATCH 1/3] drm/i915/selftests: Do not use import_obj uninitialized

2021-08-24 Thread Nathan Chancellor
g struct drm_i915_gem_object *obj, *import_obj; ^ = NULL Shuffle the import_obj initialization above these if statements so that it is not used uninitialized. Fixes: d7b2cb380b3a ("drm/i915/gem: Correct the locking and pin pattern for dma-buf (v8)&quo

[PATCH 2/3] drm/i915/selftests: Always initialize err in igt_dmabuf_import_same_driver_lmem()

2021-08-24 Thread Nathan Chancellor
em_prime_import() returns -EOPNOTSUPP so initialize err to zero in this case. Fixes: cdb35d1ed6d2 ("drm/i915/gem: Migrate to system at dma-buf attach time (v7)") Reported-by: Dan Carpenter Signed-off-by: Nathan Chancellor --- drivers/gpu/drm/i915/gem/selftests/i915_gem_dmabuf.c | 2 ++ 1 f

[PATCH 3/3] drm/i915: Enable -Wsometimes-uninitialized

2021-08-24 Thread Nathan Chancellor
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-

[PATCH] drm/i915: Clean up disabled warnings

2021-08-24 Thread Nathan Chancellor
n be removed. [1]: https://lore.kernel.org/r/202108210311.cbtcgoul-...@intel.com/ [2]: https://lore.kernel.org/r/20210824022640.2170859-1-nat...@kernel.org/ Signed-off-by: Nathan Chancellor --- NOTE: This is based on my series to enable -Wsometimes-initialized here: https://lore.kernel.org/r/20210824225427.20

Re: [PATCH] drm/i915: Clean up disabled warnings

2021-08-25 Thread Nathan Chancellor
On 8/25/2021 4:03 PM, Nick Desaulniers wrote: On Tue, Aug 24, 2021 at 4:23 PM Nathan Chancellor wrote: i915 enables a wider set of warnings with '-Wall -Wextra' then disables several with cc-disable-warning. If an unknown flag gets added to KBUILD_CFLAGS when building with

[PATCH] drm/i915: Enable -Wuninitialized

2021-02-16 Thread Nathan Chancellor
ea4a7ba9bf6 ("drm/i915/gt: Avoid uninitialized use of rpcurupei in frequency_show") References: 2034c2129bc4 ("drm/i915/display: Ensure that ret is always initialized in icl_combo_phy_verify_state") Reported-by: Arnd Bergmann Signed-off-by: Nathan Chancellor --- drivers/g

[PATCH] drm/amd/pm/swsmu: Avoid using structure_size uninitialized in smu_cmn_init_soft_gpu_metrics

2021-02-18 Thread Nathan Chancellor
t16_t structure_size; ^ = 0 1 warning generated. Return in the default case, as the size of the header will not be known. Fixes: de4b7cd8cb87 ("drm/amd/pm/swsmu: unify the init soft gpu metrics function") Link: https://github.com/ClangBuiltLinux/linux/iss

Re: [git pull] drm for 5.12-rc1

2021-02-21 Thread Nathan Chancellor
On Sun, Feb 21, 2021 at 03:07:17PM -0800, Linus Torvalds wrote: > On Thu, Feb 18, 2021 at 10:06 PM Dave Airlie wrote: > > > > Let me know if there are any issues, > > gcc was happy, and I obviously already pushed out my merge, but then > when I did my clang build afterwards, it reports: > > dr

Re: [PATCH] drm/amdgpu/display: initialize the variable 'i'

2021-02-22 Thread Nathan Chancellor
On Mon, Feb 22, 2021 at 11:05:17PM +, Simon Ser wrote: > On Monday, February 22nd, 2021 at 8:25 PM, Souptick Joarder > wrote: > > > >> drivers/gpu/drm/amd/amdgpu/../display/amdgpu_dm/amdgpu_dm.c:9804:38: > > >> warning: variable 'i' is uninitialized when used here > > >> [-Wuninitialized] >

Re: [PATCH] drm/amdgpu/display: initialize the variable 'i'

2021-02-22 Thread Nathan Chancellor
On Mon, Feb 22, 2021 at 11:50:06PM +, Simon Ser wrote: > On Tuesday, February 23rd, 2021 at 12:44 AM, Nathan Chancellor > wrote: > > > On Mon, Feb 22, 2021 at 11:05:17PM +, Simon Ser wrote: > > > On Monday, February 22nd, 2021 at 8:25 PM, Soupti

[PATCH] fbmem: Correct position of '__maybe_unused' in proc_fb_seq_ops

2021-05-05 Thread Nathan Chancellor
-by: kernel test robot Signed-off-by: Nathan Chancellor --- drivers/video/fbdev/core/fbmem.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/video/fbdev/core/fbmem.c b/drivers/video/fbdev/core/fbmem.c index 52c606c0f8a2..84c484f37b4a 100644 --- a/drivers/video/fbdev/co

Re: [PATCH] drm/msm/dsi: fix 32-bit clang warning

2021-05-14 Thread Nathan Chancellor
tional instead to avoid the warning. Fixes: 076437c9e360 ("drm/msm/dsi: move min/max PLL rate to phy config") Signed-off-by: Arnd Bergmann Reviewed-by: Nathan Chancellor --- As found with another patch, using __builtin_choose_expr() would likely also work here, but doesn't see

Re: [PATCH v15 06/12] swiotlb: Use is_swiotlb_force_bounce for swiotlb data bouncing

2021-06-30 Thread Nathan Chancellor
Hi Will and Claire, On Wed, Jun 30, 2021 at 12:43:48PM +0100, Will Deacon wrote: > On Wed, Jun 30, 2021 at 05:17:27PM +0800, Claire Chang wrote: > > On Wed, Jun 30, 2021 at 9:43 AM Nathan Chancellor wrote: > > > > > > On Thu, Jun 24, 2021 at 11:55:20P

Re: [PATCH 2/2] drm/vc4: hdmi: Convert to gpiod

2021-07-01 Thread Nathan Chancellor
On Mon, May 24, 2021 at 03:18:52PM +0200, Maxime Ripard wrote: > The new gpiod interface takes care of parsing the GPIO flags and to > return the logical value when accessing an active-low GPIO, so switching > to it simplifies a lot the driver. > > Signed-off-by: Maxime Ripard > --- > drivers/gp

Re: [PATCH 2/2] drm/vc4: hdmi: Convert to gpiod

2021-07-02 Thread Nathan Chancellor
On Fri, Jul 02, 2021 at 03:16:46PM +0200, Maxime Ripard wrote: > Hi Nathan, > > On Thu, Jul 01, 2021 at 08:29:34PM -0700, Nathan Chancellor wrote: > > On Mon, May 24, 2021 at 03:18:52PM +0200, Maxime Ripard wrote: > > > The new gpiod interface takes care of parsi

Re: [PATCH v15 06/12] swiotlb: Use is_swiotlb_force_bounce for swiotlb data bouncing

2021-07-02 Thread Nathan Chancellor
Hi Will and Robin, On Fri, Jul 02, 2021 at 04:13:50PM +0100, Robin Murphy wrote: > On 2021-07-02 14:58, Will Deacon wrote: > > Hi Nathan, > > > > On Thu, Jul 01, 2021 at 12:52:20AM -0700, Nathan Chancellor wrote: > > > On 7/1/2021 12:40 AM, Will Deacon wrote: >

Re: [PATCH v15 06/12] swiotlb: Use is_swiotlb_force_bounce for swiotlb data bouncing

2021-07-06 Thread Nathan Chancellor
Hi Will and Robin, On 7/6/2021 10:06 AM, Will Deacon wrote: On Tue, Jul 06, 2021 at 04:39:11PM +0100, Robin Murphy wrote: On 2021-07-06 15:05, Christoph Hellwig wrote: On Tue, Jul 06, 2021 at 03:01:04PM +0100, Robin Murphy wrote: FWIW I was pondering the question of whether to do something al

Re: [PATCH] drm/selftest: plane_helper: Put test structures in static storage

2022-03-18 Thread Nathan Chancellor
Ping, could someone review and/or pick this up? This is going to break a few builds with CONFIG_WERROR, it would be nice to have it in drm-misc-next-fixes, as the commit it is fixing is in drm-misc-next. Cheers, Nathan On Wed, Mar 02, 2022 at 04:59:09PM -0700, Nathan Chancellor wrote: > Cl

[PATCH] drm/msm/gpu: Avoid -Wunused-function with !CONFIG_PM_SLEEP

2022-03-30 Thread Nathan Chancellor
there is already an '#ifdef CONFIG_PM' in the code, so just do the same thing with CONFIG_PM_SLEEP to resolve the warning. Fixes: 7e4167c9e021 ("drm/msm/gpu: Park scheduler threads for system suspend") Signed-off-by: Nathan Chancellor --- drivers/gpu/drm/msm/adreno/adreno_device.c

[PATCH v2] drm/stm: Avoid using val uninitialized in ltdc_set_ycbcr_config()

2022-02-22 Thread Nathan Chancellor
ael Gallais-Pou Signed-off-by: Nathan Chancellor --- v1 -> v2: https://lore.kernel.org/r/20220207165304.1046867-1-nat...@kernel.org/ * Use DRM_ERROR() instead of drm_err() (Philippe). * Collect tags from v1, as nothing substantial has changed. drivers/gpu/drm/stm/ltdc.c | 3 ++- 1 file cha

Re: [PATCH] drm/stm: Avoid using val uninitialized in ltdc_set_ycbcr_config()

2022-02-22 Thread Nathan Chancellor
On Tue, Feb 22, 2022 at 11:54:04AM +0100, Philippe CORNU wrote: > > > On 2/7/22 8:44 PM, Nick Desaulniers wrote: > > On Mon, Feb 7, 2022 at 8:53 AM Nathan Chancellor wrote: > > > > > > Clang warns: > > > > > >drivers/gpu/dr

Re: [PATCH] [v2] Kbuild: move to -std=gnu11

2022-02-28 Thread Nathan Chancellor
On Mon, Feb 28, 2022 at 12:57:55PM +0100, Arnd Bergmann wrote: > On Mon, Feb 28, 2022 at 12:47 PM Marco Elver wrote: > > On Mon, 28 Feb 2022 at 11:32, Arnd Bergmann wrote: > > > > > Nathan Chancellor reported an additional -Wdeclaration-after-statement > > >

[PATCH] drm/selftest: plane_helper: Put test structures in static storage

2022-03-02 Thread Nathan Chancellor
by: Nick Desaulniers Signed-off-by: Nathan Chancellor --- drivers/gpu/drm/selftests/test-drm_plane_helper.c | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/gpu/drm/selftests/test-drm_plane_helper.c b/drivers/gpu/drm/selftests/test-drm_plane_helper.c index ceebee

Re: [PATCH 0/3] drm/i915: Enable -Wsometimes-uninitialized

2021-09-13 Thread Nathan Chancellor
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

[PATCH v2] drm/i915: Clean up disabled warnings

2021-09-14 Thread Nathan Chancellor
n be removed. [1]: https://lore.kernel.org/r/202108210311.cbtcgoul-...@intel.com/ [2]: https://lore.kernel.org/r/20210824022640.2170859-1-nat...@kernel.org/ Reviewed-by: Nick Desaulniers Signed-off-by: Nathan Chancellor --- v1 -> v2: https://lore.kernel.org/r/20210824232237.2085342-1-nat...@kernel.org/ *

Re: [PATCH 0/3] drm/i915: Enable -Wsometimes-uninitialized

2021-09-14 Thread Nathan Chancellor
On Tue, Sep 14, 2021 at 08:10:14PM +0300, Jani Nikula wrote: > On Mon, 13 Sep 2021, Nathan Chancellor wrote: > > On Tue, Aug 24, 2021 at 03:54:24PM -0700, Nathan Chancellor wrote: > >> Commit 46e2068081e9 ("drm/i915: Disable some extra clang warnings") > >>

[PATCH] drm/i915: Avoid bitwise vs logical OR warning in snb_wm_latency_quirk()

2021-10-14 Thread Nathan Chancellor
hub.com/ClangBuiltLinux/linux/issues/1473 Reported-by: Nick Desaulniers Signed-off-by: Nathan Chancellor --- drivers/gpu/drm/i915/intel_pm.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/gpu/drm/i915/intel_pm.c b/drivers/gpu/drm/i915/intel_pm.c index f90fe39cf8

Re: [PATCH] dma-buf: fix uninitialized variable usage in selftests

2021-10-25 Thread Nathan Chancellor
always false if (r) { ^~~~ drivers/dma-buf/st-dma-resv.c:280:10: note: initialize the variable 'i' to silence this warning int r, i; ^ = 0 1 error generated. This hunk resolves it for me. With that: Reviewed-by: Nathan Chancellor diff --git a/drivers/dma-

Re: [PATCH] dma-buf: st: fix error handling in test_get_fences()

2021-10-26 Thread Nathan Chancellor
{ > ^~~~ > drivers/dma-buf/st-dma-resv.c:280:10: note: initialize the variable 'i' to > silence this warning > int r, i; > ^ > = 0 > > Skip cleaning up the bits that have not been allocated at this point. >

[PATCH] drm/msm/dpu: Remove commit and its uses in dpu_crtc_set_crc_source()

2021-10-26 Thread Nathan Chancellor
mit_put() at the end was not. Do that now so there is no more warning. Fixes: 78d9b458cc21 ("drm/msm/dpu: Add CRC support for DPU") Link: https://github.com/ClangBuiltLinux/linux/issues/1493 Reported-by: "kernelci.org bot" Signed-off-by: Nathan Chancellor --- drivers/gpu/drm/

Re: [Intel-gfx] [PATCH v3 03/13] drm/dp: add LTTPR DP 2.0 DPCD addresses

2021-09-21 Thread Nathan Chancellor
On Thu, Sep 09, 2021 at 03:51:55PM +0300, Jani Nikula wrote: > DP 2.0 brings some new DPCD addresses for PHY repeaters. > > Cc: dri-devel@lists.freedesktop.org > Reviewed-by: Manasi Navare > Signed-off-by: Jani Nikula > --- > include/drm/drm_dp_helper.h | 4 > 1 file changed, 4 insertions(

Re: [PATCH v3 1/6] drm/vc4: select PM (openrisc)

2021-09-22 Thread Nathan Chancellor
On Wed, Sep 22, 2021 at 10:41:56AM +0200, Maxime Ripard wrote: > Hi Randy, > > On Sun, Sep 19, 2021 at 09:40:44AM -0700, Randy Dunlap wrote: > > On 8/19/21 6:59 AM, Maxime Ripard wrote: > > > We already depend on runtime PM to get the power domains and clocks for > > > most of the devices supporte

Re: [PATCH v3 1/6] drm/vc4: select PM (openrisc)

2021-09-23 Thread Nathan Chancellor
On Thu, Sep 23, 2021 at 04:52:08PM +0200, Maxime Ripard wrote: > Hi Nathan, > > On Wed, Sep 22, 2021 at 08:49:50AM -0700, Nathan Chancellor wrote: > > On Wed, Sep 22, 2021 at 10:41:56AM +0200, Maxime Ripard wrote: > > > Hi Randy, > > > > > > On Sun, Sep

[PATCH] drm/kmb: Remove set_test_mode_src_osc_freq_target_{hi, low}_bits()

2021-09-28 Thread Nathan Chancellor
("drm/kmb: Mipi DSI part of the display driver"). Reported-by: kernel test robot Signed-off-by: Nathan Chancellor --- drivers/gpu/drm/kmb/kmb_dsi.c | 28 1 file changed, 28 deletions(-) diff --git a/drivers/gpu/drm/kmb/kmb_dsi.c b/drivers/gpu/d

[PATCH] drm/amd: Guard IS_OLD_GCC assignment with CONFIG_CC_IS_GCC

2021-09-30 Thread Nathan Chancellor
GCC 7.1+") for more context. Fixes: ff7e396f822f ("drm/amd/display: add cyan_skillfish display support") Link: https://github.com/ClangBuiltLinux/linux/issues/1468 Signed-off-by: Nathan Chancellor --- drivers/gpu/drm/amd/display/dc/dcn201/Makefile | 2 ++ 1 file changed, 2 inser

[PATCH] drm/amd: Initialize remove_mpcc in dcn201_update_mpcc()

2021-09-30 Thread Nathan Chancellor
eginning of the function so it is never used uninitialized. Fixes: ff7e396f822f ("drm/amd/display: add cyan_skillfish display support") Link: https://github.com/ClangBuiltLinux/linux/issues/1469 Signed-off-by: Nathan Chancellor --- drivers/gpu/drm/amd/display/dc/dcn201/dcn201_hwseq.c | 2 +-

[PATCH] drm/amd: Return NULL instead of false in dcn201_acquire_idle_pipe_for_layer()

2021-09-30 Thread Nathan Chancellor
^ 1 error generated. Use NULL instead of false since the function is returning a pointer rather than a boolean. Fixes: ff7e396f822f ("drm/amd/display: add cyan_skillfish display support") Link: https://github.com/ClangBuiltLinux/linux/issues/1470 Signed-off-by: Nathan Chancellor

Re: [PATCH] omapfb: add one more "fallthrough" statement

2021-11-16 Thread Nathan Chancellor
plicit-fallthrough] > > Add it here as well. > > Signed-off-by: Arnd Bergmann Reviewed-by: Nathan Chancellor > --- > drivers/video/fbdev/omap/omapfb_main.c | 1 + > 1 file changed, 1 insertion(+) > > diff --git a/drivers/video/fbdev/omap/omapfb_main.c > b/drivers/vid

Re: [PATCH][next] drm/amdgpu: fix return of an uninitialized value in variable ret

2019-05-11 Thread Nathan Chancellor
Fix this by not returning > ret but instead returning -EINVAL on the zero lo_base_addr case. > > Addresses-Coverity: ("Uninitialized scalar variable") > Fixes: a6ac0b44bab9 ("drm/amdgpu: add df perfmon regs and funcs for xgmi") > Signed-off-by: Colin Ian King R

[PATCH] drm/komeda: Use memset to initialize config_id

2019-04-25 Thread Nathan Chancellor
_id") Link: https://github.com/ClangBuiltLinux/linux/issues/457 Signed-off-by: Nathan Chancellor --- drivers/gpu/drm/arm/display/komeda/komeda_dev.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/gpu/drm/arm/display/komeda/komeda_dev.c b/drivers/gpu/drm/arm

[PATCH] drm/amdkfd: Fix if preprocessor statement above kfd_fill_iolink_info_for_cpu

2019-01-22 Thread Nathan Chancellor
Clang warns: drivers/gpu/drm/amd/amdgpu/../amdkfd/kfd_crat.c:866:5: warning: 'CONFIG_X86_64' is not defined, evaluates to 0 [-Wundef] #if CONFIG_X86_64 ^ 1 warning generated. Fixes: d1c234e2cd10 ("drm/amdkfd: Allow building KFD on ARM64 (v2)") Signed-off-by: Nathan Chance

Re: [PATCH] drm/amd/display: add -msse2 to prevent Clang from emitting libcalls to undefined SW FP routines

2019-01-25 Thread Nathan Chancellor
el.org # 4.19 > Reported-by: S, Shirish > Reported-by: Matthias Kaehlcke > Suggested-by: James Y Knight > Suggested-by: Nathan Chancellor > Signed-off-by: Nick Desaulniers > Tested-by: Guenter Roeck Tested-by: Nathan Chancellor > --- > drivers/gpu/drm/amd/disp

Re: [PATCH] drm/amd/display: Pass app_tf by value rather than by reference

2019-01-26 Thread Nathan Chancellor
On Fri, Dec 14, 2018 at 08:09:00PM +, Wentland, Harry wrote: > On 2018-12-11 5:07 p.m., Nick Desaulniers wrote: > > On Tue, Dec 11, 2018 at 1:42 PM Nathan Chancellor > > wrote: > >> > >> On Tue, Dec 11, 2018 at 01:25:00PM -0800, Nick Desaulniers wrote: >

Re: [PATCH v2] drm/i915: Disable -Wuninitialized

2019-01-26 Thread Nathan Chancellor
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: > > I

[PATCH v2] drm/i915: Disable -Wuninitialized

2019-01-26 Thread Nathan Chancellor
({ 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 Chan

Re: [PATCH v2] drm/i915: Disable -Wuninitialized

2019-01-26 Thread Nathan Chancellor
On Fri, Jan 25, 2019 at 11:34:19PM -0800, Nick Desaulniers wrote: > On Fri, Jan 25, 2019 at 11:13 PM 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 wa

[PATCH] drm/amd/display: Use memset to initialize variables in amdgpu_dm_atomic_commit_tail

2019-02-03 Thread Nathan Chancellor
y underscan and ABM commit") Signed-off-by: Nathan Chancellor --- drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 7 +-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.

[PATCH] drm/amd/display: Use memset to initialize variables in fill_plane_dcc_attributes

2019-02-03 Thread Nathan Chancellor
[1]: https://lore.kernel.org/lkml/022e41c0-8465-dc7a-a45c-64187ecd9...@amd.com/ [2]: https://lore.kernel.org/lkml/20181128.215241.702406654469517539.da...@davemloft.net/ Fixes: 7df7e505e82a ("drm/amd/display: Set requested plane state DCC params for GFX9") Signed-off-by: Nathan Chancellor ---

[PATCH] drm/amd/display: Use memset to initialize variable in wait_for_training_aux_rd_interval

2019-02-03 Thread Nathan Chancellor
itialized union") Signed-off-by: Nathan Chancellor --- drivers/gpu/drm/amd/display/dc/core/dc_link_dp.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/drivers/gpu/drm/amd/display/dc/core/dc_link_dp.c b/drivers/gpu/drm/amd/display/dc/core/dc_link_dp.c index 92f565ca1260..5ee36

Re: [PATCH] drm/i915: Disable -Wuninitialized for intel_breadcrumbs.o

2018-12-18 Thread Nathan Chancellor
On Thu, Oct 25, 2018 at 12:36:01PM -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: > > I

Re: [PATCH] drm/i915: Disable -Wuninitialized for intel_breadcrumbs.o

2018-12-19 Thread Nathan Chancellor
On Tue, Dec 18, 2018 at 11:53:06AM +, Chris Wilson wrote: > Quoting Nick Desaulniers (2018-10-25 23:20:58) > > On Thu, Oct 25, 2018 at 12:36 PM Nathan Chancellor > > wrote: > > > > > > This warning is disabled by default in scripts/Makefile.extrawarn when

Clang warning in drivers/gpu/drm/i915/i915_debugfs.c

2019-01-09 Thread Nathan Chancellor
Hi all, Commit e845f099f1c6 ("drm/i915/dsc: Add Per connector debugfs node for DSC support/enable") causes a Clang warning: drivers/gpu/drm/i915/i915_debugfs.c:4961:17: warning: address of array 'intel_dp->dsc_dpcd' will always evaluate to 'true' [-Wpointer-bool-conversion] if (i

[PATCH] drm: rcar-du: Fix build error

2019-01-20 Thread Nathan Chancellor
es are not defined anymore, as they were implicitly coming into that file through drm_crtc.h. Fixes: 428747ae5cca ("drm: remove include of drmP.h from bridge/dw_hdmi.h") Fixes: 9a47db8e7a9d ("drm: rcar-du: Remove inclusion of drmP.h") Signed-off-by: Nathan Chancellor --- dri

Re: [PATCH] drm/amd/display: Pass app_tf by value rather than by reference

2019-02-25 Thread Nathan Chancellor
On Mon, Dec 10, 2018 at 04:42:01PM -0700, Nathan Chancellor wrote: > Clang warns when an expression that equals zero is used as a null > pointer constant (in lieu of NULL): > > drivers/gpu/drm/amd/amdgpu/../display/amdgpu_dm/amdgpu_dm.c:4435:3: > warning: expression which ev

[PATCH] drm/vmwgfx: Zero initialize handle in vmw_execbuf_process

2019-03-07 Thread Nathan Chancellor
n issue because the value of handle isn't used when user_fence_rep is NULL because vmw_execbuf_copy_fence_user returns immediately when that is the case. Just zero initialize this variable so that Clang no longer warns. Link: https://github.com/ClangBuiltLinux/linux/issues/397 Signed-off-by: N

Re: [PATCH] drm/amd/display: avoid passing enum as NULL pointer

2019-03-07 Thread Nathan Chancellor
On Thu, Mar 07, 2019 at 11:34:29AM +0100, Arnd Bergmann wrote: > The mod_freesync_build_vrr_infopacket() function uses rather obscure > calling conventions, where an enum is passed in through a pointer, > and a NULL pointer is expected to behave the same way as the zero-value > (TRANSFER_FUNC_UNKNO

[PATCH] drm/i915: Zero initialize this_cpu in busywait_stop

2019-03-07 Thread Nathan Chancellor
inux/linux/issues/415 Signed-off-by: Nathan Chancellor --- Alternatively, this can be solved by having the return value of local_clock_us(&this_cpu) be a local variable but this seems less controversial. drivers/gpu/drm/i915/i915_request.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(

arm32 build failure after abe882a39a9c ("drm/amd/display: fix issue with eDP not detected on driver load")

2019-06-18 Thread Nathan Chancellor
Hi all, After commit abe882a39a9c ("drm/amd/display: fix issue with eDP not detected on driver load") in -next, arm32 allyesconfig builds start failing at link time: arm-linux-gnueabi-ld: drivers/gpu/drm/amd/display/dc/core/dc_link.o: in function `dc_link_detect': dc_link.c:(.text+0x260c): undefi

Re: [PATCH] drm/msm/dsi: Add parentheses to quirks check in dsi_phy_hw_v3_0_lane_settings

2019-06-19 Thread Nathan Chancellor
On Wed, Jun 19, 2019 at 03:13:40PM -0400, Sean Paul wrote: > On Wed, Jun 19, 2019 at 12:19 PM Nathan Chancellor > wrote: > > > > Clang warns: > > > > drivers/gpu/drm/msm/dsi/phy/dsi_phy_10nm.c:80:6: warning: logical not is > > only applied to the lef

[PATCH v2] drm/msm/dsi: Add parentheses to quirks check in dsi_phy_hw_v3_0_lane_settings

2019-06-19 Thread Nathan Chancellor
first then negated. Fixes: 3dbbf8f09e83 ("drm/msm/dsi: Add old timings quirk for 10nm phy") Link: https://github.com/ClangBuiltLinux/linux/issues/547 Reported-by: kbuild test robot Reviewed-by: Jeffrey Hugo Reviewed-by: Sean Paul Signed-off-by: Nathan Chancellor --- v1 -> v2:

[PATCH] drm/msm/dsi: Add parentheses to quirks check in dsi_phy_hw_v3_0_lane_settings

2019-06-20 Thread Nathan Chancellor
first then negated. Fixes: 3dbbf8f09e83 ("drm/msm/dsi: Add old timings quirk for 10nm phy") Link: https://github.com/ClangBuiltLinux/linux/547 Reported-by: kbuild test robot Reviewed-by: Jeffrey Hugo Signed-off-by: Nathan Chancellor --- drivers/gpu/drm/msm/dsi/phy/dsi_phy_10nm.c

[PATCH 3/7] drm/amd/powerplay: Use proper enums in smu_adjust_power_state_dynamic

2019-07-04 Thread Nathan Chancellor
uot;drm/amd/powerplay: Unify smu handle task function (v2)") Link: https://github.com/ClangBuiltLinux/linux/issues/584 Signed-off-by: Nathan Chancellor --- drivers/gpu/drm/amd/powerplay/amdgpu_smu.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/gpu/d

[PATCH 1/7] drm/amdgpu/mes10.1: Fix header guard

2019-07-04 Thread Nathan Chancellor
d ("drm/amdgpu/mes10.1: add ip block mes10.1 (v2)") Link: https://github.com/ClangBuiltLinux/linux/issues/582 Signed-off-by: Nathan Chancellor --- drivers/gpu/drm/amd/amdgpu/mes_v10_1.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpu/drm/amd/amdgpu/mes_v10_1.h

[PATCH 6/7] drm/amd/powerplay: Use proper enums in vega20_print_clk_levels

2019-07-04 Thread Nathan Chancellor
xes: 096761014227 ("drm/amd/powerplay: support sysfs to get socclk, fclk, dcefclk") Link: https://github.com/ClangBuiltLinux/linux/issues/587 Signed-off-by: Nathan Chancellor --- drivers/gpu/drm/amd/powerplay/vega20_ppt.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(

[PATCH 5/7] drm/amd/display: Use proper enum conversion functions

2019-07-04 Thread Nathan Chancellor
Fixes: a43913ea50a5 ("drm/amd/powerplay: add function get_clock_by_type_with_latency for navi10") Fixes: e5e4e22391c2 ("drm/amd/powerplay: add interface to get clock by type with latency for display (v2)") Link: https://github.com/ClangBuiltLinux/linux/issues/586 Signed

[PATCH 2/7] drm/amd/powerplay: Use memset to initialize metrics structs

2019-07-04 Thread Nathan Chancellor
clock freq interface for navi10") Fixes: ab43c4bf1cc8 ("drm/amd/powerplay: fix fan speed show error (for hwmon pwm)") Link: https://github.com/ClangBuiltLinux/linux/issues/583 Signed-off-by: Nathan Chancellor --- drivers/gpu/drm/amd/powerplay/navi10_ppt.c | 8 ++-- 1 file ch

[PATCH 7/7] drm/amd/powerplay: Zero initialize current_rpm in vega20_get_fan_speed_percent

2019-07-04 Thread Nathan Chancellor
es: ee0db82027ee ("drm/amd/powerplay: move PPTable_t uses into asic level") Link: https://github.com/ClangBuiltLinux/linux/issues/588 Signed-off-by: Nathan Chancellor --- drivers/gpu/drm/amd/powerplay/vega20_ppt.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/g

[PATCH 4/7] drm/amd/powerplay: Zero initialize freq in smu_v11_0_get_current_clk_freq

2019-07-04 Thread Nathan Chancellor
-> Mhz)") Link: https://github.com/ClangBuiltLinux/linux/issues/585 Signed-off-by: Nathan Chancellor --- drivers/gpu/drm/amd/powerplay/smu_v11_0.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpu/drm/amd/powerplay/smu_v11_0.c b/drivers/gpu/drm/amd/powerplay/smu_v11_

[PATCH 0/7] amdgpu clang warning fixes on next-20190703

2019-07-04 Thread Nathan Chancellor
Hi all, I don't do threaded patches very often so if I have messed something up, please forgive me :) This series fixes all of the clang warnings that I saw added in next-20190703. The full list is visible in the gist linked below and each full individual warning can be seen in the GitHub link in

Re: [PATCH] drm/amd/powerplay: work around enum conversion warnings

2019-07-09 Thread Nathan Chancellor
Hi Arnd, On Mon, Jul 08, 2019 at 03:57:06PM +0200, Arnd Bergmann wrote: > A couple of calls to smu_get_current_clk_freq() and smu_force_clk_levels() > pass constants of the wrong type, leading to warnings with clang-8: > > drivers/gpu/drm/amd/amdgpu/../powerplay/vega20_ppt.c:995:39: error: implic

Re: [1/2] drm/amd/powerplay: smu_v11_0: fix uninitialized variable use

2019-07-09 Thread Nathan Chancellor
On Mon, Jul 08, 2019 at 04:07:58PM +0200, Arnd Bergmann wrote: > A mistake in the error handling caused an uninitialized > variable to be used: > > drivers/gpu/drm/amd/amdgpu/../powerplay/smu_v11_0.c:1102:10: error: variable > 'freq' is used uninitialized whenever '?:' condition is false > [-Wer

Re: [PATCH 5/7] drm/amd/display: Use proper enum conversion functions

2019-07-10 Thread Nathan Chancellor
On Tue, Jul 09, 2019 at 08:51:33PM +0200, Arnd Bergmann wrote: > On Thu, Jul 4, 2019 at 7:52 AM Nathan Chancellor > wrote: > > > > clang warns: > > > > drivers/gpu/drm/amd/amdgpu/../display/amdgpu_dm/amdgpu_dm_pp_smu.c:336:8: > > warning: implicit co

Re: [PATCH 0/7] amdgpu clang warning fixes on next-20190703

2019-07-10 Thread Nathan Chancellor
On Mon, Jul 08, 2019 at 11:55:50AM -0400, Alex Deucher wrote: > Applied the series. thanks! > > Alex Thank you :) I don't see the enum conversion ones in your current tree. If they indeed caused issues, could you guys please look into fixing the warnings properly yourselves (maybe something lik

Re: Clang warning in drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c

2019-03-20 Thread Nathan Chancellor
can make one then. > > Thanks > xinhui > > > -Original Message- > From: Nathan Chancellor > Sent: 2019年3月20日 8:54 > To: Deucher, Alexander ; Koenig, Christian > ; Zhou, David(ChunMing) ; Pan, > Xinhui > Cc: amd-...@lists.freedesktop.org; dri-devel@

Clang warning in drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c

2019-03-20 Thread Nathan Chancellor
Hi all, The introduction of this file in commit dbd249c24427 ("drm/amdgpu: add amdgpu_ras.c to support ras (v2)") introduces the following Clang warnings: drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c:544:23: warning: implicit conversion from enumeration type 'enum amdgpu_ras_block' to different enume

[PATCH] drm/amd/powerplay: Zero initialize num_of_levels in vega20_set_single_dpm_table

2019-03-20 Thread Nathan Chancellor
s the same. Fixes: 870b996f955f ("drm/amd/powerplay: set defalut dpm table for smu") Link: https://github.com/ClangBuiltLinux/linux/issues/425 Signed-off-by: Nathan Chancellor --- drivers/gpu/drm/amd/powerplay/vega20_ppt.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/

Re: Clang warning in drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c

2019-03-21 Thread Nathan Chancellor
struct amdgpu_device *adev); void amdgpu_ras_post_init(struct amdgpu_device *adev); > On Wed, Mar 20, 2019 at 2:37 AM Koenig, Christian > wrote: > > > Am 20.03.19 um 05:34 schrieb Nathan Chancellor: > > > On Wed, Mar 20, 2019 at 01:31:27AM +, Pan, Xinhui wrote: > &

Re: [PATCH] drm/amd/display: return 'NULL' instead of 'false' from dcn20_acquire_idle_pipe_for_layer

2019-07-13 Thread Nathan Chancellor
4e6352c16 ("drm/amd/display: Add DCN2 HW Sequencer and Resource") > Signed-off-by: Arnd Bergmann Reviewed-by: Nathan Chancellor ___ dri-devel mailing list dri-devel@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/dri-devel

Re: [PATCH 6/7] drm/amd/powerplay: Use proper enums in vega20_print_clk_levels

2019-07-15 Thread Nathan Chancellor
On Mon, Jul 15, 2019 at 11:25:29AM +0200, Arnd Bergmann wrote: > On Thu, Jul 4, 2019 at 7:52 AM Nathan Chancellor > wrote: > > > > clang warns: > > > > drivers/gpu/drm/amd/amdgpu/../powerplay/vega20_ppt.c:995:39: warning: > > implicit conversion from enu

Re: [PATCH 5/7] drm/amd/display: Use proper enum conversion functions

2019-07-19 Thread Nathan Chancellor
On Wed, Jul 03, 2019 at 10:52:16PM -0700, Nathan Chancellor wrote: > clang warns: > > drivers/gpu/drm/amd/amdgpu/../display/amdgpu_dm/amdgpu_dm_pp_smu.c:336:8: > warning: implicit conversion from enumeration type 'enum smu_clk_type' > to different enumeration typ

Re: linux-next: Tree for Jun 15 (drivers/gpu/drm/amd/amdgpu/../display/amdgpu_dm/amdgpu_dm.c)

2022-06-15 Thread Nathan Chancellor
On Wed, Jun 15, 2022 at 03:28:52PM -0400, Alex Deucher wrote: > On Wed, Jun 15, 2022 at 3:01 PM Randy Dunlap wrote: > > > > > > > > On 6/14/22 23:01, Stephen Rothwell wrote: > > > Hi all, > > > > > > Changes since 20220614: > > > > > > > on i386: > > # CONFIG_DEBUG_FS is not set > > > > > > ../dri

Re: linux-next: Tree for Jun 15 (drivers/gpu/drm/amd/amdgpu/../display/amdgpu_dm/amdgpu_dm.c)

2022-06-15 Thread Nathan Chancellor
On Wed, Jun 15, 2022 at 04:45:16PM -0400, Alex Deucher wrote: > On Wed, Jun 15, 2022 at 4:24 PM Nathan Chancellor wrote: > > > > On Wed, Jun 15, 2022 at 03:28:52PM -0400, Alex Deucher wrote: > > > On Wed, Jun 15, 2022 at 3:01 PM Randy Dunlap > > > wrote: > &

Re: [PATCH 5/5] drm/stm: ltdc: add support of ycbcr pixel formats

2022-02-02 Thread Nathan Chancellor
Hi Yannick, On Wed, Dec 15, 2021 at 10:48:43PM +0100, Yannick Fertre wrote: > This patch adds the following YCbCr input pixel formats on the latest > LTDC hardware version: > > 1 plane (co-planar) : YUYV, YVYU, UYVY, VYUY > 2 planes (semi-planar): NV12, NV21 > 3 planes (full-planar): YU12=I420=

[PATCH] drm/stm: Avoid using val uninitialized in ltdc_set_ycbcr_config()

2022-02-07 Thread Nathan Chancellor
message so that this return is not silent, which could hide issues in the future. Fixes: 484e72d3146b ("drm/stm: ltdc: add support of ycbcr pixel formats") Link: https://github.com/ClangBuiltLinux/linux/issues/1575 Signed-off-by: Nathan Chancellor --- drivers/gpu/drm/stm/ltdc.c | 3 ++-

Re: [PATCH 5/5] drm/stm: ltdc: add support of ycbcr pixel formats

2022-02-07 Thread Nathan Chancellor
On Mon, Feb 07, 2022 at 11:00:34AM +0100, yannick Fertre wrote: > Hi Nathan, > > On 2/2/22 17:54, Nathan Chancellor wrote: > > Hi Yannick, > > > > On Wed, Dec 15, 2021 at 10:48:43PM +0100, Yannick Fertre wrote: > > > This patch adds the following YCb

Re: [PATCH] drm/i915: fix build issue when using clang

2022-02-13 Thread Nathan Chancellor
On Sat, Feb 12, 2022 at 10:51:06PM -0800, Tong Zhang wrote: > drm/i915 target adds some extra cflags, especially it does re-apply -Wall. > In clang this will override -Wno-format-security and cause the build to > fail when CONFIG_DRM_I915_WERROR=y. While with GCC this does not happen. > We reapply

Re: [PATCH v2] drm/i915: fix build issue when using clang

2022-02-15 Thread Nathan Chancellor
gt; Makefile so that these warnings do not show up with clang. > > Signed-off-by: Tong Zhang Given this is not enabled for GCC and it is disabled in the main Makefile: Reviewed-by: Nathan Chancellor Additionally, it seems like trace_printk() is designed to be able to take a string lit

[PATCH] drm/amdkfd: Use proper enum in pm_unmap_queues_v9()

2022-02-17 Thread Nathan Chancellor
meric value of the proper type. Fixes: 009e9a158505 ("drm/amdkfd: navi2x requires extended engines to map and unmap sdma queues") Link: https://github.com/ClangBuiltLinux/linux/issues/1596 Signed-off-by: Nathan Chancellor --- drivers/gpu/drm/amd/amdkfd/kfd_packet_manager_v9.c | 2 +- 1

Re: mainline build failure for x86_64 allmodconfig with clang

2022-08-04 Thread Nathan Chancellor
On Thu, Aug 04, 2022 at 09:24:41PM +0200, Arnd Bergmann wrote: > On Thu, Aug 4, 2022 at 8:52 PM Linus Torvalds > wrote: > > > > On Thu, Aug 4, 2022 at 11:37 AM Sudip Mukherjee (Codethink) > > wrote:cov_trace_cmp > > > > > > git bisect points to 3876a8b5e241 ("drm/amd/display: Enable building new

Re: mainline build failure for x86_64 allmodconfig with clang

2022-08-04 Thread Nathan Chancellor
On Thu, Aug 04, 2022 at 02:59:01PM -0700, Linus Torvalds wrote: > On Thu, Aug 4, 2022 at 1:43 PM Nathan Chancellor wrote: > > > > I do note that commit 1b54a0121dba ("drm/amd/display: Reduce stack size > > in the mode support function") did have a workaround for

Re: mainline build failure for x86_64 allmodconfig with clang

2022-08-05 Thread Nathan Chancellor
On Fri, Aug 05, 2022 at 06:16:45PM +0200, Arnd Bergmann wrote: > On Fri, Aug 5, 2022 at 5:32 PM Harry Wentland wrote: > > > I do notice that these files build with a non-configurable > > > -Wframe-large-than value: > > > > > > $ rg frame_warn_flag drivers/gpu/drm/amd/display/dc/dml/Makefile > > >

Re: mainline build failure for x86_64 allmodconfig with clang

2022-08-18 Thread Nathan Chancellor
Hi Arnd, Doubling back around to this now since I think this is the only thing breaking x86_64 allmodconfig with clang 11 through 15. On Fri, Aug 05, 2022 at 09:32:13PM +0200, Arnd Bergmann wrote: > On Fri, Aug 5, 2022 at 8:02 PM Nathan Chancellor wrote: > > On Fri, Aug 05, 2022 at 0

[PATCH] drm/i915: Fix CFI violation with show_dynamic_id()

2022-05-12 Thread Nathan Chancellor
n 'struct kobj_attributes' and update the type of sysfs_metric_id to match, which resolves the CFI violation. Fixes: f89823c21224 ("drm/i915/perf: Implement I915_PERF_ADD/REMOVE_CONFIG interface") Signed-off-by: Nathan Chancellor --- drivers/gpu/drm/i915/i915_perf.c

  1   2   3   4   >