Received: by 2002:a05:7412:d8a:b0:e2:908c:2ebd with SMTP id b10csp960707rdg; Fri, 13 Oct 2023 06:29:36 -0700 (PDT) X-Google-Smtp-Source: AGHT+IGMXJ0nSrZwJvU4whCceX/Dg+wQxK0HEpQsGElbXI6HlD40HP0DmVxqfyr+xgWo9uCDm1rv X-Received: by 2002:a17:902:b48b:b0:1c4:4462:f1bd with SMTP id y11-20020a170902b48b00b001c44462f1bdmr21039262plr.35.1697203775823; Fri, 13 Oct 2023 06:29:35 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1697203775; cv=none; d=google.com; s=arc-20160816; b=lfbrcwerliqjBUc631pnKBrSG0HLsAxXaLN5gz7ZNaR4G8HVeSnyigSX7gdV+Uibhw ncAe09zWYB8Z+PlgULaXrB95mkXjs7OUeDtYdwGO6MtDcHJN8wMTw9j6Z7HUPUAmdHVI CzTaJHjH4Ehum3V5EUsApjehPEMQGGVH5jiWAvDz+DzB17T5aHi7jnqbKoH9HVS5qJhI go9VRqf9CWPyoXbO3TUKiMAOMM6VG8k8PHrZDBy3ql4spfUbfGHX0QQJjsqc3aH7q/iJ 9z3Z6vPCgC8cI52M1Yi5Q9PI+0vuTH9qSP4WYdD7+rpC+Mblz+e1jt1yAJliw9JPrAjl w//g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from; bh=VMnkpKtJ99Gd3VtNtVwiciXcLP0p0fWA8jtYGnR5KJc=; fh=N9TWaqiXf5i8uhOuuEqZBjeJd5JcS9LI3m0Z5xOm7mo=; b=MkAsm/ebS7gEXNTQ3vxzpkppFms+t9/+JotNHKDwo2xGao1jtwey+DU1oWSJ5Jj5Hw 9Yak421pA4sXoMPdXmURrf1TjBFY8z0hEsCwhWXLO5yUa2ZHJdf8VXzsgnhCu0oBe6G+ boXfO0u/Rkrl66Fw+rPt1l8CooGaQRfsaW0t1SD7zXxhphZk/fORx/VkjbUY5BDNSQES m+8McNEUUOq4ttN8MGGnE0tlLc56lpMuvidltPrk8LjfFjgGqwcSE0ZUf+GzeaUY1MB1 8pBjKiZBKbzCG+sBKHtVbh0tlMfHBlsnpbk5UN9pNPCBIxaUd95xbJ3j3lmMKgUbeiJb WQCQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.32 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=link.tyut.edu.cn Return-Path: Received: from agentk.vger.email (agentk.vger.email. [23.128.96.32]) by mx.google.com with ESMTPS id b17-20020a170903229100b001b556b0d0b7si4958826plh.480.2023.10.13.06.29.35 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 13 Oct 2023 06:29:35 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.32 as permitted sender) client-ip=23.128.96.32; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.32 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=link.tyut.edu.cn Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by agentk.vger.email (Postfix) with ESMTP id B333D8024073; Fri, 13 Oct 2023 06:29:33 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at agentk.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231911AbjJMN3Z (ORCPT + 99 others); Fri, 13 Oct 2023 09:29:25 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39912 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231823AbjJMN3Y (ORCPT ); Fri, 13 Oct 2023 09:29:24 -0400 Received: from mail-m49198.qiye.163.com (mail-m49198.qiye.163.com [45.254.49.198]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 830CA95 for ; Fri, 13 Oct 2023 06:29:20 -0700 (PDT) Received: from localhost.localdomain (unknown [120.208.100.128]) by mail-m121145.qiye.163.com (Hmail) with ESMTPA id B8A4380003D; Fri, 13 Oct 2023 21:28:46 +0800 (CST) From: Hu Haowen <2023002089@link.tyut.edu.cn> To: gregkh@linuxfoundation.org Cc: Hu Haowen <2023002089@link.tyut.edu.cn>, masahiroy@kernel.org, akpm@linux-foundation.org, ndesaulniers@google.com, n.schier@avm.de, ojeda@kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH] scripts/show_delta: add __main__ judgement before main code Date: Fri, 13 Oct 2023 21:28:32 +0800 Message-Id: <20231013132832.165768-1-2023002089@link.tyut.edu.cn> X-Mailer: git-send-email 2.34.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-HM-Spam-Status: e1kfGhgUHx5ZQUpXWQgPGg8OCBgUHx5ZQUlOS1dZFg8aDwILHllBWSg2Ly tZV1koWUFITzdXWS1ZQUlXWQ8JGhUIEh9ZQVkZSEJIVhpLQ09CQx9NGklOHVUTARMWGhIXJBQOD1 lXWRgSC1lBWUpJS1VJS0NVSktLVUpJQ1lXWRYaDxIVHRRZQVlPS0hVSkpLSEpDVUpLS1VLWQY+ X-HM-Tid: 0a8b2939aaebb03akuuub8a4380003d X-HM-MType: 10 X-HM-Sender-Digest: e1kMHhlZQR0aFwgeV1kSHx4VD1lBWUc6P006Nzo6Izw2HAhJTygaGSsd GAMKC0hVSlVKTUJMSUtITElMTEpOVTMWGhIXVUlLSUhLS0lLQ0I7FxIVEFUPAg4PVR4fDlUYFUVZ V1kSC1lBWUpJS1VJS0NVSktLVUpJQ1lXWQgBWUFKTElCNwY+ X-Spam-Status: No, score=-0.8 required=5.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on agentk.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (agentk.vger.email [0.0.0.0]); Fri, 13 Oct 2023 06:29:33 -0700 (PDT) When doing Python programming it is a nice convention to insert the if statement `if __name__ == "__main__":` before any main code that does actual functionalities to ensure the code will be executed only as a script rather than as an imported module. Hence attach the missing judgement to show_delta. Signed-off-by: Hu Haowen <2023002089@link.tyut.edu.cn> --- scripts/show_delta | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/scripts/show_delta b/scripts/show_delta index 28e67e178194..291ad65e3089 100755 --- a/scripts/show_delta +++ b/scripts/show_delta @@ -125,4 +125,5 @@ def main(): for line in lines: print (convert_line(line, base_time),) -main() +if __name__ == "__main__": + main() -- 2.34.1