linux_dsm_epyc7002/drivers/gpu/drm/etnaviv
Gustavo A. R. Silva 1442d81fef drm/etnaviv: Replace zero-length array with flexible-array member
The current codebase makes use of the zero-length array language
extension to the C90 standard, but the preferred mechanism to declare
variable-length types such as these ones is a flexible array member[1][2],
introduced in C99:

struct foo {
        int stuff;
        struct boo array[];
};

By making use of the mechanism above, we will get a compiler warning
in case the flexible array does not occur last in the structure, which
will help us prevent some kind of undefined behavior bugs from being
inadvertently introduced[3] to the codebase from now on.

Also, notice that, dynamic memory allocations won't be affected by
this change:

"Flexible array members have incomplete type, and so the sizeof operator
may not be applied. As a quirk of the original implementation of
zero-length arrays, sizeof evaluates to zero."[1]

This issue was found with the help of Coccinelle.

[1] https://gcc.gnu.org/onlinedocs/gcc/Zero-Length.html
[2] https://github.com/KSPP/linux/issues/21
[3] commit 7649773293 ("cxgb3/l2t: Fix undefined behaviour")

Signed-off-by: Gustavo A. R. Silva <gustavo@embeddedor.com>
Signed-off-by: Lucas Stach <l.stach@pengutronix.de>
2020-03-05 12:15:46 +01:00
..
cmdstream.xml.h
common.xml.h drm/etnaviv: update hardware headers from rnndb 2018-03-09 12:22:36 +01:00
etnaviv_buffer.c Merge drm/drm-next into drm-misc-next 2019-10-03 16:38:50 +02:00
etnaviv_cmd_parser.c drm/etnaviv: replace license text with SPDX tags 2018-05-18 15:27:56 +02:00
etnaviv_cmdbuf.c drm/etnaviv: implement softpin 2019-08-15 12:07:47 +02:00
etnaviv_cmdbuf.h drm/etnaviv: rework MMU handling 2019-08-15 10:56:45 +02:00
etnaviv_drv.c drm pull for 5.6-rc1 2020-01-30 08:04:01 -08:00
etnaviv_drv.h drm/etnaviv: avoid deprecated timespec 2019-12-18 18:07:32 +01:00
etnaviv_dump.c drm/etnaviv: fix deadlock in GPU coredump 2019-10-29 18:11:06 +01:00
etnaviv_dump.h drm/etnaviv: pass mmu pointer to etnaviv_core_dump_mmu 2019-08-15 10:53:31 +02:00
etnaviv_gem_prime.c Merge branch 'etnaviv/next' of https://git.pengutronix.de/git/lst/linux into drm-next 2019-08-22 13:21:16 +10:00
etnaviv_gem_submit.c drm/etnaviv: Use dma_resv locking wrappers 2019-12-17 17:26:08 +01:00
etnaviv_gem.c drm/etnaviv: avoid deprecated timespec 2019-12-18 18:07:32 +01:00
etnaviv_gem.h drm/etnaviv: Replace zero-length array with flexible-array member 2020-03-05 12:15:46 +01:00
etnaviv_gpu.c drm/etnaviv: Warn when GPU doesn't idle fast enough 2020-03-03 10:58:57 +01:00
etnaviv_gpu.h drm/etnaviv: determine product, customer and eco id 2020-02-26 16:20:04 +01:00
etnaviv_hwdb.c drm/etnaviv: add hwdb entry for gc400 found in STM32 2020-02-26 16:20:04 +01:00
etnaviv_iommu_v2.c drm/etnaviv: fix dumping of iommuv2 2019-10-29 18:12:24 +01:00
etnaviv_iommu.c drm/etnaviv: fix missing unlock on error in etnaviv_iommuv1_context_alloc() 2019-09-02 12:48:55 +02:00
etnaviv_mmu.c drm/etnaviv: reinstate MMUv1 command buffer window check 2019-10-29 18:11:50 +01:00
etnaviv_mmu.h drm/etnaviv: allow to request specific virtual address for gem mapping 2019-08-15 11:58:59 +02:00
etnaviv_perfmon.c drm/etnaviv: rework perfmon query infrastructure 2020-03-03 10:58:06 +01:00
etnaviv_perfmon.h drm/etnaviv: replace license text with SPDX tags 2018-05-18 15:27:56 +02:00
etnaviv_sched.c drm/etnaviv: dump only failing submit 2019-08-15 10:48:51 +02:00
etnaviv_sched.h drm/etnaviv: replace license text with SPDX tags 2018-05-18 15:27:56 +02:00
Kconfig treewide: Add SPDX license identifier - Makefile/Kconfig 2019-05-21 10:50:46 +02:00
Makefile drm/etnaviv: add hardware database 2018-03-09 12:22:37 +01:00
state_3d.xml.h drm/etnaviv: update hardware headers from rnndb 2018-03-09 12:22:36 +01:00
state_blt.xml.h drm/etnaviv: update hardware headers from rnndb 2018-03-09 12:22:36 +01:00
state_hi.xml.h drm/etnaviv: Update idle bits 2020-03-03 10:58:57 +01:00
state.xml.h drm/etnaviv: update hardware headers from rnndb 2018-03-09 12:22:36 +01:00