Re: truncation in drivers/video/fbdev/neofb.c

2023-08-31 Thread Nick Desaulniers
On Thu, Aug 31, 2023 at 3:16 PM Helge Deller wrote: > > * Nick Desaulniers : > > On Thu, Aug 31, 2023 at 2:23 PM Helge Deller wrote: > > > > > > * Helge Deller : > > > > On 8/29/23 18:45, Nick Desaulniers wrote: > > > > > A rece

Re: truncation in drivers/video/fbdev/neofb.c

2023-08-31 Thread Nick Desaulniers
On Thu, Aug 31, 2023 at 2:23 PM Helge Deller wrote: > > * Helge Deller : > > On 8/29/23 18:45, Nick Desaulniers wrote: > > > A recent change in clang made it better about spotting snprintf that > > > will result in truncation. Nathan reported the following instan

truncation in drivers/video/fbdev/neofb.c

2023-08-29 Thread Nick Desaulniers
snprintf probably isn't necessary for string literals that don't contain format strings) -- Thanks, ~Nick Desaulniers

Re: [PATCH 1/2] drm/exec: use unique instead of local label

2023-08-02 Thread Nick Desaulniers
On Wed, Aug 2, 2023 at 1:44 AM Boris Brezillon wrote: > > On Tue, 1 Aug 2023 13:35:13 -0700 > Nick Desaulniers wrote: > > > On Mon, Jul 31, 2023 at 5:36 AM Christian König > > wrote: > > > > > > GCC forbids to jump to labels in loop conditions

Re: [PATCH 1/2] drm/exec: use unique instead of local label

2023-08-01 Thread Nick Desaulniers
7 > Reported-by: Nathan Chancellor > Reported-by: Naresh Kamboju > CC: Boris Brezillon > Signed-off-by: Christian König Works for me; thanks for the patch! Reviewed-by: Nick Desaulniers I suspect it's possible to change the indirect goto into a direct goto with

Re: [PATCH] drm: fix indirect goto into statement expression UB

2023-07-27 Thread Nick Desaulniers
://gcc.gnu.org/onlinedocs/gcc/Statement-Exprs.html > Link: https://github.com/ClangBuiltLinux/linux/issues/1890 > Link: > https://github.com/llvm/llvm-project/commit/20219106060208f0c2f5d096eb3aed7b712f5067 > Reported-by: Nathan Chancellor > Reported-by: Naresh Kamboju >

Re: [PATCH 1/2] drm/v3d: Avoid -Wconstant-logical-operand in nsecs_to_jiffies_timeout()

2023-07-21 Thread Nick Desaulniers
v3d_drv.h:343:24: note: remove constant to silence this > warning > 1 warning generated. > > Turn this into an explicit comparison against zero to make the > expression a boolean to make it clear this should be a logical check, > not a bitwise one. > > Link: https://reviews.l

Re: [PATCH] drm/i915: Fix clang -Wimplicit-fallthrough in intel_async_flip_check_hw()

2023-05-26 Thread Nick Desaulniers
On Thu, May 25, 2023 at 1:30 PM Matthieu Baerts wrote: > > Hi Nick, > > On 24/05/2023 20:56, Nick Desaulniers wrote: > > On Wed, May 24, 2023 at 11:41 AM Nathan Chancellor > > wrote: > >> > >> On Wed, May 24, 2023 at 11:32:32AM -0700, Nick Desaulniers

Re: [PATCH] drm/i915: Fix clang -Wimplicit-fallthrough in intel_async_flip_check_hw()

2023-05-24 Thread Nick Desaulniers
On Wed, May 24, 2023 at 11:41 AM Nathan Chancellor wrote: > > On Wed, May 24, 2023 at 11:32:32AM -0700, Nick Desaulniers wrote: > > On Wed, May 24, 2023 at 8:38 AM Nathan Chancellor wrote: > > > > > > Clang warns: > > > > > > drivers/gp

Re: [PATCH] drm/i915: Fix clang -Wimplicit-fallthrough in intel_async_flip_check_hw()

2023-05-24 Thread Nick Desaulniers
case I915_FORMAT_MOD_Y_TILED: > > --- > base-commit: 9a2cb1b31c040e2f1b313e2f7921f0f5e6b66d82 > change-id: > 20230524-intel_async_flip_check_hw-implicit-fallthrough-c4c40b03802f > > Best regards, > -- > Nathan Chancellor > -- Thanks, ~Nick Desaulniers

Re: [PATCH] drm/panel: samsung-s6d7aa0: use pointer for drm_mode in panel desc struct

2023-05-23 Thread Nick Desaulniers
On Tue, May 23, 2023 at 2:29 PM Nick Desaulniers wrote: > > On Tue, May 23, 2023 at 2:20 PM Artur Weber wrote: > > > > Fixes compilation errors on older GCC versions (before 8.x) and Clang > > after changes introduced in commit 6810bb390282 ("drm/panel: Add > &g

Re: [PATCH] drm/panel: samsung-s6d7aa0: use pointer for drm_mode in panel desc struct

2023-05-23 Thread Nick Desaulniers
.bus_flags = 0, > > @@ -458,7 +458,7 @@ static int s6d7aa0_get_modes(struct drm_panel *panel, > if (!ctx) > return -EINVAL; > > - mode = drm_mode_duplicate(connector->dev, >desc->drm_mode); > + mode = drm_mode_duplicate(connector->dev, ctx->desc->drm_mode); > if (!mode) > return -ENOMEM; > > > base-commit: 37cee4876a45a5c3da79a83d34ed4f3c68548aef > -- > 2.40.1 > -- Thanks, ~Nick Desaulniers

Re: [PATCH v2 1/2] phy: mediatek: hdmi: mt8195: fix uninitialized variable usage in pll_calc

2023-04-24 Thread Nick Desaulniers
PLL_FBKDIV_HS3, posdiv1, posdiv2, txprediv, > > txposdiv, digital_div); > > - if (ret) > > - return -EINVAL; > > - > > - return 0; > > } > > > > static int mtk_hdmi_pll_drv_setting(struct clk_hw *hw) > > > > -- > > 2.40.0 > > > -- Thanks, ~Nick Desaulniers

Re: [PATCH] accel/qaic: initialize ret variable to 0

2023-04-18 Thread Nick Desaulniers
truct drm_gem_object > > *obj, struct vm_area_struc > > struct qaic_bo *bo = to_qaic_bo(obj); > > unsigned long offset = 0; > > struct scatterlist *sg; > > - int ret; > > + int ret = 0; > > > > if (obj->import_attach) > > return -EINVAL; > -- Thanks, ~Nick Desaulniers

Re: [PATCH] drm/qxl: remove variable count

2023-04-18 Thread Nick Desaulniers
Thanks for the patch! Fixes: 64122c1f6ad ("drm: add new QXL driver. (v1.4)") Reviewed-by: Nick Desaulniers > > Signed-off-by: Tom Rix > --- > drivers/gpu/drm/qxl/qxl_cmd.c | 2 -- > 1 file changed, 2 deletions(-) > > diff --git a/drivers/gpu/drm/qxl/qxl_cmd.c

Re: [PATCH] drm/amd/display: remove unused matching_stream_ptrs variable

2023-04-07 Thread Nick Desaulniers
On Fri, Apr 7, 2023 at 10:52 AM Nick Desaulniers wrote: > > Jimmy, can you review? > > The change LGTM; but I'm not sure if there was something else intended here. Nevermind, Jimmy's email address bounced. Reviewed-by: Nick Desaulniers > > On Sat, Mar 25, 2023 at 6:45

Re: [PATCH] drm/nouveau/acr: remove unused loc variable

2023-04-07 Thread Nick Desaulniers
^ > This variable is not used so remove it. > > Signed-off-by: Tom Rix Ben, any idea if this was supposed to be used somewhere? If not: Fixes: 4b569ded09fd ("drm/nouveau/acr/ga102: initial support") Reviewed-by: Nick Desaulniers > --- > drivers/gpu/drm/nouveau/nvkm/sub

Re: [PATCH] drm/qxl: remove unused num_relocs variable

2023-04-07 Thread Nick Desaulniers
riable is not used so remove it. > > Signed-off-by: Tom Rix Thanks for the patch! Fixes: 74d9a6335dce ("drm/qxl: Simplify cleaning qxl processing command") Reviewed-by: Nick Desaulniers That commit should also have removed the label out_free_bos IMO since having two labels for the sam

Re: [PATCH] drm/amd/pm: remove unused num_of_active_display variable

2023-04-07 Thread Nick Desaulniers
ive_display = 0; > ^ > This variable is not used so remove it. > > Signed-off-by: Tom Rix Thanks for the patch! Fixes: commit 75145aab7a0d ("drm/amdgpu/swsmu: clean up a bunch of stale interfaces") Reviewed-by: Nick Desaulniers > --- > drivers/gpu/drm/amd/pm/swsmu/amdgpu_smu.c

Re: [PATCH] drm/nouveau/svm: remove unused ret variable

2023-04-07 Thread Nick Desaulniers
114 /*XXX: warn? */ 134 /*XXX: warn? */ or other places where the return code isn't checked makes me think that a better approach would be to 1. plumb error codes back up through nouveau_pfns_map() (and other call sites of nvif_object_ioctl) 2. consider making nvif_object_ioctl __must_check > > mutex_unlock(>mutex); > } > -- > 2.27.0 > -- Thanks, ~Nick Desaulniers

Re: [PATCH] drm/amd/display: remove unused matching_stream_ptrs variable

2023-04-07 Thread Nick Desaulniers
if (assignment.stream != state->streams[i]) > valid_stream_ptrs = false; > } > } > -- > 2.27.0 > -- Thanks, ~Nick Desaulniers

Re: [PATCH] drm/vmwgfx: remove unused mksstat_init_record function

2023-04-07 Thread Nick Desaulniers
, mksstat_kern_name_desc[stat_idx][0]); > - strcpy(pstrd, mksstat_kern_name_desc[stat_idx][1]); > - > - pinfo[stat_idx].name.s = pstrs; > - pinfo[stat_idx].description.s = pstrd; > - pinfo[stat_idx].flags = MKS_GUEST_STAT_FLAG_NONE; This was the last user

Re: [PATCH] drm/vmwgfx: remove unused vmw_overlay function

2023-04-07 Thread Nick Desaulniers
drm_device *dev) > ^ > This function is not used, so remove it. > > Signed-off-by: Tom Rix Thanks for the patch! Reviewed-by: Nick Desaulniers > --- > drivers/gpu/drm/vmwgfx/vmwgfx_overlay.c | 6 -- > 1 file changed, 6 deletions(-) > > diff --git a/drivers/gpu/dr

Re: [PATCH] drm/kmb: remove unused set_test_mode_src_osc_freq_target_low, hi_bits functions

2023-04-07 Thread Nick Desaulniers
used, so remove them. > > Signed-off-by: Tom Rix Thanks for the patch! Reviewed-by: Nick Desaulniers > --- > 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/drm/k

Re: Linux 6.3-rc3

2023-03-22 Thread Nick Desaulniers
t; > make ARCH=i386 > > because the ARCH choice ends up being in the .config file, but the > makefiles themselves always take it from the environment. > > There are good historical reasons for our behavior (and probably a > number of extant practical reasons too), but it's a bit annoying, and > it would be lovely if we could start moving away from this model. > > Linus > -- Thanks, ~Nick Desaulniers

Re: [PATCH] gpu: host1x: fix uninitialized variable use

2023-02-01 Thread Nick Desaulniers
t interrupt handling") > Signed-off-by: Arnd Bergmann Thanks Arnd, I saw some reports from kernelci about this, too. https://lore.kernel.org/linux-next/?q=warning%3A+variable+%27syncpt_irq%27+is+uninitialized+when+used+here Reported-by: "kernelci.org bot" Reviewed-by: Nick Desa

Re: [PATCH v2 2/2] drm/vc4: hdmi: Fix pointer dereference before check

2022-11-17 Thread Nick Desaulniers
On Thu, Nov 10, 2022 at 02:47:52PM +0100, José Expósito wrote: > Commit 6bed2ea3cb38 ("drm/vc4: hdmi: Reset link on hotplug") introduced > the vc4_hdmi_reset_link() function. This function dereferences the > "connector" pointer before checking whether it is NULL or not. > > Rework variable

Re: [PATCH v2] overflow: Introduce overflows_type() and castable_to_type()

2022-09-26 Thread Nick Desaulniers
o {\ > + typeof(t1) __t1h = type_max(t1);\ > + typeof(t1) __t1l = type_min(t1);\ > + typeof(t2) __t2h = type_max(t2);\ > + typeof(t2) __t2l = type_min(t2); \ Can we use __auto_type here rather than typeof(macro expansion)? -- Thanks, ~Nick Desaulniers

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

2021-09-30 Thread Nick Desaulniers
On Thu, Sep 30, 2021 at 10:10 AM Alex Deucher wrote: > > Applied. Thanks! > > Alex > > On Thu, Sep 30, 2021 at 12:23 PM Nathan Chancellor wrote: > > > > Clang warns: Any chance AMDGPU folks can look into adding clang to the CI roster? -- Thanks, ~Nick Desaulniers

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

2021-09-14 Thread Nick Desaulniers
ately. > Enable it now that i915 is clean so that it stays that way. > > Signed-off-by: Nathan Chancellor Thanks for the series! Reviewed-by: Nick Desaulniers > --- > drivers/gpu/drm/i915/Makefile | 1 - > 1 file changed, 1 deletion(-) > > diff --git a/drivers/gpu/drm/i915/Ma

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

2021-08-25 Thread Nick Desaulniers
e.kernel.org/r/20210824022640.2170859-1-nat...@kernel.org/ > > Signed-off-by: Nathan Chancellor Thanks for the patch! Do you need to re-ping, rebase, or resend that other series? Reviewed-by: Nick Desaulniers > --- > > NOTE: This is based on my series to enable -Wsometime

Re: [PATCH 01/64] media: omap3isp: Extract struct group for memcpy() region

2021-07-30 Thread Nick Desaulniers
t; > struct foo ok1 = { }; > struct foo ok2 = { .flag = 7 }; > struct foo ok3 = { .ptr = NULL }; > > This is not: > > struct foo bad = { .flag = 7, .ptr = NULL }; > > (But, of course, it depends on padding size, compiler version, and > architecture. i.e. things remain unreliable.) > > -- -- Thanks, ~Nick Desaulniers

Re: [PATCH 34/64] fortify: Detect struct member overflows in memcpy() at compile-time

2021-07-27 Thread Nick Desaulniers
t a/lib/test_fortify/read_overflow2_field-memcpy.c > b/lib/test_fortify/read_overflow2_field-memcpy.c > new file mode 100644 > index ..de9569266223 > --- /dev/null > +++ b/lib/test_fortify/read_overflow2_field-memcpy.c > @@ -0,0 +1,5 @@ > +// SPDX-License-Identifier: GPL-2.0-only > +#define TEST \ > + memcpy(large, instance.buf, sizeof(instance.buf) + 1) > + > +#include "test_fortify.h" > diff --git a/lib/test_fortify/write_overflow_field-memcpy.c > b/lib/test_fortify/write_overflow_field-memcpy.c > new file mode 100644 > index ..28cc81058dd3 > --- /dev/null > +++ b/lib/test_fortify/write_overflow_field-memcpy.c > @@ -0,0 +1,5 @@ > +// SPDX-License-Identifier: GPL-2.0-only > +#define TEST \ > + memcpy(instance.buf, large, sizeof(instance.buf) + 1) > + > +#include "test_fortify.h" > -- I haven't read the whole series yet, but I assume test_fortify.h was provided earlier in the series? -- Thanks, ~Nick Desaulniers

Re: [PATCH] drm/amdgpu: make DRM_AMD_DC x86-only again

2020-12-11 Thread Nick Desaulniers
On Tue, Dec 8, 2020 at 2:18 PM Arnd Bergmann wrote: > > On Tue, Dec 8, 2020 at 7:21 PM 'Nick Desaulniers' via Clang Built > Linux wrote: > > > > On Tue, Dec 8, 2020 at 6:26 AM Arnd Bergmann wrote: > > > > > > On Mon, Dec 7, 2020 at 11:28 PM 'Nick Desaulni

Re: [PATCH] drm/amdgpu: make DRM_AMD_DC x86-only again

2020-12-09 Thread Nick Desaulniers
On Tue, Dec 8, 2020 at 6:26 AM Arnd Bergmann wrote: > > On Mon, Dec 7, 2020 at 11:28 PM 'Nick Desaulniers' via Clang Built > Linux wrote: > > > > On Mon, Dec 7, 2020 at 2:17 PM Arnd Bergmann wrote: > > > > > > On Mon, Dec 7, 2020 at 11:08 PM 'Nick Desaulni

Re: [PATCH] drm/amdgpu: make DRM_AMD_DC x86-only again

2020-12-08 Thread Nick Desaulniers
Right, looking at my latest randconfig logs, I see the same problem on x86 > builds with clang as well, though I'm not entirely sure which other > configuration > options are needed to trigger it. > > So my patch can be disregarded, but I agree this needs a better fix, > either in clang or in the dcn driver. If you could give https://github.com/ClangBuiltLinux/frame-larger-than a spin again, I would appreciate any feedback. -- Thanks, ~Nick Desaulniers ___ dri-devel mailing list dri-devel@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/dri-devel

Re: [PATCH v7 17/17] mm: add mmu_notifier argument to follow_pfn

2020-12-01 Thread Nick Desaulniers
t; 1920 * *gfn_to_pfn* ultimately call kvm_release_pfn_clean > > on the > > 1921 * returned pfn. This is only needed if the VMA has > > VM_MIXEDMAP > > 1922 * set, but the kvm_get_pfn/kvm_release_pfn_clean > > pair will > > 1923 * simply do nothing for reserved pfns. > > 1924 * > > 1925 * Whoever called remap_pfn_range is also going to > > call e.g. > > 1926 * unmap_mapping_range before the underlying pages > > are freed, > > 1927 * causing a call to our MMU notifier. > > 1928 */ > > 1929kvm_get_pfn(pfn); > > 1930 > > 1931*p_pfn = pfn; > > 1932return 0; > > 1933} > > 1934 > > > > --- > > 0-DAY CI Kernel Test Service, Intel Corporation > > https://lists.01.org/hyperkitty/list/kbuild-...@lists.01.org > > > > -- > Daniel Vetter > Software Engineer, Intel Corporation > http://blog.ffwll.ch > > -- > You received this message because you are subscribed to the Google Groups > "Clang Built Linux" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to clang-built-linux+unsubscr...@googlegroups.com. > To view this discussion on the web visit > https://groups.google.com/d/msgid/clang-built-linux/20201130142820.GN401619%40phenom.ffwll.local. -- Thanks, ~Nick Desaulniers ___ dri-devel mailing list dri-devel@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/dri-devel

Re: [RFC] treewide: cleanup unreachable breaks

2020-10-20 Thread Nick Desaulniers
iled https://github.com/ClangBuiltLinux/linux/issues/1180 to follow up on. -- Thanks, ~Nick Desaulniers ___ dri-devel mailing list dri-devel@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/dri-devel

Re: drivers/gpu/drm/panel/panel-samsung-ld9040.c:240:12: warning: stack frame size of 8312 bytes in function 'ld9040_prepare'

2020-06-30 Thread Nick Desaulniers
On Sat, Jun 27, 2020 at 12:43 PM Vladimir Oltean wrote: > > Hi Nick, > > On Mon, 22 Jun 2020 at 19:50, Nick Desaulniers > wrote: > > > > > > I really don't get what's the problem here. The listing of > > > ld9040_prepare at the given commit and with th

Re: [PATCH] amdgpu: fix integer overflow on 32-bit architectures

2020-05-06 Thread Nick Desaulniers
; To unsubscribe from this group and stop receiving emails from it, send an > email to clang-built-linux+unsubscr...@googlegroups.com. > To view this discussion on the web visit > https://groups.google.com/d/msgid/clang-built-linux/e4a852b2-807b-bc73-7328-bcc399341085%40amd.com. -- Thanks, ~Nick Desaulniers ___ dri-devel mailing list dri-devel@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/dri-devel

Re: [PATCH v2 2/2] powerpc: Remove Xilinx PPC405/PPC440 support

2020-04-01 Thread Nick Desaulniers
On Mon, Mar 30, 2020 at 6:32 AM Michal Simek wrote: > > The latest Xilinx design tools called ISE and EDK has been released in > October 2013. New tool doesn't support any PPC405/PPC440 new designs. > These platforms are no longer supported and tested. > > PowerPC 405/440 port is orphan from 2013

Re: [PATCH] drm/i915: Cast remain to unsigned long in eb_relocate_vma

2020-03-17 Thread Nick Desaulniers
remain = entry->relocation_count; +#ifndef CONFIG_64BIT if (unlikely(remain > N_RELOC(ULONG_MAX))) return -EINVAL; +#endif /* * We must check that the entire relocation array is safe ``` We now have 4 proposed solutions: 1. https://lore.kernel.org/lkml/20191123195321.41305-1-natechancel...@gmail.com/ 2. https://lore.kernel.org/lkml/20200211050808.29463-1-natechancel...@gmail.com/ 3. https://lore.kernel.org/lkml/20200214054706.33870-1-natechancel...@gmail.com/ 4. my diff above Let's please come to a resolution on this. -- Thanks, ~Nick Desaulniers ___ dri-devel mailing list dri-devel@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/dri-devel

Re: [PATCH v2] drm/edid: Distribute switch variables for initialization

2020-03-07 Thread Nick Desaulniers
On Fri, Mar 6, 2020 at 9:36 AM Nick Desaulniers wrote: > > On Fri, Mar 6, 2020 at 9:32 AM Kees Cook wrote: > > > > Variables declared in a switch statement before any case statements > > cannot be automatically initialized with compiler instrumentation (as > > they

Re: [PATCH v2] drm/edid: Distribute switch variables for initialization

2020-03-07 Thread Nick Desaulniers
5 | int sad_count; > | ^ > > [1] https://bugs.llvm.org/show_bug.cgi?id=44916 > > Signed-off-by: Kees Cook Reviewed-by: Nick Desaulniers > --- > v2: move into function block instead being switch-local (Ville Syrjälä) > --- > drivers/gpu/drm

Re: [PATCH v2] drm/i915: Disable -Wtautological-constant-out-of-range-compare

2020-02-14 Thread Nick Desaulniers
warning. > > > > I do like this one better than the former. > > FWIW, one downside of this one compared to all alternatives (presumably) > is that it might end up generating actual code even on 64-bit, which > always ends up skipping the return. The warning is pointing out that the conditional is always false, which is correct on 64b. The check is only active for 32b. https://godbolt.org/z/oQrgT_ The cast silences the warning for 64b. (Note that GCC and Clang also generate precisely the same instruction sequences in my example, just GCC doesn't warn on such tautologies). -- Thanks, ~Nick Desaulniers ___ dri-devel mailing list dri-devel@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/dri-devel

Re: [PATCH] fbmem: Adjust indentation in fb_prepare_logo and fb_blank

2019-12-23 Thread Nick Desaulniers
alize the indentation in these functions so that it is > consistent with the Linux kernel coding style and clang no longer warns. > > Fixes: 1692b37c99d5 ("fbdev: Fix logo if logo depth is less than framebuffer > depth") > Link: https://github.com/ClangBuiltLinux/linux/issu

Re: [PATCH] drm/i915: Remove tautological compare in eb_relocate_vma

2019-12-04 Thread Nick Desaulniers
On Tue, Dec 3, 2019 at 5:42 AM Chris Wilson wrote: > > Quoting Nick Desaulniers (2019-12-02 19:18:20) > > On Sat, Nov 23, 2019 at 12:05 PM Chris Wilson > > wrote: > > > > > > Quoting Nathan Chancellor (2019-11-23 19:53:22) > > > > -Wtautolog

Re: [PATCH] drm/i915: Remove tautological compare in eb_relocate_vma

2019-12-03 Thread Nick Desaulniers
purpose for conveying information to the reader. Well leaving a warning unaddressed is also not a solution. Either replace it with a comment or turn off the warning for your subdir. The warning here looks valid to me; you have a guard for something that's impossible. -- Thanks, ~Nick Desaulniers

Re: [PATCH 4/6] drm/amd/display: fix dcn21 Makefile for clang

2019-10-04 Thread Nick Desaulniers
On Wed, Oct 2, 2019 at 2:24 PM Alex Deucher wrote: > > On Wed, Oct 2, 2019 at 5:19 PM Nick Desaulniers > wrote: > > > > Alex, do you know why the AMDGPU driver uses a different stack > > alignment (16B) than the rest of the x86 kernel? (see > > arch/x86/Makef

Re: [PATCH 4/6] drm/amd/display: fix dcn21 Makefile for clang

2019-10-04 Thread Nick Desaulniers
ergmann Thanks for the patch! Reviewed-by: Nick Desaulniers Tested-by: Nick Desaulniers (Though I think it's already been merged) Alex, do you know why the AMDGPU driver uses a different stack alignment (16B) than the rest of the x86 kernel? (see arch/x86/Makefile which uses 8B stack alignment). >

Re: [PATCH 6/6] [RESEND] drm/amdgpu: work around llvm bug #42576

2019-10-04 Thread Nick Desaulniers
On Wed, Oct 2, 2019 at 10:07 AM Nathan Chancellor wrote: > > On Wed, Oct 02, 2019 at 09:51:37AM -0700, 'Nick Desaulniers' via Clang Built > Linux wrote: > > > Apparently this bug is still present in both the released clang-9 > > > and the current development v

Re: [PATCH 6/6] [RESEND] drm/amdgpu: work around llvm bug #42576

2019-10-04 Thread Nick Desaulniers
> Apparently this bug is still present in both the released clang-9 > and the current development version of clang-10. > I was hoping we would not need a workaround in clang-9+, but > it seems that we do. I think I'd rather: 1. mark AMDGPU BROKEN if CC_IS_CLANG. There are numerous other issues

Re: linux-next: manual merge of the drm tree with the kbuild tree

2019-09-16 Thread Nick Desaulniers
g_calc.o := $(dml_ccflags) > -CFLAGS_display_rq_dlg_helpers.o := $(dml_ccflags) > -CFLAGS_dml_common_defs.o := $(dml_ccflags) > +CFLAGS_$(AMDDALPATH)/dc/dml/dml1_display_rq_dlg_calc.o := $(dml_ccflags) > +CFLAGS_$(AMDDALPATH)/dc/dml/display_rq_dlg_helpers.o := $(dml_ccflags) > +CFLAGS_$(AMDDALPATH)/dc/dml/dml_common_defs.o := $(dml_ccflags) > > DML = display_mode_lib.o display_rq_dlg_helpers.o > dml1_display_rq_dlg_calc.o \ > dml_common_defs.o -- Thanks, ~Nick Desaulniers

Re: linux-next: manual merge of the drm tree with the kbuild tree

2019-09-05 Thread Nick Desaulniers
$(dsc_ccflags) > -CFLAGS_rc_calc_dpi.o := $(dsc_ccflags) > -CFLAGS_codec_main_amd.o := $(dsc_ccflags) > -CFLAGS_dc_dsc.o := $(dsc_ccflags) > +CFLAGS_$(AMDDALPATH)/dc/dsc/rc_calc.o := $(dsc_ccflags) > +CFLAGS_$(AMDDALPATH)/dc/dsc/rc_calc_dpi.o := $(dsc_ccflags) > +CFLAGS_$(AMDDALPATH)/dc/dsc/dc_dsc.o := $(dsc_ccflags) > > DSC = dc_dsc.o rc_calc.o rc_calc_dpi.o > -- Thanks, ~Nick Desaulniers ___ dri-devel mailing list dri-devel@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/dri-devel

Re: [PATCH] drm/i915: Remove redundant user_access_end() from __copy_from_user() error path

2019-08-09 Thread Nick Desaulniers
to squash the build warnings, feel free. > > > > > > > > > > It would be nice to get it into 5.3. I can route it linuxwards if you > > > > > give > > > > > an Acked-by, but I'm happy to hand it to you :) > > > > > > > > Acked-by: Chris Wilson > > > > > > Thomas did you take this through tip tree after Chris' ACK? > > > > > > > Hi, > > > > Gentle ping... > > Thomas and Chris: Will someone of you pick this up? > > As "objtool: Improve UACCESS coverage" [1] went trough tip tree I > > highly appreciate to do so with this one. > > I think Thomas has gone on holiday, so hopefully Chris can pick it up > after all. tglx just picked up 2 other patches of mine, bumping just in case he's not picking up patches while on vacation. ;) -- Thanks, ~Nick Desaulniers ___ dri-devel mailing list dri-devel@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/dri-devel

Re: [PATCH] drm/i915: Remove redundant user_access_end() from __copy_from_user() error path

2019-08-08 Thread Nick Desaulniers
On Thu, Aug 8, 2019 at 1:22 PM Thomas Gleixner wrote: > > tglx just picked up 2 other patches of mine, bumping just in case he's > > not picking up patches while on vacation. ;) > > I'm only half on vacation :) > > So I can pick it up. Thanks, will send half margar

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

2019-07-23 Thread Nick Desaulniers
Clang from emitting libcalls to undefined SW FP routines"") due to bugreports from GCC builds. Add guards to only do so for Clang. Link: https://bugs.freedesktop.org/show_bug.cgi?id=109487 Link: https://github.com/ClangBuiltLinux/linux/issues/327 Suggested-by: Sedat Dilek Suggested-by: Sami

Re: [PATCH] drm/amd/display: Support clang option for stack alignment

2019-07-13 Thread Nick Desaulniers
ed-stack-boundary=4 > +else ifneq ($(call cc-option, -mstack-alignment=16),) > + cc_stack_align := -mstack-alignment=16 > +endif > + > +dsc_ccflags := -mhard-float -msse $(cc_stack_align) > + > +CFLAGS_rc_calc.o := $(dsc_ccflags) > +CFLAGS_rc_calc_dpi.o := $(dsc_ccflags

Re: Cleanup of -Wunused-const-variable in drivers/gpu/drm/msm/disp/dpu1/dpu_formats.c

2019-06-16 Thread Nick Desaulniers
dead or not obviously some kind of bug/typo/copy-pasta. Nathan, please submit a patch removing the dead code; it may be reverted later when it's actually wired up. Nothing is truly lost w/ git*. -- Thanks, ~Nick Desaulniers ___ dri-devel mailing list dri-devel@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/dri-devel

Re: Cleanup of -Wunused-const-variable in drivers/gpu/drm/msm/disp/dpu1/dpu_formats.c

2019-06-16 Thread Nick Desaulniers
ut this trick, the less it can be [ab]used. -- Thanks, ~Nick Desaulniers ___ dri-devel mailing list dri-devel@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/dri-devel

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

2019-04-26 Thread Nick Desaulniers
e = mdev->pipelines[0]; > - union komeda_config_id config_id = {0,}; Haven't seen a trailing comma too often. Thanks for the patch. Reviewed-by: Nick Desaulniers > + union komeda_config_id config_id; > int i; > > + memset(_i

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

2019-03-21 Thread Nick Desaulniers
kernel-wide for most cases. -Wenum-conversion has spotted many bugs. While the enums in question today are not different, they MIGHT eventually diverge and lead to bugs, like the others we've found and fixed throughout the kernel. So I would recommend fixing now,

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

2019-03-21 Thread Nick Desaulniers
lback were > ever to disappear, num_of_levels would never be initialized. Just > zero initialize it to ensure that the intent behind this code > remains the same. Thanks for the simple fix. Reviewed-by: Nick Desaulniers > > Fixes: 870b996f955f ("drm/amd/powerplay: set defalut dp

Re: [Intel-gfx] [PATCH] drm/i915: Zero initialize this_cpu in busywait_stop

2019-03-09 Thread Nick Desaulniers
_us(_cpu); - if (time_after(local_clock_us(_cpu), timeout)) + if (time_after(local_clock, timeout)) return true; return this_cpu != cpu; -- Thanks, ~Nick Desaulniers ___ dri-devel mailing list dri-devel@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/dri-devel

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

2019-03-07 Thread Nick Desaulniers
to functions. Invariants like "don't touch this possibly unitialized memory in THIS case" don't always pass from maintainer to maintainer. Thanks for the patch. Reviewed-by: Nick Desaulniers > Just zero initialize this variable so that Clang no longer warns. > > Link: https://git

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

2019-01-30 Thread Nick Desaulniers
thub.com/ClangBuiltLinux/linux/issues/327 > >>>> Cc: sta...@vger.kernel.org # 4.19 > >>>> Reported-by: S, Shirish > >>>> Reported-by: Matthias Kaehlcke > >>>> Suggested-by: James Y Knight > >>>> Suggested-by: Nathan Chancello

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

2019-01-26 Thread Nick Desaulniers
On Fri, Jan 25, 2019 at 11:34 PM 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

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

2019-01-26 Thread Nick Desaulniers
15: > Disable some extra clang warnings"). > > Link: https://github.com/ClangBuiltLinux/linux/issues/220 > Signed-off-by: Nathan Chancellor Reviewed-by: Nick Desaulniers probably could give Chris Wilson the suggested by tag. https://lore.kernel.org/lkml/154513398652.1108.715096991602407

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

2018-12-19 Thread Nick Desaulniers
nfig and allyesconfig > without any warnings with tip-of-tree Clang. Also, please let us know about any other bugs found via testing with Clang: https://github.com/ClangBuiltLinux/linux/issues We're happy to take a look! -- Thanks, ~Nick Desaulniers __

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

2018-12-12 Thread Nick Desaulniers
ers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c#4949: - NULL, + transfer_func_unknown, Maybe at that point the `if (app_tf != NULL)` could be replaced with `if (app_tf != transfer_func_unknown)` hoisted from `build_vrr_infopac

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

2018-12-12 Thread Nick Desaulniers
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: > > On Mon, Dec 10, 2018 at 3:42 PM Nathan Chancellor > > wrote: > > > > > > Clang warns when an expression that equals zero is u

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

2018-10-26 Thread Nick Desaulniers
pu/drm/i915/Makefile > @@ -26,6 +26,7 @@ subdir-ccflags-$(CONFIG_DRM_I915_WERROR) += -Werror > > # Fine grained warnings disable > CFLAGS_i915_pci.o = $(call cc-disable-warning, override-init) > +CFLAGS_intel_breadcrumbs.o = $(call cc-disable-warning, uninitialized) >

Re: [Intel-gfx] [PATCH] drm/i915: Convert _print_param to a macro

2018-10-12 Thread Nick Desaulniers
On Wed, Oct 10, 2018 at 11:21 PM Jani Nikula wrote: > > On Wed, 10 Oct 2018, Nick Desaulniers wrote: > > On Wed, Oct 10, 2018 at 1:30 PM Michal Wajdeczko > > wrote: > >> > >> On Wed, 10 Oct 2018 14:01:40 +0200, Jani Nikula > >> wrote: > >&g

Re: [Intel-gfx] [PATCH] drm/i915: Convert _print_param to a macro

2018-10-11 Thread Nick Desaulniers
On Wed, Oct 10, 2018 at 1:30 PM Michal Wajdeczko wrote: > > On Wed, 10 Oct 2018 14:01:40 +0200, Jani Nikula > wrote: > > > On Tue, 09 Oct 2018, Nick Desaulniers wrote: > >> On Tue, Oct 9, 2018 at 10:14 AM Nathan Chancellor > >> wrote: > >&g

Re: [PATCH] drm/i915: Convert _print_param to a macro

2018-10-10 Thread Nick Desaulniers
ng semantic analysis. I suspect this code is not valid for GCC unless optimizations are enabled (the kernel only does compile with optimizations turned on). This change allows us to build this translation unit with Clang. Acked-by: Nick Desaulniers (Note: this is the change I suggested

Re: [PATCH v2] drm/amd/display: Use proper enums in process_channel_reply

2018-09-27 Thread Nick Desaulniers
ferent enumeration type 'enum > > aux_transaction_reply' [-Wenum-conversion] > > reply->status = AUX_CHANNEL_OPERATION_FAILED_HPD_DISCON; > > ~ ^~~ > > > > The current enum is incorrect, it should be fr

Re: [PATCH] drm/amd/powerplay: Change id parameter type in pp_atomfwctrl_get_clk_information_by_clkid

2018-09-25 Thread Nick Desaulniers
plicitly casting these values, change id's type to uint8_t > in pp_atomfwctrl_get_clk_information_by_clkid so no conversion happens. > > Reported-by: Nick Desaulniers > Signed-off-by: Nathan Chancellor > --- > drivers/gpu/drm/amd/powerplay/hwmgr/ppatomfwctrl.c | 3 ++- > drive

Re: [PATCH] drm/amd/display: Change status's type in aux_reply_transaction_data

2018-09-25 Thread Nick Desaulniers
ge status to type uint8_t (since its max size is 255) which avoids > this construct altogether. > > Reported-by: Nick Desaulniers > Signed-off-by: Nathan Chancellor > --- > drivers/gpu/drm/amd/display/dc/dc_ddc_types.h | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > d

Re: [PATCH] backlight: lm3639: Unconditionally call led_classdev_unregister

2018-09-25 Thread Nick Desaulniers
On Fri, Sep 21, 2018 at 4:10 PM Nathan Chancellor wrote: > > On Fri, Sep 21, 2018 at 03:48:50PM -0700, Nick Desaulniers wrote: > > On Fri, Sep 21, 2018 at 1:23 PM Nathan Chancellor > > wrote: > > > > > > Clang warns that the address of a pointer will always

Re: [PATCH] backlight: lm3639: Unconditionally call led_classdev_unregister

2018-09-23 Thread Nick Desaulniers
urn a null pointer, so I think all references to pchip in this function should instead be guarded with a null check. Would you mind making that change and sending a v2? > if (pchip->bled) > device_remove_file(&(pchip->bled->dev), _attr_bled_mode); > return 0; > -- > 2.19.0 > -- Thanks, ~Nick Desaulniers ___ dri-devel mailing list dri-devel@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/dri-devel

Re: [PATCH] drm/amdgpu: Add braces to initialize task_info subojects

2018-09-13 Thread Nick Desaulniers
lization of subobject [-Wmissing-braces] > struct amdgpu_task_info task_info = { 0 }; > ^ > {} > 1 warning generated. > > Reported-by: Nick Desaulniers > Si

Re: [PATCH] drm/amdgpu: Add braces to initialize task_info subojects

2018-09-13 Thread Nick Desaulniers
On Wed, Sep 12, 2018 at 1:24 PM Richard Smith wrote: > > On Wed, Sep 12, 2018 at 10:38 AM Nick Desaulniers > wrote: >> >> On Tue, Sep 11, 2018 at 5:26 PM Nathan Chancellor >> wrote: >> > >> > Clang warns if there are missing braces around a subobjec

Re: [PATCH] drm/panel: simple: fix -Wliteral-conversion warning

2018-08-11 Thread Nick Desaulniers
On Thu, Aug 9, 2018 at 3:00 AM Thierry Reding wrote: > > On Fri, Jun 15, 2018 at 03:37:49PM -0700, Nick Desaulniers wrote: > > Fixes commit 8cfe83419cdb ("drm/panel: simple: Add > > support for KEO TX31D200VM0BAA") > > > > drivers/gpu/drm/panel/panel-simple

Re: [PATCH] drm/panel: simple: fix -Wliteral-conversion warning

2018-08-11 Thread Nick Desaulniers
bumping for review. On Fri, Jun 15, 2018 at 3:38 PM Nick Desaulniers wrote: > > Fixes commit 8cfe83419cdb ("drm/panel: simple: Add > support for KEO TX31D200VM0BAA") > > drivers/gpu/drm/panel/panel-simple.c:1250:27: warning: implicit conversion > from > 'doub

[PATCH v2] drm/nouveau/nvif: remove const attribute from nvif_mclass

2018-06-16 Thread Nick Desaulniers
Similar to commit 0bf8bf50eddc ("module: Remove const attribute from alias for MODULE_DEVICE_TABLE") Fixes many -Wduplicate-decl-specifier warnings due to the combination of const typeof() of already const variables. Signed-off-by: Nick Desaulniers --- Changes since v1: added additi

Re: [PATCH] drm/nouveau/nvif: remove const attribute from nvif_mclass

2018-06-16 Thread Nick Desaulniers
On Fri, Jun 15, 2018 at 3:56 PM Nick Desaulniers wrote: > > Similar to commit 0bf8bf50eddc ("module: Remove > const attribute from alias for MODULE_DEVICE_TABLE") > > Fixes many -Wduplicate-decl-specifier warnings due to the combination of > const typeof() of already

[PATCH] drm/panel: simple: fix -Wliteral-conversion warning

2018-06-16 Thread Nick Desaulniers
, 21, 33.5 }, ~^~~~ Signed-off-by: Nick Desaulniers --- Alternatively, should these be rounded up to 34? I'm guessing the current behaviour (truncation) is correct since that's how the patch was operating. drivers/gpu/drm/panel/panel-simple.c | 4 ++-- 1 file changed, 2 insertions(+), 2

[PATCH] drm/nouveau/nvif: remove const attribute from nvif_mclass

2018-06-16 Thread Nick Desaulniers
Similar to commit 0bf8bf50eddc ("module: Remove const attribute from alias for MODULE_DEVICE_TABLE") Fixes many -Wduplicate-decl-specifier warnings due to the combination of const typeof() of already const variables. Signed-off-by: Nick Desaulniers --- drivers/gpu/drm/nouveau/in

Re: [PATCH] video/hdmi: prefer strlcpy to strncpy

2018-05-30 Thread Nick Desaulniers
On Mon, May 28, 2018 at 11:59 PM, Nick Desaulniers wrote: > Fixes a stringop-truncation warning from gcc-8. > > Signed-off-by: Nick Desaulniers > --- > drivers/video/hdmi.c | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) > > diff --git a/drivers/video/hdmi.

[PATCH] video/hdmi: prefer strlcpy to strncpy

2018-05-29 Thread Nick Desaulniers
Fixes a stringop-truncation warning from gcc-8. Signed-off-by: Nick Desaulniers --- drivers/video/hdmi.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/video/hdmi.c b/drivers/video/hdmi.c index 111a0ab..46c184c 100644 --- a/drivers/video/hdmi.c +++ b/drivers

[PATCH v2] drm/i915: Avoid enum conversion warning

2017-11-27 Thread Nick Desaulniers
; ~~ ^~~~ Suggested-by: Daniel Vetter <dan...@ffwll.ch> Signed-off-by: Nick Desaulniers <nick.desaulni...@gmail.com> --- drivers/gpu/drm/i915/intel_ddi.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/gpu/drm/i915/intel_ddi.c b/drivers/gpu/drm/i915

[PATCH] drm/i915: Avoid enum conversion warning

2017-11-23 Thread Nick Desaulniers
; ~~ ^~~~ Signed-off-by: Nick Desaulniers <nick.desaulni...@gmail.com> --- drivers/gpu/drm/i915/intel_ddi.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpu/drm/i915/intel_ddi.c b/drivers/gpu/drm/i915/intel_ddi.c index 933c18fd4258..f9de45316901

Re: [PATCH] drm/i915: Mark wait_for_engine() as maybe_unused

2017-09-26 Thread Nick Desaulniers
Signed-off-by: Nick Desaulniers <nick.desaulni...@gmail.com> ___ dri-devel mailing list dri-devel@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/dri-devel

Re: [PATCH] drm/i915/gvt: remove redundant -Wall

2017-05-29 Thread Nick Desaulniers
ping for review ___ dri-devel mailing list dri-devel@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/dri-devel

[PATCH] drm/i915/gvt: remove redundant -Wall

2017-05-21 Thread Nick Desaulniers
. Signed-off-by: Nick Desaulniers <nick.desaulni...@gmail.com> --- I verified that -Wall was redundant by compiling with V=1: make V=1 -j4 drivers/gpu/drm/i915/i915_gem_request.o drivers/gpu/drm/i915/gvt/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpu/drm/i9

[PATCH] drm/i915: mark wait_for_engine() __maybe_unused

2017-05-21 Thread Nick Desaulniers
] static int wait_for_engine(struct intel_engine_cs *engine, int timeout_ms) ^ Signed-off-by: Nick Desaulniers <nick.desaulni...@gmail.com> --- Additionally, it only has one call site. Should I mark it inline, too, while I'm at it? drivers/gpu/drm/i915/i915_gem.c | 3 ++-

Re: [PATCH] drm/mm: fix duplicate 'const' declaration specifier

2017-05-10 Thread Nick Desaulniers
ah seems like there's more of these: drivers/gpu/drm/drm_mm.c:922 surprised compiling drivers/gpu/drm/drm_mm.o did not catch this the first time... ___ dri-devel mailing list dri-devel@lists.freedesktop.org

Re: [PATCH] drm/mm: fix duplicate 'const' declaration specifier

2017-05-10 Thread Nick Desaulniers
Please disregard this patch. I think I may have found a bug in Clang, or at least an incompatibility with GCC 7.1. Clang bug: https://bugs.llvm.org/show_bug.cgi?id=32985 ___ dri-devel mailing list dri-devel@lists.freedesktop.org

[PATCH] drm/mm: fix duplicate 'const' declaration specifier

2017-05-10 Thread Nick Desaulniers
the loop variable is marked const twice. While this particular call site does not modify the loop variable, trying to do so would already result in a compile time failure, so we can remove the current const. Other call sites do not mark the loop variable const. Signed-off-by: Nick Desaulniers