From: Jonathan Corbet <corbet@lwn.net>
To: Rong Tao <rtoax@foxmail.com>
Cc: rongtao@cestc.cn,
"open list:DOCUMENTATION" <linux-doc@vger.kernel.org>,
open list <linux-kernel@vger.kernel.org>,
Andi Kleen <ak@linux.intel.com>
Subject: Re: [PATCH] docs: trace: Convert decode_msr.py print syntax to python3
Date: Wed, 21 Jun 2023 09:14:34 -0600 [thread overview]
Message-ID: <877crwrgo5.fsf@meer.lwn.net> (raw)
In-Reply-To: <tencent_6142CF595B97172A46AF02A34D885D060108@qq.com>
[Adding Andi]
Rong Tao <rtoax@foxmail.com> writes:
> From: Rong Tao <rongtao@cestc.cn>
>
> Convert the decode_msr.py file to python3 to solve the following running
> errors:
>
> File "Documentation/trace/postprocess/decode_msr.py", line 35
> print j,
> ^
> SyntaxError: Missing parentheses in call to 'print'. Did you mean
> print(j, end=" ")?
>
> Signed-off-by: Rong Tao <rongtao@cestc.cn>
> ---
> Documentation/trace/postprocess/decode_msr.py | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/Documentation/trace/postprocess/decode_msr.py b/Documentation/trace/postprocess/decode_msr.py
> index aa9cc7abd5c2..2d45d6c14987 100644
> --- a/Documentation/trace/postprocess/decode_msr.py
> +++ b/Documentation/trace/postprocess/decode_msr.py
> @@ -32,6 +32,6 @@ for j in sys.stdin:
> break
> if r:
> j = j.replace(" " + m.group(2), " " + r + "(" + m.group(2) + ")")
> - print j,
> + print(j + ",")
So I certainly have no problem applying this. But it occurs to me that
this file hasn't been touched since it was added in 2015, and nobody has
complained that it doesn't work with modern Python. That leads me to
wonder if it's being used at all.
Assuming that there is value in keeping it, I wonder if a move to
samples/ might make sense?
Thanks,
jon
next prev parent reply other threads:[~2023-06-21 15:18 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-06-21 7:44 [PATCH] docs: trace: Convert decode_msr.py print syntax to python3 Rong Tao
2023-06-21 15:14 ` Jonathan Corbet [this message]
2023-06-25 1:03 ` Rong Tao
2023-06-25 14:57 ` Andi Kleen
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=877crwrgo5.fsf@meer.lwn.net \
--to=corbet@lwn.net \
--cc=ak@linux.intel.com \
--cc=linux-doc@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=rongtao@cestc.cn \
--cc=rtoax@foxmail.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 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).