linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Arnaldo Carvalho de Melo <acme@kernel.org>
To: Masami Hiramatsu <mhiramat@kernel.org>
Cc: linux-kernel@vger.kernel.org, Namhyung Kim <namhyung@kernel.org>,
	Peter Zijlstra <peterz@infradead.org>,
	Ingo Molnar <mingo@redhat.com>,
	Hemant Kumar <hemant@linux.vnet.ibm.com>,
	Ananth N Mavinakayanahalli <ananth@linux.vnet.ibm.com>,
	Brendan Gregg <brendan.d.gregg@gmail.com>
Subject: Re: [PATCH perf/core v7 01/21] tools/perf: Fix lsdir to set errno correctly
Date: Wed, 11 May 2016 10:59:39 -0300	[thread overview]
Message-ID: <20160511135939.GC3619@kernel.org> (raw)
In-Reply-To: <20160511135127.23943.40644.stgit@devbox>

Em Wed, May 11, 2016 at 10:51:27PM +0900, Masami Hiramatsu escreveu:
> Fix lsdir() to set correct positive error number (ENOMEM).
> Since "errno" must have a positive error number instead of
> negative number, fix lsdir to set it correctly.

Masami, please try to:

1) Follow existing convention when writing the patch Subject line, when
in doubt: git log tools/perf/util/util.c and check, in this case I
changed it to "perf tools: Fix lsdir to set errno correctly"

2) Add a Fixed line, for this case I used 'git blame' and added:

Fixes: e1ce726e1db2 ("perf tools: Add lsdir() helper to read a directory")

This helps reviewing (now and down the line), because one can go more
quickly check what was the intention in the original patch, to see if it
is really a fix.

In some cases this looks trivial, like in this patch, sometimes its
not...

Thanks,

- Arnaldo
 
> Signed-off-by: Masami Hiramatsu <mhiramat@kernel.org>
> ---
>  tools/perf/util/util.c |    2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/tools/perf/util/util.c b/tools/perf/util/util.c
> index 01c9433..eab077a 100644
> --- a/tools/perf/util/util.c
> +++ b/tools/perf/util/util.c
> @@ -139,7 +139,7 @@ struct strlist *lsdir(const char *name,
>  
>  	list = strlist__new(NULL, NULL);
>  	if (!list) {
> -		errno = -ENOMEM;
> +		errno = ENOMEM;
>  		goto out;
>  	}
>  

  reply	other threads:[~2016-05-11 13:59 UTC|newest]

Thread overview: 37+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-05-11 13:51 [PATCH perf/core v7 00/21] perf-probe --cache and SDT support Masami Hiramatsu
2016-05-11 13:51 ` [PATCH perf/core v7 01/21] tools/perf: Fix lsdir to set errno correctly Masami Hiramatsu
2016-05-11 13:59   ` Arnaldo Carvalho de Melo [this message]
2016-05-12  1:46     ` Masami Hiramatsu
2016-05-12 10:25   ` [tip:perf/core] perf tools: " tip-bot for Masami Hiramatsu
2016-05-11 13:51 ` [PATCH perf/core v7 02/21] perf buildid: Fix to set correct dso name for kallsyms Masami Hiramatsu
2016-05-11 15:45   ` Arnaldo Carvalho de Melo
2016-05-12  2:02     ` Masami Hiramatsu
2016-05-12  8:57       ` Masami Hiramatsu
2016-05-11 13:51 ` [PATCH perf/core v7 03/21] perf buildid: Introduce DSO__NAME_KALLSYMS and DSO__NAME_KCORE Masami Hiramatsu
2016-05-11 15:47   ` Arnaldo Carvalho de Melo
2016-05-11 13:51 ` [PATCH perf/core v7 04/21] perf: Use SBUILD_ID_SIZE macro instead of BUILD_ID_SIZE macro Masami Hiramatsu
2016-05-11 15:47   ` Arnaldo Carvalho de Melo
2016-05-12 10:25   ` [tip:perf/core] perf tools: Use SBUILD_ID_SIZE where applicable tip-bot for Masami Hiramatsu
2016-05-11 13:52 ` [PATCH perf/core v7 05/21] perf symbol: Use lsdir for search in kcore cache directory Masami Hiramatsu
2016-05-11 15:49   ` Arnaldo Carvalho de Melo
2016-05-12 10:26   ` [tip:perf/core] perf symbols: Use lsdir() for the " tip-bot for Masami Hiramatsu
2016-05-11 13:52 ` [PATCH perf/core v7 06/21] perf-buildid-cache: Use lsdir for looking up buildid caches Masami Hiramatsu
2016-05-11 15:50   ` Arnaldo Carvalho de Melo
2016-05-12 10:26   ` [tip:perf/core] perf buildid-cache: Use lsdir() " tip-bot for Masami Hiramatsu
2016-05-11 13:52 ` [PATCH perf/core v7 07/21] perf symbol: Cleanup the code flow of dso__find_kallsyms Masami Hiramatsu
2016-05-11 15:55   ` Arnaldo Carvalho de Melo
2016-05-12  1:46     ` Masami Hiramatsu
2016-05-11 13:52 ` [PATCH perf/core v7 08/21] perf-buildid-cache: Use path/to/bin/buildid/elf instead of path/to/bin/buildid Masami Hiramatsu
2016-05-11 13:52 ` [PATCH perf/core v7 09/21] perf probe: Add --cache option to cache the probe definitions Masami Hiramatsu
2016-05-11 13:52 ` [PATCH perf/core v7 10/21] perf probe: Use cache entry if possible Masami Hiramatsu
2016-05-11 13:53 ` [PATCH perf/core v7 11/21] perf probe: Show all cached probes Masami Hiramatsu
2016-05-11 13:53 ` [PATCH perf/core v7 12/21] perf probe: Remove caches when --cache is given Masami Hiramatsu
2016-05-11 13:53 ` [PATCH perf/core v7 13/21] perf/sdt: ELF support for SDT Masami Hiramatsu
2016-05-11 13:53 ` [PATCH perf/core v7 14/21] perf probe: Add group name support Masami Hiramatsu
2016-05-11 13:54 ` [PATCH perf/core v7 15/21] perf buildid-cache: Scan and import user SDT events to probe cache Masami Hiramatsu
2016-05-11 13:54 ` [PATCH perf/core v7 16/21] perf probe: Accept %sdt and %cached event name Masami Hiramatsu
2016-05-11 13:54 ` [PATCH perf/core v7 17/21] perf-list: Show SDT and pre-cached events Masami Hiramatsu
2016-05-11 13:54 ` [PATCH perf/core v7 18/21] perf-list: Skip SDTs placed in invalid binaries Masami Hiramatsu
2016-05-11 13:54 ` [PATCH perf/core v7 19/21] perf probe: Allow wildcard for cached events Masami Hiramatsu
2016-05-11 13:54 ` [PATCH perf/core v7 20/21] perf probe: Support @BUILDID or @FILE suffix for SDT events Masami Hiramatsu
2016-05-11 13:55 ` [PATCH perf/core v7 21/21] perf probe: Support a special SDT probe format Masami Hiramatsu

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=20160511135939.GC3619@kernel.org \
    --to=acme@kernel.org \
    --cc=ananth@linux.vnet.ibm.com \
    --cc=brendan.d.gregg@gmail.com \
    --cc=hemant@linux.vnet.ibm.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mhiramat@kernel.org \
    --cc=mingo@redhat.com \
    --cc=namhyung@kernel.org \
    --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;
as well as URLs for NNTP newsgroup(s).