From: Arnaldo Carvalho de Melo <acme@kernel.org>
To: liujing <liujing@cmss.chinamobile.com>
Cc: Peter Zijlstra <peterz@infradead.org>,
Ingo Molnar <mingo@redhat.com>,
Namhyung Kim <namhyung@kernel.org>,
Ian Rogers <irogers@google.com>,
linux-perf-users@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] perf python: Fix redundant self-assignment in get_argument_count()
Date: Tue, 8 Sep 2026 17:57:20 -0300 [thread overview]
Message-ID: <aqB2sBQqZj_K5rQ4@x2> (raw)
In-Reply-To: <20260903081350.4676-1-liujing@cmss.chinamobile.com>
On Thu, Sep 03, 2026 at 04:13:50PM +0800, liujing wrote:
> From: Liu Jing <liujing@cmss.chinamobile.com>
>
> In get_argument_count(), the variable code_obj is assigned to itself
> before being assigned the result of PyObject_GetAttrString(). This is
> a redundant self-assignment that appears to be a typo.
>
> Fix it by removing the redundant self-assignment.
Thanks, applied to perf-tools-next, for v7.4.
- Arnaldo
> Signed-off-by: Liu Jing <liujing@cmss.chinamobile.com>
> ---
> --- a/tools/perf/util/scripting-engines/trace-event-python.c
> +++ b/tools/perf/util/scripting-engines/trace-event-python.c
> @@ -165,7 +165,7 @@
> {
> int arg_count = 0;
>
> - PyObject *code_obj = code_obj = PyObject_GetAttrString(handler, "__code__");
> + PyObject *code_obj = PyObject_GetAttrString(handler, "__code__");
> PyErr_Clear();
> if (code_obj) {
> PyObject *arg_count_obj = PyObject_GetAttrString(code_obj,
>
>
>
prev parent reply other threads:[~2026-09-08 20:57 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-09-03 8:13 liujing
2026-09-08 20:57 ` 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=aqB2sBQqZj_K5rQ4@x2 \
--to=acme@kernel.org \
--cc=irogers@google.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-perf-users@vger.kernel.org \
--cc=liujing@cmss.chinamobile.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
all inboxes | Powered by JetHome®