From: Yafang Shao <laoar.shao@gmail.com>
To: Michal Miroslaw <mirq-linux@rere.qmqm.pl>
Cc: Andrew Morton <akpm@linux-foundation.org>,
Steven Rostedt <rostedt@goodmis.org>,
Kees Cook <keescook@chromium.org>,
Petr Mladek <pmladek@suse.com>,
David Hildenbrand <david@redhat.com>,
Arnaldo Carvalho de Melo <arnaldo.melo@gmail.com>,
Andrii Nakryiko <andrii.nakryiko@gmail.com>,
Alexei Starovoitov <alexei.starovoitov@gmail.com>,
Linux MM <linux-mm@kvack.org>, bpf <bpf@vger.kernel.org>,
"linux-perf-use." <linux-perf-users@vger.kernel.org>,
Linux-Fsdevel <linux-fsdevel@vger.kernel.org>,
LKML <linux-kernel@vger.kernel.org>,
Mathieu Desnoyers <mathieu.desnoyers@efficios.com>,
Peter Zijlstra <peterz@infradead.org>,
Matthew Wilcox <willy@infradead.org>,
Al Viro <viro@zeniv.linux.org.uk>
Subject: Re: [PATCH -mm v2 2/3] cn_proc: replaced old hard-coded 16 with TASK_COMM_LEN_16
Date: Mon, 13 Dec 2021 00:26:04 +0800 [thread overview]
Message-ID: <CALOAHbA+i96zO+XHOBM+k3F1viOnhe=e=z=Vobc+1Bh8NAP9SA@mail.gmail.com> (raw)
In-Reply-To: <YbWSQy0pmO9RgRUu@qmqm.qmqm.pl>
On Sun, Dec 12, 2021 at 2:10 PM Michal Miroslaw <mirq-linux@rere.qmqm.pl> wrote:
>
> On Sat, Dec 11, 2021 at 06:39:48AM +0000, Yafang Shao wrote:
> > This TASK_COMM_LEN_16 has the same meaning with the macro defined in
> > linux/sched.h, but we can't include linux/sched.h in a UAPI header, so
> > we should specifically define it in the cn_proc.h.
> [...]
> > index db210625cee8..6dcccaed383f 100644
> > --- a/include/uapi/linux/cn_proc.h
> > +++ b/include/uapi/linux/cn_proc.h
> > @@ -21,6 +21,8 @@
> >
> > #include <linux/types.h>
> >
> > +#define TASK_COMM_LEN_16 16
>
> Hi,
>
> Since this is added to UAPI header, maybe you could make it a single
> instance also used elsewhere? Even though this is constant and not
> going to change I don't really like multiplying the sources of truth.
>
Hmm, what about defining it in include/uapi/linux/sched.h ?
Then include "sched.h" in cn_proc.h
And we also define it in tools/include/uapi/linux/sched.h for the
usage in tools.
--
Thanks
Yafang
next prev parent reply other threads:[~2021-12-12 16:27 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-12-11 6:39 [PATCH -mm v2 0/3] Phase 2 of task comm cleanups Yafang Shao
2021-12-11 6:39 ` [PATCH -mm v2 1/3] elfcore: replace old hard-code 16 with TASK_COMM_LEN_16 Yafang Shao
2021-12-11 6:39 ` [PATCH -mm v2 2/3] cn_proc: replaced old hard-coded " Yafang Shao
2021-12-12 6:10 ` Michal Miroslaw
2021-12-12 16:26 ` Yafang Shao [this message]
2021-12-11 6:39 ` [PATCH -mm v2 3/3] tools/perf: replace " Yafang Shao
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='CALOAHbA+i96zO+XHOBM+k3F1viOnhe=e=z=Vobc+1Bh8NAP9SA@mail.gmail.com' \
--to=laoar.shao@gmail.com \
--cc=akpm@linux-foundation.org \
--cc=alexei.starovoitov@gmail.com \
--cc=andrii.nakryiko@gmail.com \
--cc=arnaldo.melo@gmail.com \
--cc=bpf@vger.kernel.org \
--cc=david@redhat.com \
--cc=keescook@chromium.org \
--cc=linux-fsdevel@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=linux-perf-users@vger.kernel.org \
--cc=mathieu.desnoyers@efficios.com \
--cc=mirq-linux@rere.qmqm.pl \
--cc=peterz@infradead.org \
--cc=pmladek@suse.com \
--cc=rostedt@goodmis.org \
--cc=viro@zeniv.linux.org.uk \
--cc=willy@infradead.org \
/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