Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1409352
| From | Arnaldo Carvalho de Melo <acme@kernel.org> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | Re: [PATCH v3 4/7] perf config: Reimplement perf_config() using perf_config_set__iter() |
| Date | 2016-05-30 21:40 +0200 |
| Message-ID | <rEBcB-8Y-5@gated-at.bofh.it> (permalink) |
| References | <rEyy5-6IE-7@gated-at.bofh.it> <rEyy6-6IE-23@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
Em Tue, May 31, 2016 at 01:44:08AM +0900, Taeung Song escreveu:
> +static int perf_config_set__iter(struct perf_config_set *set, config_fn_t fn, void *data)
> +{
> + struct perf_config_section *section;
> + struct perf_config_item *item;
> + struct list_head *sections;
> + char key[BUFSIZ];
> +
> + if (set == NULL)
> + return -1;
<SNIP>
> + return 0;
> +}
> +int perf_config(config_fn_t fn, void *data)
> +{
> + if (perf_config_set__check() < 0)
> + return -1;
> + return perf_config_set__iter(config_set, fn, data);
> +}
"check" looks too vague, this is equivalent, no?
int perf_config(config_fn_t, void *data)
{
if (config_set == NULL)
config_set = perf_config_set__new();
return perf_config_set__iter(config_set, fn, data);
}
- Arnaldo
Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
[PATCH v3 4/7] perf config: Reimplement perf_config() using perf_config_set__iter() Taeung Song <treeze.taeung@gmail.com> - 2016-05-30 18:50 +0200
Re: [PATCH v3 4/7] perf config: Reimplement perf_config() using perf_config_set__iter() Arnaldo Carvalho de Melo <acme@kernel.org> - 2016-05-30 21:40 +0200
Re: [PATCH v3 4/7] perf config: Reimplement perf_config() using perf_config_set__iter() Taeung Song <treeze.taeung@gmail.com> - 2016-05-31 00:30 +0200
csiph-web