diff options
| author | Brahmajit Das <[email protected]> | 2024-10-04 19:51:32 +0000 |
|---|---|---|
| committer | Christian Brauner <[email protected]> | 2024-12-03 09:40:36 +0000 |
| commit | 989e0cdc0f18a594b25cabc60426d29659aeaf58 (patch) | |
| tree | 2d42812a150cd3a80b2c7f614ab7863f2822e007 /drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c | |
| parent | hfs: Sanity check the root record (diff) | |
| download | kernel-989e0cdc0f18a594b25cabc60426d29659aeaf58.tar.gz kernel-989e0cdc0f18a594b25cabc60426d29659aeaf58.zip | |
fs/qnx6: Fix building with GCC 15
qnx6_checkroot() had been using weirdly spelled initializer - it needed
to initialize 3-element arrays of char and it used NUL-padded
3-character string literals (i.e. 4-element initializers, with
completely pointless zeroes at the end).
That had been spotted by gcc-15[*]; prior to that gcc quietly dropped
the 4th element of initializers.
However, none of that had been needed in the first place - all this
array is used for is checking that the first directory entry in root
directory is "." and the second - "..". The check had been expressed as
a loop, using that match_root[] array. Since there is no chance that we
ever want to extend that list of entries, the entire thing is much too
fancy for its own good; what we need is just a couple of explicit
memcmp() and that's it.
[*]: fs/qnx6/inode.c: In function ‘qnx6_checkroot’:
fs/qnx6/inode.c:182:41: error: initializer-string for array of ‘char’ is too long [-Werror=unterminated-string-initialization]
182 | static char match_root[2][3] = {".\0\0", "..\0"};
| ^~~~~~~
fs/qnx6/inode.c:182:50: error: initializer-string for array of ‘char’ is too long [-Werror=unterminated-string-initialization]
182 | static char match_root[2][3] = {".\0\0", "..\0"};
| ^~~~~~
Signed-off-by: Brahmajit Das <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Acked-by: Al Viro <[email protected]>
Signed-off-by: Christian Brauner <[email protected]>
Diffstat (limited to 'drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c')
0 files changed, 0 insertions, 0 deletions
