[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20220312061417.bpdzf2fxf4pb2h6a@offworld>
Date: Fri, 11 Mar 2022 22:14:17 -0800
From: Davidlohr Bueso <dave@...olabs.net>
To: Xiaoming Ni <nixiaoming@...wei.com>
Cc: Meng Tang <tangmeng@...ontech.com>, mcgrof@...nel.org,
keescook@...omium.org, yzaikin@...gle.com, ebiederm@...ssion.com,
willy@...radead.org, nizhen@...ontech.com,
zhanglianjie@...ontech.com, sujiaxun@...ontech.com,
linux-kernel@...r.kernel.org, linux-fsdevel@...r.kernel.org
Subject: Re: [PATCH v4 1/2] fs/proc: optimize exactly register one ctl_table
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
Powered by blists - more mailing lists