diff options
| author | Thorsten Blum <thorsten.blum@linux.dev> | 2024-11-11 21:47:21 +0100 |
|---|---|---|
| committer | Andreas Larsson <andreas@gaisler.com> | 2024-11-16 09:54:12 +0100 |
| commit | 8467d8b282b54d87121f70ce78061af004471d0c (patch) | |
| tree | 65e16c4535592d1af0648065ce9ff0733ab9876f /arch/sparc/include/asm | |
| parent | f6dee26d26e3ef2a00620703fb5bf272dd459f47 (diff) | |
sparc: Replace one-element array with flexible array member
Replace the deprecated one-element array with a modern flexible array
member in the struct hvtramp_descr.
Additionally, 15 unnecessary bytes were allocated for hdesc, but instead
of fixing the parentheses in the open-coded version, use struct_size()
to calculate the correct number of bytes.
Link: https://github.com/KSPP/linux/issues/79
Signed-off-by: Thorsten Blum <thorsten.blum@linux.dev>
Fixes: 64658743fdd4 ("[SPARC64]: Remove most limitations to kernel image size.")
Reviewed-by: Andreas Larsson <andreas@gaisler.com>
Link: https://lore.kernel.org/r/20241111204724.165263-2-thorsten.blum@linux.dev
Signed-off-by: Andreas Larsson <andreas@gaisler.com>
Diffstat (limited to 'arch/sparc/include/asm')
| -rw-r--r-- | arch/sparc/include/asm/hvtramp.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/arch/sparc/include/asm/hvtramp.h b/arch/sparc/include/asm/hvtramp.h index 688ea43af0f5..ce2453ea4f2b 100644 --- a/arch/sparc/include/asm/hvtramp.h +++ b/arch/sparc/include/asm/hvtramp.h @@ -17,7 +17,7 @@ struct hvtramp_descr { __u64 fault_info_va; __u64 fault_info_pa; __u64 thread_reg; - struct hvtramp_mapping maps[1]; + struct hvtramp_mapping maps[]; }; void hv_cpu_startup(unsigned long hvdescr_pa); |
