All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jiri Olsa <jolsa@redhat.com>
To: Taeung Song <treeze.taeung@gmail.com>
Cc: Arnaldo Carvalho de Melo <acme@kernel.org>,
	linux-kernel@vger.kernel.org, namhyung@kernel.org
Subject: Re: [PATCH 3/4] perf tools: Add a option 'all' to perf-config.
Date: Mon, 4 May 2015 21:16:36 +0200	[thread overview]
Message-ID: <20150504191636.GC11223@krava> (raw)
In-Reply-To: <1430116466-14427-3-git-send-email-treeze.taeung@gmail.com>

On Mon, Apr 27, 2015 at 03:34:25PM +0900, Taeung Song wrote:

SNIP

> +
> +static int show_all_config(void)
> +{
> +	int ret = 0;
> +	struct config_section *section_node;
> +	struct config_element *element_node;
> +	char *pwd, *all_config;
> +
> +	pwd = getenv("PWD");
> +	all_config = strdup(mkpath("%s/util/PERFCONFIG-DEFAULT", pwd));
> +
> +	if (!all_config) {
> +		pr_err("%s: strdup failed\n", __func__);
> +		return -1;
> +	}
> +
> +	sections = zalloc(sizeof(*sections));
> +	if (!sections)
> +		return -1;
> +	INIT_LIST_HEAD(sections);

this code pattern is already there, please placeit into function

also, where's the section freed?

jirka

  parent reply	other threads:[~2015-05-04 19:16 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-04-27  6:34 [PATCH 1/4] perf tools: Add 'perf-config' command Taeung Song
2015-04-27  6:34 ` [PATCH 2/4] perf tools: Add functions which can get or set perf config variables Taeung Song
2015-05-04  8:41   ` Jiri Olsa
2015-05-04 19:16   ` Jiri Olsa
2015-05-11  2:15     ` taeung
2015-04-27  6:34 ` [PATCH 3/4] perf tools: Add a option 'all' to perf-config Taeung Song
2015-05-04  8:56   ` Jiri Olsa
2015-05-04 19:16   ` Jiri Olsa
2015-05-04 19:16   ` Jiri Olsa [this message]
2015-05-04 19:16   ` Jiri Olsa
2015-04-27  6:34 ` [PATCH 4/4] perf tools: Add a option 'remove' " Taeung Song
2015-04-27 22:17 ` [PATCH 1/4] perf tools: Add 'perf-config' command Arnaldo Carvalho de Melo

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=20150504191636.GC11223@krava \
    --to=jolsa@redhat.com \
    --cc=acme@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=namhyung@kernel.org \
    --cc=treeze.taeung@gmail.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.