[PATCH] [next] i915/gvt: Replace one-element array with flexible-array member

2022-12-19 Thread Paulo Miguel Almeida
://gcc.gnu.org/bugzilla/show_bug.cgi?id=101836 [1] Signed-off-by: Paulo Miguel Almeida --- To make reviewing this patch easier, I'm pasting before/after struct sizes. pahole -C gvt_firmware_header before/drivers/gpu/drm/i915/gvt/firmware.o struct gvt_firmware_header {

[PATCH] [next] drm/radeon: Replace 1-element arrays with flexible-array members

2022-12-09 Thread Paulo Miguel Almeida
trict-flex-arrays=3 [1]. Link: https://github.com/KSPP/linux/issues/79 Link: https://github.com/KSPP/linux/issues/239 Link: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=101836 [1] Signed-off-by: Paulo Miguel Almeida --- Notes for the maintainer: - These are all fake-flexible arrays with referenc

[PATCH] [next] drm/amdgpu: Replace remaining 1-element array with flex-array

2022-11-20 Thread Paulo Miguel Almeida
/linux/issues/238 Link: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=101836 [1] Signed-off-by: Paulo Miguel Almeida --- This should be the last one-element array that had references in source code. Given the way it was used, no *.c code change was required. I will move on to the atombios.h in the

[PATCH] [next] drm/amdgpu: Replace one-elements array with flex-array members

2022-11-12 Thread Paulo Miguel Almeida
: https://github.com/KSPP/linux/issues/79 Link: https://github.com/KSPP/linux/issues/238 Link: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=101836 [1] Signed-off-by: Paulo Miguel Almeida --- Binary difference findings: Some changes took more than a single line which changed the line

Re: [RFC] Approaches to deal with a struct with multiple fake flexible arrays members

2022-11-10 Thread Paulo Miguel Almeida
On Thu, Nov 10, 2022 at 11:39:02PM -0600, Gustavo A. R. Silva wrote: > On Wed, Nov 09, 2022 at 10:20:34PM -0500, Alex Deucher wrote: > > On Wed, Nov 9, 2022 at 8:31 PM Paulo Miguel Almeida > > wrote: > > > > > > On Wed, Nov 09, 2022 at 06:45:57PM -0600, Gustavo

Re: [RFC] Approaches to deal with a struct with multiple fake flexible arrays members

2022-11-09 Thread Paulo Miguel Almeida
On Wed, Nov 09, 2022 at 06:45:57PM -0600, Gustavo A. R. Silva wrote: > On Wed, Nov 09, 2022 at 04:45:42PM +1300, Paulo Miguel Almeida wrote: > > Adding Alex, Christian and DRM lists to the thread. Thanks so much for your reply Gustavo Yep, that's a good idea. > > > stru

[PATCH] [next] drm/amdgpu: Replace one-element array with flex-array member

2022-11-08 Thread Paulo Miguel Almeida
://gcc.gnu.org/bugzilla/show_bug.cgi?id=101836 [1] Signed-off-by: Paulo Miguel Almeida --- Alex, I noticed a few structs in atombios.h that were not referenced. Is there any appetite for removing them? Or is that one of those cases where the structs are there should one driver ever need it? Ex

[PATCH] [next] drm/amdgpu: Replace 1-element array with flexible-array member

2022-11-07 Thread Paulo Miguel Almeida
-arrays=3 [1]. Link: https://github.com/KSPP/linux/issues/79 Link: https://github.com/KSPP/linux/issues/238 Link: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=101836 [1] Signed-off-by: Paulo Miguel Almeida --- Binary difference findings: Some changes took more than a single line which changed

Re: [PATCH v2] [next] drm/radeon: Replace one-element array with flexible-array member

2022-11-01 Thread Paulo Miguel Almeida
On Tue, Nov 01, 2022 at 10:42:14AM -0400, Alex Deucher wrote: > On Fri, Oct 28, 2022 at 11:32 PM Paulo Miguel Almeida > wrote: > > > > One-element arrays are deprecated, and we are replacing them with > > flexible array members instead. So, replace one-element array with &

[PATCH] [next] i915/gvt: remove hardcoded value on crc32_start calculation

2022-10-29 Thread Paulo Miguel Almeida
per look at the struct. This patch changes crc32_start offset to the 'version' member which is the first member of the struct gvt_firmware_header after crc32. It's worth mentioning that doing a build before/after this patch results in no binary output differences. Signe

[PATCH v2] [next] drm/radeon: Replace one-element array with flexible-array member

2022-10-28 Thread Paulo Miguel Almeida
linux/issues/239 Link: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=101836 [1] Signed-off-by: Paulo Miguel Almeida --- Changelog: v2: no binary output differences patch; report binary changes findings on commit log. Res: Kees Cook. This request was made in an identical, yet diff

[PATCH v2] [next] drm/amdgpu: Replace one-element array with flexible-array member

2022-10-28 Thread Paulo Miguel Almeida
/linux/issues/238 Link: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=101836 [1] Signed-off-by: Paulo Miguel Almeida --- Changelog: v2: no binary output differences patch; report binary changes findings on commit log. Res: Kees Cook v1: https://lore.kernel.org/lkml/y1tkwdwpup+ud...@mail.google.com

Re: [PATCH] [next] drm/amdgpu: Replace one-element array with flexible-array member

2022-10-28 Thread Paulo Miguel Almeida
On Fri, Oct 28, 2022 at 07:33:17PM +0200, Christian König wrote: > Am 28.10.22 um 18:36 schrieb Kees Cook: > > > All that said, converting away from them can be tricky, and I think such > > conversions need to explicitly show how they were checked for binary > > differences[2]. > > Oh, that's a g

[PATCH] [next] drm/radeon: Replace one-element array with flexible-array member

2022-10-27 Thread Paulo Miguel Almeida
FORTIFY_SOURCE routines on memcpy() and help us make progress towards globally enabling -fstrict-flex-arrays=3 [1]. Link: https://github.com/KSPP/linux/issues/79 Link: https://github.com/KSPP/linux/issues/239 Link: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=101836 [1] Signed-off-by: Paulo Miguel

[PATCH] [next] drm/amdgpu: Replace one-element array with flexible-array member

2022-10-27 Thread Paulo Miguel Almeida
FORTIFY_SOURCE routines on memcpy() and help us make progress towards globally enabling -fstrict-flex-arrays=3 [1]. Link: https://github.com/KSPP/linux/issues/79 Link: https://github.com/KSPP/linux/issues/238 Link: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=101836 [1] Signed-off-by: Paulo Miguel

[PATCH] [next] drm/amdgpu: clean up unused constants, macros and includes

2022-10-27 Thread Paulo Miguel Almeida
Remove include directives in which header is already included via another header (atombios.h -> atom.h). Remove unused constants and macros. Signed-off-by: Paulo Miguel Almeida --- drivers/gpu/drm/amd/amdgpu/amdgpu.h | 3 --- drivers/gpu/drm/amd/amdgpu/amdgpu_atomfirmware.c

Re: [PATCH] [next] amdkfd: remove unused kfd_pm4_headers_diq header file

2022-10-26 Thread Paulo Miguel Almeida
On Tue, Oct 25, 2022 at 03:48:33PM -0400, Felix Kuehling wrote: > Am 2022-10-25 um 05:12 schrieb Paulo Miguel Almeida: > > kfd_pm4_headers_diq.h header is a leftover from the old H/W debugger > > module support added on commit . That implementation > > was removed after a wh

[PATCH] [next] amdkfd: remove unused kfd_pm4_headers_diq header file

2022-10-26 Thread Paulo Miguel Almeida
_diq.h Signed-off-by: Paulo Miguel Almeida --- .../gpu/drm/amd/amdkfd/kfd_pm4_headers_diq.h | 291 -- 1 file changed, 291 deletions(-) delete mode 100644 drivers/gpu/drm/amd/amdkfd/kfd_pm4_headers_diq.h diff --git a/drivers/gpu/drm/amd/amdkfd/kfd_pm4_headers_diq.h b/drivers/g

[PATCH] [next] amdkfd: remove unused struct cdit_header

2022-10-26 Thread Paulo Miguel Almeida
struct cdit_header was never used across any of the amd drivers nor this is exposed to UAPI so it can be removed. This patch removes struct cdit_header and refactor code accordingly Signed-off-by: Paulo Miguel Almeida --- At some point, removing this structure was suggested during a review for