-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
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
is break;
>
> 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:
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
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
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
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 enable
s://gcc.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
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
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 Bottoml
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
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
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, Mart
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
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
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
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
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 fall t
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
stavo 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
stavo 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
stavo 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
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 ca
drivers?
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
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 ca
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
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
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
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
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:
>
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
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
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
>
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
/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
--- a
: warning: structure containing a
flexible array member is not at the end of another structure
[-Wflex-array-member-not-at-end]
Signed-off-by: Gustavo A. R. Silva
---
drivers/gpu/drm/nouveau/dispnv50/disp.c | 20 +---
1 file changed, 9 insertions(+), 11 deletions(-)
diff --git a
On 22/08/24 11:27, Kees Cook wrote:
On Wed, Aug 21, 2024 at 02:16:21PM -0600, Gustavo A. R. Silva wrote:
Use the `DEFINE_RAW_FLEX()` helper for an on-stack definition of
a flexible structure where the size of the flexible-array member
is known at compile-time, and refactor the rest of the
Hi all,
Friendly ping: who can take this, please? 🙂
Thanks
-Gustavo
On 21/08/24 22:16, Gustavo A. R. Silva wrote:
Use the `DEFINE_RAW_FLEX()` helper for an on-stack definition of
a flexible structure where the size of the flexible-array member
is known at compile-time, and refactor the rest
, 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
ed-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
-off-by: Gustavo A. R. Silva
---
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
index 158977f..c3dae05 100644
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
---
drivers/gpu/drm/nouveau/nvkm/subdev/bios/timing.c | 5
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 == &vmm->list) ? NULL :
\
958list_entry((root)->head.dir, struct nvkm_vma, head)
959
Quoting Ben Skeggs :
On Wed, Feb 14, 2018 at 1:40 AM, Gustavo A. R. Silva
wrote:
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 == &vmm->li
kernel: https://lkml.org/lkml/2018/3/7/621
Signed-off-by: Gustavo A. R. Silva
---
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/secboot/ls_ucode_msgqueue.c
b/drivers
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 as it
kernel: https://lkml.org/lkml/2018/3/7/621
Signed-off-by: Gustavo A. R. Silva
---
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/subdev/secboot
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
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
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
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
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
: -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
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 case a
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
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
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
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
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
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
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: -
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
Add null check before dereferencing pointer asyc
Addresses-Coverity-ID: 1397932
Signed-off-by: Gustavo A. R. Silva
---
drivers/gpu/drm/nouveau/nv50_display.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/drivers/gpu/drm/nouveau/nv50_display.c
b/drivers/gpu/drm/nouveau
ire_dp(struct nvif_outp *outp, u8
dpcd[DP_RECEIVER_CAP_SIZE],
|
~~~^~
Fixes: 813443721331 ("drm/nouveau/disp: move DP link config into acquire")
Cc: Ben Skeggs
Cc: Lyude Paul
Cc: Karol Herbst
Cc: David Air
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
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
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
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
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(+),
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
...@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
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
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
: 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
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
subscript 0 is outside array 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-of
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 to
On 03/10/24 12:36, Danilo Krummrich wrote:
On 9/13/24 12:23 PM, Danilo Krummrich wrote:
Hi,
On 9/13/24 10:09 AM, Gustavo A. R. Silva wrote:
Hi all,
Friendly ping: who can take this, please? 🙂
Usually, that's me. But I thought you might want to send a v2 based on Kees'
comm
Yes, it's not great, but I think it's better than having the length in two
places.
Agreed. I'll respin. :)
Thanks
--
Gustavo
]
drivers/gpu/drm/nouveau/nouveau_svm.c:82:30: warning: structure containing a
flexible array member is not at the end of another structure
[-Wflex-array-member-not-at-end]
Signed-off-by: Gustavo A. R. Silva
---
drivers/gpu/drm/nouveau/include/nvif/ioctl.h | 32 +---
drivers/gpu/drm
,
accordingly.
So, with these changes, fix the following warning:
drivers/gpu/drm/nouveau/nouveau_fence.c:188:38: warning: structure containing a
flexible array member is not at the end of another structure
[-Wflex-array-member-not-at-end]
Signed-off-by: Gustavo A. R. Silva
---
drivers/gpu/drm
[..]
- struct {
- struct nvif_chan_v0 chan;
- char name[TASK_COMM_LEN+16];
- } args;
+ DEFINE_RAW_FLEX(struct nvif_chan_v0, args, name, TASK_COMM_LEN + 16);
struct nvif_device *device = &cli->device;
struct nouveau_channel *chan;
On 07/04/25 13:50, Kees Cook wrote:
On Thu, Apr 03, 2025 at 10:45:18AM -0600, Gustavo A. R. Silva wrote:
-Wflex-array-member-not-at-end was introduced in GCC-14, and we are
getting ready to enable it, globally.
Use the `DEFINE_RAW_FLEX()` helper for a few on-stack definitions
of a flexible
On 08/04/25 17:40, Kees Cook wrote:
On Mon, Apr 07, 2025 at 05:35:47PM -0600, Gustavo A. R. Silva wrote:
[..]
- struct {
- struct nvif_chan_v0 chan;
- char name[TASK_COMM_LEN+16];
- } args;
+ DEFINE_RAW_FLEX(struct nvif_chan_v0, args, name
Use __member_size() to get the size of the flex-array member at compile
time, instead of the convoluted expression `__struct_size(p) - sizeof(*p)`
Signed-off-by: Gustavo A. R. Silva
---
drivers/gpu/drm/nouveau/dispnv50/disp.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a
Use __member_size() to get the size of the flex-array member at compile
time, instead of the convoluted expression `__struct_size(p) - sizeof(*p)`
Signed-off-by: Gustavo A. R. Silva
---
drivers/gpu/drm/nouveau/nvif/outp.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a
]
Signed-off-by: Gustavo A. R. Silva
---
Changes in v2:
- Use __member_size() instead of __struct_size() to get the
compile-time size of the flexible array.
v1:
- Link: https://lore.kernel.org/linux-hardening/Z-67Hm9uHEJs0RGw@kspp/
drivers/gpu/drm/nouveau/nouveau_chan.c | 114
> Applied to drm-misc-next, thanks!
Awesome. :)
Thank you, guys.
--
Gustavo
On 28/03/25 09:05, Danilo Krummrich wrote:
On Fri, Mar 28, 2025 at 08:45:32AM -0600, Gustavo A. R. Silva wrote:
-Wflex-array-member-not-at-end was introduced in GCC-14, and we are
getting ready to enable it, globally.
Use the `DEFINE_RAW_FLEX()` helper for an on-stack definition of
a
,
accordingly.
So, with these changes, fix the following warning:
drivers/gpu/drm/nouveau/nvif/outp.c:199:45: warning: structure containing a
flexible array member is not at the end of another structure
[-Wflex-array-member-not-at-end]
Signed-off-by: Gustavo A. R. Silva
---
Changes in v2
,
accordingly.
So, with these changes, fix the following warning:
drivers/gpu/drm/nouveau/nvif/outp.c:199:45: warning: structure containing a
flexible array member is not at the end of another structure
[-Wflex-array-member-not-at-end]
Signed-off-by: Gustavo A. R. Silva
---
drivers/gpu/drm
,
accordingly.
So, with these changes, fix the following warning:
drivers/gpu/drm/nouveau/nvif/conn.c:34:38: warning: structure containing a
flexible array member is not at the end of another structure
[-Wflex-array-member-not-at-end]
Signed-off-by: Gustavo A. R. Silva
---
drivers/gpu/drm
/nouveau/nvif/fifo.c:29:42: warning: structure containing a
flexible array member is not at the end of another structure
[-Wflex-array-member-not-at-end]
Signed-off-by: Gustavo A. R. Silva
---
Changes in v2:
- Adjust heap allocation instead of using the DEFINE_RAW_FLEX() helper.
- Link: https
On 03/04/25 11:41, Gustavo A. R. Silva wrote:
-Wflex-array-member-not-at-end was introduced in GCC-14, and we are
getting ready to enable it, globally.
Use the `DEFINE_RAW_FLEX()` helper for an on-stack definition of
a flexible structure where the size of the flexible-array member
is known
Applied this one (as well as the svm and fence one) to drm-misc-next, thanks!
Awesome. :)
Thanks!
--
Gustavo
,
accordingly.
So, with these changes, fix the following warning:
drivers/gpu/drm/nouveau/nvif/fifo.c:29:42: warning: structure containing a
flexible array member is not at the end of another structure
[-Wflex-array-member-not-at-end]
Signed-off-by: Gustavo A. R. Silva
---
drivers/gpu/drm
]
Signed-off-by: Gustavo A. R. Silva
---
drivers/gpu/drm/nouveau/nouveau_chan.c | 115 -
1 file changed, 56 insertions(+), 59 deletions(-)
diff --git a/drivers/gpu/drm/nouveau/nouveau_chan.c
b/drivers/gpu/drm/nouveau/nouveau_chan.c
index cd659b9fd1d9..a7e70517b7cd 100644
--- a
,
accordingly.
So, with these changes, fix the following warning:
drivers/gpu/drm/nouveau/nouveau_svm.c:724:44: warning: structure containing a
flexible array member is not at the end of another structure
[-Wflex-array-member-not-at-end]
Signed-off-by: Gustavo A. R. Silva
---
drivers/gpu/drm
,
accordingly.
So, with these changes, fix the following warning:
drivers/gpu/drm/nouveau/dispnv50/disp.c:779:47: warning: structure containing a
flexible array member is not at the end of another structure
[-Wflex-array-member-not-at-end]
Signed-off-by: Gustavo A. R. Silva
---
Changes in v2
99 matches
Mail list logo