From: Namhyung Kim <namhyung@kernel.org>
To: Ian Rogers <irogers@google.com>
Cc: Chen Ni <nichen@iscas.ac.cn>,
linux-perf-users@vger.kernel.org, peterz@infradead.org,
mingo@redhat.com, acme@kernel.org, mark.rutland@arm.com,
alexander.shishkin@linux.intel.com, jolsa@kernel.org,
adrian.hunter@intel.com, james.clark@linaro.org
Subject: Re: [PATCH] perf intel-tpebs: Remove duplicate include of stat.h
Date: Wed, 18 Mar 2026 11:34:46 -0700 [thread overview]
Message-ID: <abrwRmaS7CDhzAyl@google.com> (raw)
In-Reply-To: <CAP-5=fUitzKwJONTngiW17XkS7kVr2cDS4cDL_HccJKcnR2EgQ@mail.gmail.com>
On Wed, Mar 18, 2026 at 10:33:54AM -0700, Ian Rogers wrote:
> On Tue, Mar 17, 2026 at 8:54 PM Chen Ni <nichen@iscas.ac.cn> wrote:
> >
> > Remove duplicate inclusion of stat.h in intel-tpebs.c to clean up
> > redundant code.
> >
> > Signed-off-by: Chen Ni <nichen@iscas.ac.cn>
>
> Reviewed-by: Ian Rogers <irogers@google.com>
>
> We should really have a style for #includes and try to get it into the
> kernel coding style. It doesn't matter so much in the kernel but
> inconsistencies abound in tools, and the lack of alphabetical sorting
> allows duplicates to occur. Here is a proposal that makes sense:
>
> For any given C source file (e.g., server.c), group your #include
> directives into distinct blocks separated by a blank line, ordered as
> follows:
> * The Corresponding Header ("server.h")
> * C Standard Library Headers (<stdio.h>, <stdlib.h>)
> * OS/System-Specific Headers (<unistd.h>, <pthread.h>)
> * Third-Party Library Headers (<sqlite3.h>, <jansson.h>)
> * Your Project's Other Headers ("utils/logger.h", "database.h")
> Within each block, alphabetize the headers.
Yep, sounds good. I'm not sure if we want to convert all existing
sources for this. I think it's good for new changes touching header
inclusion.
Thanks,
Namhyung
next prev parent reply other threads:[~2026-03-18 18:34 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-03-18 3:49 [PATCH] perf intel-tpebs: Remove duplicate include of stat.h Chen Ni
2026-03-18 17:33 ` Ian Rogers
2026-03-18 18:34 ` Namhyung Kim [this message]
2026-03-18 18:57 ` Arnaldo Carvalho de Melo
2026-03-18 20:40 ` Ian Rogers
2026-03-19 17:24 ` Namhyung Kim
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=abrwRmaS7CDhzAyl@google.com \
--to=namhyung@kernel.org \
--cc=acme@kernel.org \
--cc=adrian.hunter@intel.com \
--cc=alexander.shishkin@linux.intel.com \
--cc=irogers@google.com \
--cc=james.clark@linaro.org \
--cc=jolsa@kernel.org \
--cc=linux-perf-users@vger.kernel.org \
--cc=mark.rutland@arm.com \
--cc=mingo@redhat.com \
--cc=nichen@iscas.ac.cn \
--cc=peterz@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.