Re: [Nouveau] [PATCH][next] nouveau/gsp: replace zero-length array with flex-array member and use __counted_by

2023-11-28 Thread Gustavo A. R. Silva
On 11/28/23 19:01, Danilo Krummrich wrote: On 11/16/23 20:55, Timur Tabi wrote: On Thu, 2023-11-16 at 20:45 +0100, Danilo Krummrich wrote: As I already mentioned for Timur's patch [2], I'd prefer to get a fix upstream (meaning [1] in this case). Of course, that's probably more up to Timur

[Nouveau] [PATCH][next] nouveau/gsp: replace zero-length array with flex-array member and use __counted_by

2023-11-16 Thread Gustavo A. R. Silva
bounds of 'PACKED_REGISTRY_ENTRY[0]' [-Warray-bounds=] While there, also make use of the struct_size() helper, and address checkpatch.pl warning: WARNING: please, no spaces at the start of a line This results in no differences in binary output. Signed-off-by: Gustavo A. R. Silva --- .../nvrm

Re: [Nouveau] [PATCH 5/9] drm/nouveau/pm: Annotate struct nvkm_perfdom with __counted_by

2023-09-24 Thread Gustavo A. R. Silva
Cc: dri-de...@lists.freedesktop.org Cc: nouveau@lists.freedesktop.org Signed-off-by: Kees Cook Reviewed-by: Gustavo A. R. Silva Thanks -- Gustavo --- drivers/gpu/drm/nouveau/nvkm/engine/pm/priv.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpu/drm/nouveau

Re: [Nouveau] [PATCH 7/9] drm/virtio: Annotate struct virtio_gpu_object_array with __counted_by

2023-09-23 Thread Gustavo A. R. Silva
: Daniel Vetter Cc: dri-de...@lists.freedesktop.org Cc: virtualizat...@lists.linux-foundation.org Signed-off-by: Kees Cook Reviewed-by: Gustavo A. R. Silva Thanks -- Gustavo --- drivers/gpu/drm/virtio/virtgpu_drv.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers

Re: [Nouveau] [PATCH 8/9] drm/vmwgfx: Annotate struct vmw_surface_dirty with __counted_by

2023-09-23 Thread Gustavo A. R. Silva
Cc: dri-de...@lists.freedesktop.org Signed-off-by: Kees Cook Reviewed-by: Gustavo A. R. Silva Thanks -- Gustavo --- drivers/gpu/drm/vmwgfx/vmwgfx_surface.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpu/drm/vmwgfx/vmwgfx_surface.c b/drivers/gpu/drm

Re: [Nouveau] [PATCH 1/9] drm/amd/pm: Annotate struct smu10_voltage_dependency_table with __counted_by

2023-09-23 Thread Gustavo A. R. Silva
Cc: "Pan, Xinhui" Cc: David Airlie Cc: Daniel Vetter Cc: Xiaojian Du Cc: Huang Rui Cc: Kevin Wang Cc: amd-...@lists.freedesktop.org Cc: dri-de...@lists.freedesktop.org Signed-off-by: Kees Cook Reviewed-by: Gustavo A. R. Silva Thanks -- Gustavo --- drivers/gpu/drm/am

Re: [PATCH 6/9] drm/vc4: Annotate struct vc4_perfmon with __counted_by

2023-09-22 Thread Gustavo A. R. Silva
...@lists.freedesktop.org Signed-off-by: Kees Cook Reviewed-by: Gustavo A. R. Silva Thanks -- Gustavo --- drivers/gpu/drm/vc4/vc4_drv.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpu/drm/vc4/vc4_drv.h b/drivers/gpu/drm/vc4/vc4_drv.h index bf66499765fb

Re: [PATCH 4/9] drm/msm/dpu: Annotate struct dpu_hw_intr with __counted_by

2023-09-22 Thread Gustavo A. R. Silva
Cc: David Airlie Cc: Daniel Vetter Cc: Bjorn Andersson Cc: linux-arm-...@vger.kernel.org Cc: dri-de...@lists.freedesktop.org Cc: freedr...@lists.freedesktop.org Signed-off-by: Kees Cook Reviewed-by: Gustavo A. R. Silva Thanks -- Gustavo --- drivers/gpu/drm/msm/disp/dpu1

Re: [Nouveau] [PATCH 2/9] drm/amdgpu/discovery: Annotate struct ip_hw_instance with __counted_by

2023-09-22 Thread Gustavo A. R. Silva
Cc: David Airlie Cc: Daniel Vetter Cc: Hawking Zhang Cc: amd-...@lists.freedesktop.org Cc: dri-de...@lists.freedesktop.org Signed-off-by: Kees Cook Reviewed-by: Gustavo A. R. Silva Thanks -- Gustavo --- drivers/gpu/drm/amd/amdgpu/amdgpu_discovery.c | 2 +- 1 file changed, 1 insertion(+),

Re: [PATCH 3/9] drm/i915/selftests: Annotate struct perf_series with __counted_by

2023-09-22 Thread Gustavo A. R. Silva
Airlie Cc: Daniel Vetter Cc: Chris Wilson Cc: John Harrison Cc: Andi Shyti Cc: Matthew Brost Cc: intel-...@lists.freedesktop.org Cc: dri-de...@lists.freedesktop.org Signed-off-by: Kees Cook Reviewed-by: Gustavo A. R. Silva Thanks -- Gustavo --- drivers/gpu/drm/i915/selftests

[Nouveau] [PATCH 2/2][next] nouveau/svm: Split assignment from if conditional

2023-08-16 Thread Gustavo A. R. Silva
Fix checkpatch.pl ERROR: do not use assignment in if condition. Signed-off-by: Gustavo A. R. Silva --- drivers/gpu/drm/nouveau/nouveau_svm.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/gpu/drm/nouveau/nouveau_svm.c b/drivers/gpu/drm/nouveau/nouveau_svm.c index

[Nouveau] [PATCH 1/2][next] nouveau/svm: Replace one-element array with flexible-array member in struct nouveau_svm

2023-08-16 Thread Gustavo A. R. Silva
One-element and zero-length arrays are deprecated. So, replace one-element array in struct nouveau_svm with flexible-array member. This results in no differences in binary output. Link: https://github.com/KSPP/linux/issues/338 Signed-off-by: Gustavo A. R. Silva --- drivers/gpu/drm/nouveau

[Nouveau] [PATCH 0/2][next] nouveau/svm: Replace one-element array with flexible-array member

2023-08-16 Thread Gustavo A. R. Silva
This small series aims to replace a one-element array with a flexible-array member in struct nouveau_svm. And, while at it, fix a checkpatch.pl error. Gustavo A. R. Silva (2): nouveau/svm: Replace one-element array with flexible-array member in struct nouveau_svm nouveau/svm: Split

Re: [Nouveau] [PATCH] drm/nouveau/disp: More DP_RECEIVER_CAP_SIZE array fixes

2023-03-22 Thread Gustavo A. R. Silva
], | ~~~^~ Fixes: 813443721331 ("drm/nouveau/disp: move DP link config into acquire") Cc: Ben Skeggs Cc: Lyude Paul Cc: Karol Herbst Cc: David Airlie Cc: Daniel Vetter Cc: Dave Airlie Cc: "Gustavo A

[Nouveau] [PATCH][next] drm/nouveau/nvkm: Replace zero-length array with flexible-array member

2023-01-09 Thread Gustavo A. R. Silva
/issues/78 Signed-off-by: Gustavo A. R. Silva --- drivers/gpu/drm/nouveau/include/nvfw/hs.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpu/drm/nouveau/include/nvfw/hs.h b/drivers/gpu/drm/nouveau/include/nvfw/hs.h index 8c4cd08a7b5f..8b58b668fc0c 100644

Re: [Nouveau] [RESEND][PATCH] drm/nouveau/fb/ga102: Replace zero-length array of trailing structs with flex-array

2023-01-03 Thread Gustavo A. R. Silva
ude Paul > Cc: David Airlie > Cc: Daniel Vetter > Cc: Gourav Samaiya > Cc: "Gustavo A. R. Silva" > Cc: dri-de...@lists.freedesktop.org > Cc: nouveau@lists.freedesktop.org > Signed-off-by: Kees Cook Here is my RB again: Reviewed-by: Gustavo A. R. Silva T

Re: [Nouveau] [PATCH] drm/nouveau/fb/ga102: Replace zero-length array of trailing structs with flex-array

2022-11-18 Thread Gustavo A. R. Silva
ude Paul > Cc: David Airlie > Cc: Daniel Vetter > Cc: Gourav Samaiya > Cc: "Gustavo A. R. Silva" > Cc: dri-de...@lists.freedesktop.org > Cc: nouveau@lists.freedesktop.org > Signed-off-by: Kees Cook Reviewed-by: Gustavo A. R. Silva Thanks! -- Gustavo >

[Nouveau] [PATCH][next] treewide: Replace zero-length arrays with flexible-array members

2022-02-20 Thread Gustavo A. R. Silva
off-by: Gustavo A. R. Silva --- Hi all, I'm expecting to carry this patch in my tree, so it'd be great to get some Acks. And given the size of the patch, I'm only sending this to mailing lists. Thanks! arch/alpha/include/asm/hwrpb.h| 2 +- arch/ia64/include/asm/sa

Re: [Nouveau] [PATCH][next] treewide: Replace zero-length arrays with flexible-array members

2022-02-20 Thread Gustavo A. R. Silva
On Tue, Feb 15, 2022 at 10:17:40AM -0800, Kees Cook wrote: > On Tue, Feb 15, 2022 at 11:47:43AM -0600, Gustavo A. R. Silva wrote: > > There is a regular need in the kernel to provide a way to declare > > having a dynamically sized set of trailing elements in a structure. > &g

Re: [Nouveau] [PATCH][next] treewide: Replace zero-length arrays with flexible-array members

2022-02-20 Thread Gustavo A. R. Silva
On Tue, Feb 15, 2022 at 09:19:29PM +0200, Leon Romanovsky wrote: > On Tue, Feb 15, 2022 at 01:21:10PM -0600, Gustavo A. R. Silva wrote: > > On Tue, Feb 15, 2022 at 10:17:40AM -0800, Kees Cook wrote: > > > On Tue, Feb 15, 2022 at 11:47:43AM -0600, Gustavo A. R. Silva wrote: >

Re: [Nouveau] [PATCH][next] treewide: Replace zero-length arrays with flexible-array members

2022-02-20 Thread Gustavo A. R. Silva
On Wed, Feb 16, 2022 at 08:05:47PM +0100, Rafael J. Wysocki wrote: > On Tue, Feb 15, 2022 at 8:24 PM Gustavo A. R. Silva > wrote: > > Can you also send the ACPI patch separately, please? > > We would like to route it through the upstream ACPICA code base. Yeah; no problem. Thanks -- Gustavo

[Nouveau] [PATCH][next] nouveau/svm: Use struct_size() helper in nouveau_pfns_map()

2022-02-07 Thread Gustavo A. R. Silva
Make use of the struct_size() helper instead of an open-coded version, in order to avoid any potential type mistakes or integer overflows that, in the worse scenario, could lead to heap overflows. Link: https://github.com/KSPP/linux/issues/160 Signed-off-by: Gustavo A. R. Silva --- drivers/gpu

Re: [Nouveau] [PATCH][next] nouveau/svm: Use kvcalloc() instead of kvzalloc()

2021-10-28 Thread Gustavo A. R. Silva
that kvcalloc checks whether the multiplication overflows and > > returns NULL in this case? > > That's correct. :) > > > On Wed, Sep 29, 2021 at 12:21 AM Gustavo A. R. Silva > > wrote: > > > > > > Use 2-factor argument form kvcalloc() instead of kvza

[Nouveau] [PATCH][next] nouveau/svm: Use kvcalloc() instead of kvzalloc()

2021-09-28 Thread Gustavo A. R. Silva
Use 2-factor argument form kvcalloc() instead of kvzalloc(). Link: https://github.com/KSPP/linux/issues/162 Signed-off-by: Gustavo A. R. Silva --- drivers/gpu/drm/nouveau/nouveau_svm.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpu/drm/nouveau/nouveau_svm.c b

Re: [Nouveau] [PATCH RESEND][next] drm/nouveau/clk: Fix fall-through warnings for Clang

2021-06-03 Thread Gustavo A. R. Silva
Hi all, If you don't mind, I'm taking this in my -next[1] branch for v5.14. Thanks -- Gustavo [1] https://git.kernel.org/pub/scm/linux/kernel/git/gustavoars/linux.git/log/?h=for-next/kspp On 6/1/21 17:57, Gustavo A. R. Silva wrote: > Hi, > > Friendly second ping: who can take thi

Re: [Nouveau] [PATCH RESEND][next] drm/nouveau: Fix fall-through warnings for Clang

2021-06-03 Thread Gustavo A. R. Silva
ers? No other person has replied after pinging multiple times and resending these patches, so I guess people don't care. I'll add this and the other similar patches to my -next branch for 5.14. Thanks, Karol. -- Gustavo > > On Wed, Jun 2, 2021 at 1:16 AM Gustavo A. R. Silva > wrote: &

Re: [Nouveau] [PATCH RESEND][next] drm/nouveau/therm: Fix fall-through warnings for Clang

2021-06-03 Thread Gustavo A. R. Silva
Hi all, If you don't mind, I'm taking this in my -next[1] branch for v5.14. Thanks -- Gustavo [1] https://git.kernel.org/pub/scm/linux/kernel/git/gustavoars/linux.git/log/?h=for-next/kspp On 6/1/21 17:58, Gustavo A. R. Silva wrote: > Hi, > > Friendly second ping: who can take thi

Re: [Nouveau] [PATCH RESEND][next] drm/nouveau/therm: Fix fall-through warnings for Clang

2021-06-01 Thread Gustavo A. R. Silva
A. R. Silva wrote: > Hi all, > > Friendly ping: who can take this, please? > > Thanks > -- > Gustavo > > On 3/5/21 03:58, Gustavo A. R. Silva wrote: >> In preparation to enable -Wimplicit-fallthrough for Clang, fix a warning >> by explicitly adding a brea

Re: [Nouveau] [PATCH RESEND][next] drm/nouveau/clk: Fix fall-through warnings for Clang

2021-06-01 Thread Gustavo A. R. Silva
A. R. Silva wrote: > Hi all, > > Friendly ping: who can take this, please? > > Thanks > -- > Gustavo > > On 3/5/21 03:56, Gustavo A. R. Silva wrote: >> In preparation to enable -Wimplicit-fallthrough for Clang, fix a warning >> by explicitly adding a brea

Re: [Nouveau] [PATCH RESEND][next] drm/nouveau: Fix fall-through warnings for Clang

2021-06-01 Thread Gustavo A. R. Silva
A. R. Silva wrote: > Hi all, > > Friendly ping: who can take this, please? > > Thanks > -- > Gustavo > > On 3/5/21 03:56, Gustavo A. R. Silva wrote: >> In preparation to enable -Wimplicit-fallthrough for Clang, fix a couple >> of warnings by explicitly addi

Re: [Nouveau] [PATCH RESEND][next] drm/nouveau/therm: Fix fall-through warnings for Clang

2021-04-20 Thread Gustavo A. R. Silva
Hi all, Friendly ping: who can take this, please? Thanks -- Gustavo On 3/5/21 03:58, Gustavo A. R. Silva wrote: > In preparation to enable -Wimplicit-fallthrough for Clang, fix a warning > by explicitly adding a break statement instead of letting the code fall > through to the

Re: [Nouveau] [PATCH RESEND][next] drm/nouveau: Fix fall-through warnings for Clang

2021-04-20 Thread Gustavo A. R. Silva
Hi all, Friendly ping: who can take this, please? Thanks -- Gustavo On 3/5/21 03:56, Gustavo A. R. Silva wrote: > In preparation to enable -Wimplicit-fallthrough for Clang, fix a couple > of warnings by explicitly adding a couple of break statements instead > of letting the code fal

Re: [Nouveau] [PATCH RESEND][next] drm/nouveau/clk: Fix fall-through warnings for Clang

2021-04-20 Thread Gustavo A. R. Silva
Hi all, Friendly ping: who can take this, please? Thanks -- Gustavo On 3/5/21 03:56, Gustavo A. R. Silva wrote: > In preparation to enable -Wimplicit-fallthrough for Clang, fix a warning > by explicitly adding a break statement instead of letting the code fall > through to the

[Nouveau] [PATCH RESEND][next] drm/nouveau/therm: Fix fall-through warnings for Clang

2021-03-05 Thread Gustavo A. R. Silva
In preparation to enable -Wimplicit-fallthrough for Clang, fix a warning by explicitly adding a break statement instead of letting the code fall through to the next case. Link: https://github.com/KSPP/linux/issues/115 Signed-off-by: Gustavo A. R. Silva --- drivers/gpu/drm/nouveau/nvkm/subdev

[Nouveau] [PATCH RESEND][next] drm/nouveau: Fix fall-through warnings for Clang

2021-03-05 Thread Gustavo A. R. Silva
In preparation to enable -Wimplicit-fallthrough for Clang, fix a couple of warnings by explicitly adding a couple of break statements instead of letting the code fall through to the next case. Link: https://github.com/KSPP/linux/issues/115 Signed-off-by: Gustavo A. R. Silva --- drivers/gpu/drm

[Nouveau] [PATCH RESEND][next] drm/nouveau/clk: Fix fall-through warnings for Clang

2021-03-05 Thread Gustavo A. R. Silva
In preparation to enable -Wimplicit-fallthrough for Clang, fix a warning by explicitly adding a break statement instead of letting the code fall through to the next case. Link: https://github.com/KSPP/linux/issues/115 Signed-off-by: Gustavo A. R. Silva --- drivers/gpu/drm/nouveau/nvkm/subdev

Re: [Nouveau] [PATCH 000/141] Fix fall-through warnings for Clang

2020-12-01 Thread Gustavo A. R. Silva
On Tue, Dec 01, 2020 at 12:52:27AM -0500, Martin K. Petersen wrote: > > Gustavo, > > > This series aims to fix almost all remaining fall-through warnings in > > order to enable -Wimplicit-fallthrough for Clang. > > Applied 20-22,54,120-124 to 5.11/scsi-staging, thanks. Awesome! :) Thanks,

Re: [Nouveau] [PATCH 000/141] Fix fall-through warnings for Clang

2020-11-24 Thread Gustavo A. R. Silva
On Mon, Nov 23, 2020 at 04:03:45PM -0400, Jason Gunthorpe wrote: > On Fri, Nov 20, 2020 at 12:21:39PM -0600, Gustavo A. R. Silva wrote: > > > IB/hfi1: Fix fall-through warnings for Clang > > IB/mlx4: Fix fall-through warnings for Clang > > IB/qedr: Fix fall-th

Re: [Nouveau] [PATCH 000/141] Fix fall-through warnings for Clang

2020-11-24 Thread Gustavo A. R. Silva
On Mon, Nov 23, 2020 at 08:38:46PM +, Mark Brown wrote: > On Fri, 20 Nov 2020 12:21:39 -0600, Gustavo A. R. Silva wrote: > > This series aims to fix almost all remaining fall-through warnings in > > order to enable -Wimplicit-fallthrough for Clang. > > > > In prepa

Re: [Nouveau] [Intel-wired-lan] [PATCH 000/141] Fix fall-through warnings for Clang

2020-11-23 Thread Gustavo A. R. Silva
On Sun, Nov 22, 2020 at 11:53:55AM -0800, James Bottomley wrote: > On Sun, 2020-11-22 at 11:22 -0800, Joe Perches wrote: > > On Sun, 2020-11-22 at 11:12 -0800, James Bottomley wrote: > > > On Sun, 2020-11-22 at 10:25 -0800, Joe Perches wrote: > > > > On Sun, 2020-11-22 at 10:21 -0800, James

Re: [Nouveau] [PATCH 000/141] Fix fall-through warnings for Clang

2020-11-20 Thread Gustavo A. R. Silva
On 11/20/20 12:28, Joe Perches wrote: > On Fri, 2020-11-20 at 12:21 -0600, Gustavo A. R. Silva wrote: >> Hi all, >> >> This series aims to fix almost all remaining fall-through warnings in >> order to enable -Wimplicit-fallthrough for Clang. >> >> In prepa

[Nouveau] [PATCH 000/141] Fix fall-through warnings for Clang

2020-11-20 Thread Gustavo A. R. Silva
cc.gnu.org/bugzilla/show_bug.cgi?id=91432 [4] https://godbolt.org/z/xgkvIh [5] commit a035d552a93b ("Makefile: Globally enable fall-through warning") [6] commit 4169e889e588 ("include: jhash/signal: Fix fall-through warnings for Clang") Thanks! Gustavo A. R. Silva (141):

Re: [Nouveau] [PATCH 000/141] Fix fall-through warnings for Clang

2020-11-20 Thread Gustavo A. R. Silva
Hi, On 11/20/20 12:53, Jakub Kicinski wrote: > On Fri, 20 Nov 2020 12:21:39 -0600 Gustavo A. R. Silva wrote: >> This series aims to fix almost all remaining fall-through warnings in >> order to enable -Wimplicit-fallthrough for Clang. >> >> In preparation to en

[Nouveau] [PATCH 081/141] drm/nouveau/clk: Fix fall-through warnings for Clang

2020-11-20 Thread Gustavo A. R. Silva
In preparation to enable -Wimplicit-fallthrough for Clang, fix a warning by explicitly adding a break statement instead of letting the code fall through to the next case. Link: https://github.com/KSPP/linux/issues/115 Signed-off-by: Gustavo A. R. Silva --- drivers/gpu/drm/nouveau/nvkm/subdev

[Nouveau] [PATCH 083/141] drm/nouveau/therm: Fix fall-through warnings for Clang

2020-11-20 Thread Gustavo A. R. Silva
In preparation to enable -Wimplicit-fallthrough for Clang, fix a warning by explicitly adding a break statement instead of letting the code fall through to the next case. Link: https://github.com/KSPP/linux/issues/115 Signed-off-by: Gustavo A. R. Silva --- drivers/gpu/drm/nouveau/nvkm/subdev

[Nouveau] [PATCH 082/141] drm/nouveau: Fix fall-through warnings for Clang

2020-11-20 Thread Gustavo A. R. Silva
In preparation to enable -Wimplicit-fallthrough for Clang, fix a couple of warnings by explicitly adding a couple of break statements instead of letting the code fall through to the next case. Link: https://github.com/KSPP/linux/issues/115 Signed-off-by: Gustavo A. R. Silva --- drivers/gpu/drm

Re: [Nouveau] [trivial PATCH] treewide: Convert switch/case fallthrough; to break;

2020-09-09 Thread Gustavo A. R. Silva
eak; > > Found using: > > $ grep-2.5.4 -rP --include=*.[ch] -n > "fallthrough;(\s*(case\s+\w+|default)\s*:\s*){1,7}break;" * > > Miscellanea: > > o Move or coalesce a couple label blocks above a default: block. > > Signed-off-by: Joe P

Re: [Nouveau] [PATCH][next] drm/nouveau: Use fallthrough pseudo-keyword

2020-07-23 Thread Gustavo A. R. Silva
On Wed, Jul 08, 2020 at 01:22:35PM +1000, Ben Skeggs wrote: > On Wed, 8 Jul 2020 at 03:31, Gustavo A. R. Silva > wrote: > > > > Replace the existing /* fall through */ comments and its variants with > > the new pseudo-keyword macro fallthrough[1]. Also, remove unne

[Nouveau] [PATCH][next] drm/nouveau: Use fallthrough pseudo-keyword

2020-07-23 Thread Gustavo A. R. Silva
-fall-through Signed-off-by: Gustavo A. R. Silva --- drivers/gpu/drm/nouveau/dispnv50/disp.c|2 - drivers/gpu/drm/nouveau/nouveau_bo.c |2 - drivers/gpu/drm/nouveau/nouveau_connector.c|4 +- drivers/gpu/drm/nouveau/nvkm/engine/disp/hdmi.c| 34

[PATCH] drm/nouveau/nvif/mmu: Use struct_size() helper

2019-08-07 Thread Gustavo A. R. Silva
igned-off-by: Gustavo A. R. Silva --- drivers/gpu/drm/nouveau/nvif/mmu.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpu/drm/nouveau/nvif/mmu.c b/drivers/gpu/drm/nouveau/nvif/mmu.c index ae08a1ca8044..5641bda2046d 100644 --- a/drivers/gpu/drm/nouveau/nvif/mmu.c +++ b/driver

[Nouveau] [PATCH] drm/nouveau/mmu: use struct_size() helper

2019-05-24 Thread Gustavo A. R. Silva
, data, mmu->kind_nr) This code was detected with the help of Coccinelle. Signed-off-by: Gustavo A. R. Silva --- drivers/gpu/drm/nouveau/nvif/mmu.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpu/drm/nouveau/nvif/mmu.c b/drivers/gpu/drm/nouveau/nvif/mm

Re: [Nouveau] [PATCH] drm/nouveau/bo: mark expected switch fall-through

2019-02-15 Thread Gustavo A. R. Silva
Hi all, Alex Deucher requested me to send separate patches for each driver, which makes this patch available to be taken, again. Thanks -- Gustavo On 2/15/19 10:02 AM, Gustavo A. R. Silva wrote: > Hi, > > Please drop this, as I have included this fix into > the following patch, whi

Re: [Nouveau] [PATCH] drm: Mark expected switch fall-throughs

2019-02-15 Thread Gustavo A. R. Silva
On 2/15/19 10:11 AM, Alex Deucher wrote: > On Fri, Feb 15, 2019 at 11:08 AM Gustavo A. R. Silva > wrote: >> >> In preparation to enabling -Wimplicit-fallthrough, mark switch >> cases where we are expecting to fall through. >> >> Warning level 3 was used: -

Re: [Nouveau] [PATCH] drm/nouveau/bo: mark expected switch fall-through

2019-02-15 Thread Gustavo A. R. Silva
Hi, Please drop this, as I have included this fix into the following patch, which addresses all the expected fall-throughs in drivers/gpu/drm: https://lore.kernel.org/patchwork/patch/1042856/ Thanks -- Gustavo On 2/11/19 12:58 PM, Gustavo A. R. Silva wrote: > In preparation to enabl

[Nouveau] [PATCH] drm: Mark expected switch fall-throughs

2019-02-15 Thread Gustavo A. R. Silva
of the ongoing efforts to enable -Wimplicit-fallthrough. Signed-off-by: Gustavo A. R. Silva --- drivers/gpu/drm/amd/amdgpu/gfx_v8_0.c | 1 + drivers/gpu/drm/amd/amdgpu/si_dpm.c | 2 ++ drivers/gpu/drm/amd/display/dc/bios/bios_parser2.c | 2 ++ drivers/gpu/drm/amd

Re: [Nouveau] [PATCH] drm/nouveau/nvkm: mark expected switch fall-throughs

2019-02-15 Thread Gustavo A. R. Silva
Hello, Friendly ping (second one): Who can take this, please? Thanks -- Gustavo On 1/10/19 1:33 PM, Gustavo A. R. Silva wrote: > Hi, > > Friendly ping: > > Who can take this? > > Thanks > -- > Gustavo > > On 10/17/18 9:28 AM, Gustavo A. R. Silva wro

[Nouveau] [PATCH] drm/nouveau/abi16: add missing break in switch statement

2019-02-11 Thread Gustavo A. R. Silva
orm) { ^~ drivers/gpu/drm/nouveau/nouveau_abi16.c:217:2: note: here case NOUVEAU_GETPARAM_FB_SIZE: ^~~~ This patch is part of the ongoing efforts to enable -Wimplicit-fallthrough. Signed-off-by: Gustavo A. R. Silva --- drivers/gpu/drm/nouveau/nouveau_abi16.c | 1 + 1 file changed, 1 insert

Re: [Nouveau] [PATCH] drm/nouveau: mark expected switch fall-through

2019-01-29 Thread Gustavo A. R. Silva
Ben, I wonder if you can take this too: https://lore.kernel.org/patchwork/patch/1001180/ Thanks -- Gustavo On 1/29/19 8:51 PM, Ben Skeggs wrote: > Got it, thanks. > > On Wed, 30 Jan 2019 at 06:55, Gustavo A. R. Silva > wrote: >> >> In preparation to enabling -Wim

Re: [Nouveau] [PATCH] drm/nouveau: fix missing break in switch statement

2019-01-29 Thread Gustavo A. R. Silva
Fix this by adding > in the missing break. > > Detected by CoverityScan, CID#1460507 ("Missing break in switch") > > Fixes: 359088d5b8ec ("drm/nouveau: remove trivial cases of nvxx_device() > usage") > Signed-off-by: Colin Ian King Reviewed-by: Gusta

Re: [Nouveau] [PATCH] drm/nouveau: fix missing break in switch statement

2019-01-29 Thread Gustavo A. R. Silva
On 1/29/19 2:49 PM, Gustavo A. R. Silva wrote: > > > On 10/8/18 3:47 PM, Colin King wrote: >> From: Colin Ian King >> >> The NOUVEAU_GETPARAM_PCI_DEVICE case is missing a break statement and falls >> through to the following NOUVEAU_GETPARAM_BUS_TYPE ca

[Nouveau] [PATCH] drm/nouveau: mark expected switch fall-through

2019-01-29 Thread Gustavo A. R. Silva
: -Wimplicit-fallthrough=3 This patch is part of the ongoing efforts to enabling -Wimplicit-fallthrough. Signed-off-by: Gustavo A. R. Silva --- drivers/gpu/drm/nouveau/nouveau_bo.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpu/drm/nouveau/nouveau_bo.c b/drivers/gpu/drm

Re: [Nouveau] [PATCH] drm/nouveau/nvkm: mark expected switch fall-throughs

2019-01-10 Thread Gustavo A. R. Silva
Hi, Friendly ping: Who can take this? Thanks -- Gustavo On 10/17/18 9:28 AM, Gustavo A. R. Silva wrote: In preparation to enabling -Wimplicit-fallthrough, mark switch cases where we are expecting to fall through. This patch aims to suppress 29 missing-break-in-switch false positives

[Nouveau] [PATCH] drm/nouveau/nvkm: mark expected switch fall-throughs

2018-10-17 Thread Gustavo A. R. Silva
ot;) Addresses-Coverity-ID: 141435 ("Missing break in switch") Addresses-Coverity-ID: 141436 ("Missing break in switch") Signed-off-by: Gustavo A. R. Silva --- drivers/gpu/drm/nouveau/nvkm/engine/disp/hdmi.c| 17 + drivers/gpu/drm/nouveau/nvkm/engine/dma/usernv04.c

Re: [Nouveau] [PATCH] drm/nouveau/secboot/acr: fix memory leak

2018-08-02 Thread Gustavo A. R. Silva
Hi all, Friendly ping! Who can take this? Thanks -- Gustavo On 07/24/2018 08:27 AM, Gustavo A. R. Silva wrote: > In case memory resources for *bl_desc* were allocated, release > them before return. > > Addresses-Coverity-ID: 1472021 ("Resource leak") > Fixes: 0d4669015

[Nouveau] [PATCH] drm/nouveau/secboot/acr: fix memory leak

2018-07-24 Thread Gustavo A. R. Silva
In case memory resources for *bl_desc* were allocated, release them before return. Addresses-Coverity-ID: 1472021 ("Resource leak") Fixes: 0d466901552a ("drm/nouveau/secboot/acr: Remove VLA usage") Signed-off-by: Gustavo A. R. Silva --- drivers/gpu/drm/nouveau/nvkm/subdev/se

[Nouveau] [PATCH] drm/nouveau/nvkm: mark expected switch fall-throughs

2018-06-26 Thread Gustavo A. R. Silva
In preparation to enabling -Wimplicit-fallthrough, mark switch cases where we are expecting to fall through. Signed-off-by: Gustavo A. R. Silva --- drivers/gpu/drm/nouveau/nvkm/engine/disp/hdmi.c| 17 + drivers/gpu/drm/nouveau/nvkm/engine/dma/usernv04.c | 1 + drivers/gpu

[Nouveau] [PATCH v2] drm/nouveau/secboot: remove VLA usage

2018-03-23 Thread Gustavo A. R. Silva
the kernel: https://lkml.org/lkml/2018/3/7/621 Signed-off-by: Gustavo A. R. Silva <gust...@embeddedor.com> --- Changes in v2: - Use sizeof(buf) instead of NVKM_MSGQUEUE_CMDLINE_SIZE. This change is based on the feedback provided by David Laight. Thanks David. drivers/gpu/drm/nouveau/nvkm/

Re: [Nouveau] [PATCH] drm/nouveau/secboot: remove VLA usage

2018-03-23 Thread Gustavo A. R. Silva
Hi David, On 03/13/2018 11:10 AM, David Laight wrote: From: Gustavo A. R. Silva Sent: 13 March 2018 14:48 In preparation to enabling -Wvla, remove VLA. In this particular case directly use macro NVKM_MSGQUEUE_CMDLINE_SIZE instead of local variable cmdline_size. Also, remove cmdline_size

[Nouveau] [PATCH] drm/nouveau/secboot: remove VLA usage

2018-03-23 Thread Gustavo A. R. Silva
the kernel: https://lkml.org/lkml/2018/3/7/621 Signed-off-by: Gustavo A. R. Silva <gust...@embeddedor.com> --- drivers/gpu/drm/nouveau/nvkm/subdev/secboot/ls_ucode_msgqueue.c | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/gpu/drm/nouveau/nvkm/subdev/s

[Nouveau] [drm-nouveau-mmu] question about potential NULL pointer dereference

2018-02-13 Thread Gustavo A. R. Silva
Hi all, While doing some static analysis I ran into the following piece of code at drivers/gpu/drm/nouveau/nvkm/subdev/mmu/vmm.c:957: 957#define node(root, dir) ((root)->head.dir == >list) ? NULL : \ 958list_entry((root)->head.dir, struct nvkm_vma, head) 959

[Nouveau] [PATCH] drm/nouveau/bios/timing: mark expected switch fall-throughs

2017-11-02 Thread Gustavo A. R. Silva
In preparation to enabling -Wimplicit-fallthrough, mark switch cases where we are expecting to fall through. Addresses-Coverity-ID: 1260018 Addresses-Coverity-ID: 1260019 Addresses-Coverity-ID: 1260022 Signed-off-by: Gustavo A. R. Silva <garsi...@embeddedor.com> --- drivers/gpu/drm/nouvea

[Nouveau] [PATCH] drm/nouveau/devinit/nv04: mark expected switch fall-throughs

2017-11-02 Thread Gustavo A. R. Silva
-off-by: Gustavo A. R. Silva <garsi...@embeddedor.com> --- drivers/gpu/drm/nouveau/nvkm/subdev/devinit/nv04.c | 12 ++-- 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/drivers/gpu/drm/nouveau/nvkm/subdev/devinit/nv04.c b/drivers/gpu/drm/nouveau/nvkm/subdev/devinit/nv04.c

[Nouveau] [PATCH] gpu: drm: nouveau: add null check before pointer dereference

2017-05-23 Thread Gustavo A. R. Silva
Add null check before dereferencing pointer asyc Addresses-Coverity-ID: 1397932 Signed-off-by: Gustavo A. R. Silva <garsi...@embeddedor.com> --- drivers/gpu/drm/nouveau/nv50_display.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/gpu/drm/nouveau/nv50_displa