public inbox for linux-perf-users@vger.kernel.org
 help / color / mirror / Atom feed
From: Arnaldo Carvalho de Melo <acme@kernel.org>
To: James Clark <james.clark@linaro.org>
Cc: Ian Rogers <irogers@google.com>,
	Peter Zijlstra <peterz@infradead.org>,
	Ingo Molnar <mingo@redhat.com>,
	Namhyung Kim <namhyung@kernel.org>,
	Mark Rutland <mark.rutland@arm.com>,
	Alexander Shishkin <alexander.shishkin@linux.intel.com>,
	Jiri Olsa <jolsa@kernel.org>,
	Adrian Hunter <adrian.hunter@intel.com>,
	Kan Liang <kan.liang@linux.intel.com>,
	linux-perf-users@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH v1] perf inject: Fix use without initialization of local variables
Date: Mon, 13 Jan 2025 12:48:37 -0300	[thread overview]
Message-ID: <Z4U11bKn3zJjLQij@x1> (raw)
In-Reply-To: <6f441be9-7731-45dd-a131-39cc2e34dc1a@linaro.org>

On Wed, Dec 11, 2024 at 09:58:00AM +0000, James Clark wrote:
> On 11/12/2024 6:08 am, Ian Rogers wrote:
> > Local variables were missing initialization and command line
> > processing didn't provide default values.
> > 
> > Fixes: 64eed019f3fc ("perf inject: Lazy build-id mmap2 event insertion")
> > Signed-off-by: Ian Rogers <irogers@google.com>
> > ---
> >   tools/perf/builtin-inject.c | 8 ++++----
> >   1 file changed, 4 insertions(+), 4 deletions(-)
> > 
> > diff --git a/tools/perf/builtin-inject.c b/tools/perf/builtin-inject.c
> > index d6989195a061..11e49cafa3af 100644
> > --- a/tools/perf/builtin-inject.c
> > +++ b/tools/perf/builtin-inject.c
> > @@ -2367,10 +2367,10 @@ int cmd_inject(int argc, const char **argv)
> >   	};
> >   	int ret;
> >   	const char *known_build_ids = NULL;
> > -	bool build_ids;
> > -	bool build_id_all;
> > -	bool mmap2_build_ids;
> > -	bool mmap2_build_id_all;
> > +	bool build_ids = false;
> > +	bool build_id_all = false;
> > +	bool mmap2_build_ids = false;
> > +	bool mmap2_build_id_all = false;
> >   	struct option options[] = {
> >   		OPT_BOOLEAN('b', "build-ids", &build_ids,
> 
> Reviewed-by: James Clark <james.clark@linaro.org>

Thanks, applied to perf-tools-next,

- Arnaldo

      reply	other threads:[~2025-01-13 15:48 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-12-11  6:08 [PATCH v1] perf inject: Fix use without initialization of local variables Ian Rogers
2024-12-11  9:58 ` James Clark
2025-01-13 15:48   ` Arnaldo Carvalho de Melo [this message]

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=Z4U11bKn3zJjLQij@x1 \
    --to=acme@kernel.org \
    --cc=adrian.hunter@intel.com \
    --cc=alexander.shishkin@linux.intel.com \
    --cc=irogers@google.com \
    --cc=james.clark@linaro.org \
    --cc=jolsa@kernel.org \
    --cc=kan.liang@linux.intel.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-perf-users@vger.kernel.org \
    --cc=mark.rutland@arm.com \
    --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