[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <87vbrw79un.fsf@sejong.aot.lge.com>
Date: Fri, 20 Jun 2014 08:33:52 +0900
From: Namhyung Kim <namhyung@...nel.org>
To: Jiri Olsa <jolsa@...hat.com>
Cc: Arnaldo Carvalho de Melo <acme@...nel.org>,
Jiri Olsa <jolsa@...nel.org>, linux-kernel@...r.kernel.org,
Corey Ashford <cjashfor@...ux.vnet.ibm.com>,
David Ahern <dsahern@...il.com>,
Frederic Weisbecker <fweisbec@...il.com>,
Ingo Molnar <mingo@...nel.org>,
Paul Mackerras <paulus@...ba.org>,
Peter Zijlstra <a.p.zijlstra@...llo.nl>
Subject: Re: [PATCH 1/5] perf tools: Factor ui_browser ops out of ui_browser struct
Hi Jiri,
On Thu, 19 Jun 2014 18:49:21 +0200, Jiri Olsa wrote:
> On Thu, Jun 19, 2014 at 12:38:51PM -0300, Arnaldo Carvalho de Melo wrote:
>> Em Thu, Jun 19, 2014 at 01:41:12PM +0200, Jiri Olsa escreveu:
>> > Separating ops out of 'struct ui_browser' into
>> > 'struct ui_browser_ops'.
>>
>> You stated what you did, and that helps in understanding what this patch
>> is about, now we only need to have a paragraph on _why_ this is needed
>> :-)
>
> well.. it's not ;-) but we always separated ops from the
> structs IIRC
>
> I introduced another callback in the early stage of this change,
> but replaced it later.. this remained ;-)
>
> no need to take it.. as I wrote in patch 0:
>
> Patches 1 and 2 are not necessary for the functionality,
> they are just byproducts of another early way I tried,
> but I think they could go in.
Hmm.. I think it should make the ops const, otherwise it makes only a
little sense.
[SNIP]
>> > +static bool ui_browser__filter(struct ui_browser *browser, void *entry)
>> > +{
>> > + return browser->ops.filter ? browser->ops.filter(browser, entry) :
>> > + false;
>> > +}
>> > +
>> > static struct list_head *
>> > ui_browser__list_head_filter_entries(struct ui_browser *browser,
>> > struct list_head *pos)
>> > {
>> > do {
>> > - if (!browser->filter || !browser->filter(browser, pos))
>> > + if (!ui_browser__filter(browser, pos))
Looks like this can be a separate cleanup.
Thanks,
Namhyung
>> > return pos;
>> > pos = pos->next;
>> > } while (pos != browser->entries);
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists