All of lore.kernel.org
 help / color / mirror / Atom feed
From: Arnaldo Carvalho de Melo <acme@kernel.org>
To: Taeung Song <treeze.taeung@gmail.com>
Cc: Arnaldo Carvalho de Melo <arnaldo.melo@gmail.com>,
	linux-kernel@vger.kernel.org, Jiri Olsa <jolsa@kernel.org>,
	Namhyung Kim <namhyung@kernel.org>,
	Ingo Molnar <mingo@kernel.org>,
	Peter Zijlstra <peterz@infradead.org>,
	Alexander Shishkin <alexander.shishkin@linux.intel.com>,
	Masami Hiramatsu <mhiramat@kernel.org>,
	Wang Nan <wangnan0@huawei.com>, Jiri Olsa <jolsa@redhat.com>,
	Ingo Molnar <mingo@redhat.com>
Subject: Re: [PATCH v11 2/3] perf config: Reimplement perf_config() introducing new perf_config__init() and perf_config__finish()
Date: Thu, 23 Jun 2016 11:30:28 -0300	[thread overview]
Message-ID: <20160623143028.GQ4213@kernel.org> (raw)
In-Reply-To: <576BEF15.9020405@gmail.com>

Em Thu, Jun 23, 2016 at 11:15:49PM +0900, Taeung Song escreveu:
> 
> 
> On 06/23/2016 10:38 PM, Arnaldo Carvalho de Melo wrote:
> > Em Thu, Jun 23, 2016 at 10:03:39PM +0900, Taeung Song escreveu:
> > > +/**
> > > + * perf_config_sections__for_each - iterate thru all the sections
> > > + * @list: list_head instance to iterate
> > > + * @section: struct perf_config_section iterator
> > > + */
> > > +#define perf_config_sections__for_each(list, section)	\
> > > +        list_for_each_entry(section, list, node)
> > > +
> > 
> > I was almost applying this but then there is a little detail, which is
> > that it is a goal to make the tools/ code look as much as kernel code as
> > possible, to encourage kernel developers to contribute to the tools
> > codebase and also to expose userspace developers to kernel practices.
> > 
> > With that said, please rename these for_each macros to for_each_entry,
> > i.e.:
> > 
> > perf_config_sections__for_each_entry()
> > perf_config_items__for_each_entry()
> > 
> > As for_each and for_each_entry both exist in the kernel and have well
> > know semantics that we want to keep.
> > 
> > Probably there are cases in tools/ where we break this rule, I'll check
> > and fix.
> > 
> 
> Granted ! :)
> 
> I sent v12 with above changes a moment ago.

Thanks, I've just converted evlist__for_each* and strlist__for_each to
this format.

- Arnaldo

  reply	other threads:[~2016-06-23 14:30 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-06-23 13:03 [PATCH v11 0/3] perf config: Reimplement perf_config() Taeung Song
2016-06-23 13:03 ` [PATCH v11 1/3] perf config: Bring declarations about config from util/cache.h to util/config.h Taeung Song
2016-06-23 13:03 ` [PATCH v11 2/3] perf config: Reimplement perf_config() introducing new perf_config__init() and perf_config__finish() Taeung Song
2016-06-23 13:38   ` Arnaldo Carvalho de Melo
2016-06-23 14:15     ` Taeung Song
2016-06-23 14:30       ` Arnaldo Carvalho de Melo [this message]
2016-06-23 14:33         ` Taeung Song
2016-06-23 13:03 ` [PATCH v11 3/3] perf config: Reimplement show_config() using config_set__for_each Taeung Song

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=20160623143028.GQ4213@kernel.org \
    --to=acme@kernel.org \
    --cc=alexander.shishkin@linux.intel.com \
    --cc=arnaldo.melo@gmail.com \
    --cc=jolsa@kernel.org \
    --cc=jolsa@redhat.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mhiramat@kernel.org \
    --cc=mingo@kernel.org \
    --cc=mingo@redhat.com \
    --cc=namhyung@kernel.org \
    --cc=peterz@infradead.org \
    --cc=treeze.taeung@gmail.com \
    --cc=wangnan0@huawei.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 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.