public inbox for linux-perf-users@vger.kernel.org
 help / color / mirror / Atom feed
From: Arnaldo Carvalho de Melo <acme@kernel.org>
To: Namhyung Kim <namhyung@kernel.org>
Cc: Ian Rogers <irogers@google.com>, Chen Ni <nichen@iscas.ac.cn>,
	linux-perf-users@vger.kernel.org, peterz@infradead.org,
	mingo@redhat.com, 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 15:57:45 -0300	[thread overview]
Message-ID: <abr1qQ2ZjQN8Nh4U@x1> (raw)
In-Reply-To: <abrwRmaS7CDhzAyl@google.com>

On Wed, Mar 18, 2026 at 11:34:46AM -0700, Namhyung Kim wrote:
> 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.

And then there are cases where there are ordering dependencies, which I
can't recall one to give as an example right now but I come accross in
the past.

So perhaps this should be made as a recommendation and when we have the
opportunity we change?

Just going thru lots of churn to have it look polished seems overkill
:-\

- Arnaldo
 
> Thanks,
> Namhyung

  reply	other threads:[~2026-03-18 18:57 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
2026-03-18 18:57     ` Arnaldo Carvalho de Melo [this message]
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=abr1qQ2ZjQN8Nh4U@x1 \
    --to=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=namhyung@kernel.org \
    --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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox