On Fri, 04 Mar 2022, Xiaoming Ni wrote:
For example, + #define register_sysctl_init(path, table) __register_sysctl_init(path, table, ARRAY_SIZE(table)) ... - for (entry = table; entry->procname; entry++, node++) + for (entry = table; entry->procname && num > 0; entry++, node++, num--) {
Furthermore the other iteratators could be consolidated such as: +#define for_each_table_entry(entry, table) \ + for ((entry) = (table); (entry)->procname; (entry)++) .... probably before this patch. Thanks, Davidlohr