From: Joel Granados Date: Fri, 31 Jan 2025 13:10:57 +0000 (+0100) Subject: csky: Remove the size from alignment_tbl declaration X-Git-Tag: v6.15-rc1~162^2~21 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=7347586f007f7bc62bbbd1cba9d9351e4f79ebb0;p=thirdparty%2Fkernel%2Flinux.git csky: Remove the size from alignment_tbl declaration Having to synchronize the number of ctl_table array elements with the size in the declaration can lead to discrepancies between the two values. Since commit d7a76ec87195 ("sysctl: Remove check for sentinel element in ctl_table arrays"), the calculation of the ctl_table array size is done solely by the ARRAY_SIZE macro removing the need for the size in the declaration. Remove the size for the aligment_tbl declaration and const qualify the array for good measure. Signed-off-by: Joel Granados Reviewed-by: Kees Cook --- diff --git a/arch/csky/abiv1/alignment.c b/arch/csky/abiv1/alignment.c index e5b8b4b2109ac..aee904833dece 100644 --- a/arch/csky/abiv1/alignment.c +++ b/arch/csky/abiv1/alignment.c @@ -300,7 +300,7 @@ bad_area: force_sig_fault(SIGBUS, BUS_ADRALN, (void __user *)addr); } -static struct ctl_table alignment_tbl[5] = { +static const struct ctl_table alignment_tbl[] = { { .procname = "kernel_enable", .data = &align_kern_enable,