mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Davidlohr Bueso <dave@stgolabs.net>
To: Xiaoming Ni <nixiaoming@huawei.com>
Cc: Meng Tang <tangmeng@uniontech.com>,
	mcgrof@kernel.org, keescook@chromium.org, yzaikin@google.com,
	ebiederm@xmission.com, willy@infradead.org, nizhen@uniontech.com,
	zhanglianjie@uniontech.com, sujiaxun@uniontech.com,
	linux-kernel@vger.kernel.org, linux-fsdevel@vger.kernel.org
Subject: Re: [PATCH v4 1/2] fs/proc: optimize exactly register one ctl_table
Date: Fri, 11 Mar 2022 22:14:17 -0800	[thread overview]
Message-ID: <20220312061417.bpdzf2fxf4pb2h6a@offworld> (raw)
In-Reply-To: <624f92f0-c2a1-c7d9-a4ed-6d72c48d3ab3@huawei.com>

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

  reply	other threads:[~2022-03-12  6:23 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-03-03  7:08 Meng Tang
2022-03-03  7:08 ` [PATCH v4 2/2] fs/proc: sysctl: optimize register single " Meng Tang
2022-03-04  1:21 ` [PATCH v4 1/2] fs/proc: optimize exactly register " Xiaoming Ni
2022-03-12  6:14   ` Davidlohr Bueso [this message]
2022-03-12  3:24 ` Al Viro

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20220312061417.bpdzf2fxf4pb2h6a@offworld \
    --to=dave@stgolabs.net \
    --cc=ebiederm@xmission.com \
    --cc=keescook@chromium.org \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mcgrof@kernel.org \
    --cc=nixiaoming@huawei.com \
    --cc=nizhen@uniontech.com \
    --cc=sujiaxun@uniontech.com \
    --cc=tangmeng@uniontech.com \
    --cc=willy@infradead.org \
    --cc=yzaikin@google.com \
    --cc=zhanglianjie@uniontech.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®