Skip to content

Commit 7347586

Browse files
committed
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 d7a76ec ("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 <[email protected]> Reviewed-by: Kees Cook <[email protected]>
1 parent 2014c95 commit 7347586

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

arch/csky/abiv1/alignment.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -300,7 +300,7 @@ void csky_alignment(struct pt_regs *regs)
300300
force_sig_fault(SIGBUS, BUS_ADRALN, (void __user *)addr);
301301
}
302302

303-
static struct ctl_table alignment_tbl[5] = {
303+
static const struct ctl_table alignment_tbl[] = {
304304
{
305305
.procname = "kernel_enable",
306306
.data = &align_kern_enable,

0 commit comments

Comments
 (0)