Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp9533462rwd; Wed, 21 Jun 2023 08:33:52 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ4vRumXJjTdzo2xgNur658MBS5G5GSDQOf9NiDEr1FtEMOVv4oG3m+QdCb9Q2AqRLZ0fBaY X-Received: by 2002:a05:6830:1304:b0:6b5:df3a:eb73 with SMTP id p4-20020a056830130400b006b5df3aeb73mr459940otq.29.1687361632439; Wed, 21 Jun 2023 08:33:52 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1687361632; cv=none; d=google.com; s=arc-20160816; b=zY33Iw99Fnl5uhiyqniLtOLmkAGMA1bh/uuRIRVzfgQowpr+IWLvVQF6dylDAwL7Tv Hj/nOAq85UqiXg7LpiUAyMQlXoHt8idOTAq2hiZEsDxDTAWHQcieuPzbl9wh/np0f37K C28+gH+vI9lvAwrbbtBDZ0KgYofaoNms2hO5zEPZj/U6OwSL40Ugx9oYKXEx25zGq+/0 RShvK6N203fFtVugS5jmsXEQn4lT1VWu3eVmSnr4b0+UT3LA4L/MH/J7g1mUDEHMT5GM kC//DdRvnWj0NbF2EVUbwNBtTfp4803r14pKHZa8kn/bPf7N0SyjybIJIZsK+CC049N4 I/vg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:message-id:date:references :in-reply-to:subject:cc:to:from:dkim-signature:dkim-filter; bh=PFxuX8mago3vl0Qcs3OhzDNVkxupOWWwKCpDkAT9oYo=; b=BEBXK5FPpZHJVjR+K1pYmDb0+BrRYqeLyPGSIZH+qCVgufa1Ces6o0+MRYNWqePQWt g9kPfebWZLIlyZ6UMctnyggfVkmJBi9/7PzQDdURNT/YKMxpGTob9h/l5yv3UJXIrygx JcbQPw0bW5y32vj8UBUirVcSasPI07aYdv4hkOnIhKykVVYAus2jf8yYU+c7//SgvgHR 8iUHjtqGUMK9KlN+3YzzEKsOsXRM4VeYVF7mt0o2eX1PzmMrpoxb6Gq7YmEVMhBCiSRg Plbvj5yGshRgAtqybuv3jYnHWXQWcgf/YM+1+iE9aqcUamW3H2W2p3y2H+iVOckk/w9N +04g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@lwn.net header.s=20201203 header.b=krXsQ9du; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id h190-20020a6383c7000000b0053490e8df50si4614008pge.223.2023.06.21.08.33.32; Wed, 21 Jun 2023 08:33:52 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@lwn.net header.s=20201203 header.b=krXsQ9du; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233300AbjFUPSf (ORCPT + 99 others); Wed, 21 Jun 2023 11:18:35 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:54698 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231262AbjFUPSR (ORCPT ); Wed, 21 Jun 2023 11:18:17 -0400 Received: from ms.lwn.net (ms.lwn.net [IPv6:2600:3c01:e000:3a1::42]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C62782D74; Wed, 21 Jun 2023 08:14:35 -0700 (PDT) Received: from localhost (unknown [IPv6:2601:281:8300:73::5f6]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ms.lwn.net (Postfix) with ESMTPSA id 4C0C72AE; Wed, 21 Jun 2023 15:14:35 +0000 (UTC) DKIM-Filter: OpenDKIM Filter v2.11.0 ms.lwn.net 4C0C72AE DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=lwn.net; s=20201203; t=1687360475; bh=PFxuX8mago3vl0Qcs3OhzDNVkxupOWWwKCpDkAT9oYo=; h=From:To:Cc:Subject:In-Reply-To:References:Date:From; b=krXsQ9dug4yuevYapGka33Nal5zBrnrDkqPNvU96V638wP5Ike8YE4fgjp2HxulQs jtor4PV1fPxkx4qQe5IBYZ72MmrzZiPSqHhGgOFousdOjshqrehri5h/amiU+V/Hvd i3R+1vnmQLtvFjyX4BadDuuH/raElYCIG6KgNZfTrsOwItr4Y1DcVq8bOsb8Ms9eNc +JAb8f5pC49IhxCEMLwNaKAdF7mPDWjWYlotYq21WvP/9qKAKVsBhOJeNqhsWloTUE StRM8X5Wzo+nr4SjueMe62VOkQvadWfwEi7DlhNY/wU5QX09wdLvfqOOwbX4/Vz/d8 P7NkfRb2/60kg== From: Jonathan Corbet To: Rong Tao Cc: rongtao@cestc.cn, "open list:DOCUMENTATION" , open list , Andi Kleen Subject: Re: [PATCH] docs: trace: Convert decode_msr.py print syntax to python3 In-Reply-To: References: Date: Wed, 21 Jun 2023 09:14:34 -0600 Message-ID: <877crwrgo5.fsf@meer.lwn.net> MIME-Version: 1.0 Content-Type: text/plain X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_NONE,SPF_PASS, T_SCC_BODY_TEXT_LINE,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org [Adding Andi] Rong Tao writes: > From: Rong Tao > > 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 > --- > 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