Received: by 2002:a25:6193:0:0:0:0:0 with SMTP id v141csp886503ybb; Fri, 20 Mar 2020 09:40:11 -0700 (PDT) X-Google-Smtp-Source: ADFU+vvrwMy5/4C2ftGGblD7K7GIbSGmVfPVvDoFQrHO7uKE615X8WQE9v3dY5+cFmBTstjFDSuk X-Received: by 2002:a54:478c:: with SMTP id o12mr6971953oic.106.1584722411283; Fri, 20 Mar 2020 09:40:11 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1584722411; cv=none; d=google.com; s=arc-20160816; b=Of9/kcS9Wl8Zn4WVWhFSYh3xxKaemrhDcdepxCHU1F87SZ/W0CNBtKhgry79eLDRmB gA8zxgo1KqodnEVP5GGeVF/aggQ5ffXJMyJ/ckJl9+yg5i/WzJliHae+aAwIrmR7iB1Q sWx1QPEW0QaVVoxRWRLR5zdgba2Y6rzV+w5lxqaVfzAHge/DnHJfgt6kJDE5kf3hEoEK gtnC4juQIWvBN08umAd40ZfcI0pUEkmeqYsXrQpRFLPCg7Iq/eSBqId/6b3tAjrYpLXU KKesQD0YvUnBsWmvjAmmYAegZkOw/MTScOhlUXMs7CA2AmVP0Kv/LMeTC9lnby8Xk0/l 0oXA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from:dkim-signature:dkim-signature; bh=KZ90kr0wTIc0EZ29kZv5jxqdukiofzhut3YQZokNDi8=; b=wtoQMNtKSMwLfMsaWd7Skgv8DlbtIeeTr3goX6n8UvERTp5LbM+KYrJsqMVs4H8n4l Pu+rWLN3Z/3Au6qfuXJvjG/nNVUvCd/8gCIdEDq+BZ6DOfYQSWpm2qXS4rR2OlxHYtb3 gIwasjDawTSveOGZnGjXX+3lDgulAIDJ7zpkDtaXsm3pqYk8/lSSkFbdACH+rTlmYoYs 47+kqykzBvdRiYNsuCyR9Wq7ALql36Fu1cURrOn8vSPbZ+dXsmHEyx8MauKajs5o4rVL +effjQZh6D/xf/Wk6ybaWsBONI4TvlQF2dqGWNeG6ASUjw/Yrrv5LpNKNxU5xK/5jrM/ HHlQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@bernat.ch header.s=fm2 header.b="MJ/zE2Tg"; dkim=pass header.i=@messagingengine.com header.s=fm2 header.b=Obczzfhi; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=bernat.ch Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id z107si2860201otb.292.2020.03.20.09.39.57; Fri, 20 Mar 2020 09:40:11 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@bernat.ch header.s=fm2 header.b="MJ/zE2Tg"; dkim=pass header.i=@messagingengine.com header.s=fm2 header.b=Obczzfhi; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=bernat.ch Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727563AbgCTQic (ORCPT + 99 others); Fri, 20 Mar 2020 12:38:32 -0400 Received: from wout3-smtp.messagingengine.com ([64.147.123.19]:34559 "EHLO wout3-smtp.messagingengine.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727414AbgCTQib (ORCPT ); Fri, 20 Mar 2020 12:38:31 -0400 Received: from compute4.internal (compute4.nyi.internal [10.202.2.44]) by mailout.west.internal (Postfix) with ESMTP id 448005D0; Fri, 20 Mar 2020 12:38:30 -0400 (EDT) Received: from mailfrontend2 ([10.202.2.163]) by compute4.internal (MEProxy); Fri, 20 Mar 2020 12:38:30 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bernat.ch; h= from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; s=fm2; bh=KZ90kr0wTIc0EZ29kZv5jxqduk iofzhut3YQZokNDi8=; b=MJ/zE2Tg8sQdNCDMw2dpNmCZEnaGhZInPOhYSi9USR H2hdfbplzGcHwREt9GjH4+0KP9c3ZeDP94ieHLMlmSUmFUxD3G+1Lh7Ln05bUJsy lrP+R87vkphn74IcI/qSG04m7J5tg/pqtIF0+mtdnt3zpkRm7SZ9VaOIU3lfEVsY wcLfuhJhhF7g4ic0I6VGuDcVRrfhaRDchsYK9mMky5NMDQRd7kX/a8aKGxCra+2/ IgvjhDfI9t+xzetZt2+nOWZoAi87j700xb+JnRBrQvM142ION7KjiMSDaPf89qIg QlXQVlm15KvFH1yodfKOQThlcov5CwWtxj89IdtpJBDg== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-transfer-encoding:date:from :message-id:mime-version:subject:to:x-me-proxy:x-me-proxy :x-me-sender:x-me-sender:x-sasl-enc; s=fm2; bh=KZ90kr0wTIc0EZ29k Zv5jxqdukiofzhut3YQZokNDi8=; b=Obczzfhiupm32q3EmdahoNVGZvZArkBwb hcofYe1UN69auT7BN1XXsqDUReihVow71d32Acrty8zqiZBuQ4OrzGj89KDeMYX+ oQgHX4aDg3nE4S3K1YIky5WX83VKlCZ6q5qOzpO87BG58m3CMrg3mmZD86cEVr1O wpZ14ZPdLIH1/JtyxNXDxLpW+KNnyCcM8FXf4N/PWMXipkr4Po1hOYE48jtMI2EL RI0ZD5jCh5XlfLUBzdbVeOHHQH174AdvLxvXVI4QhfrL/guNZpv6OjEycdlNKU7S 4iV5E1B44cjOXQTUcd4hd63WLx3QG7lmfgjroXvYIzUKrZHIlYzgg== X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedugedrudeguddgledtucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhephffvufffkffoggfgsedtkeertdertddtnecuhfhrohhmpeggihhntggvnhht uceuvghrnhgrthcuoehvihhntggvnhhtsegsvghrnhgrthdrtghhqeenucfkphepkedvrd duvdegrddvvdefrdekfeenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepmhgr ihhlfhhrohhmpegsvghrnhgrtheslhhufhhfhidrtgig X-ME-Proxy: Received: from neo.luffy.cx (lfbn-idf1-1-140-83.w82-124.abo.wanadoo.fr [82.124.223.83]) by mail.messagingengine.com (Postfix) with ESMTPA id E5B973060FE7; Fri, 20 Mar 2020 12:38:28 -0400 (EDT) Received: by neo.luffy.cx (Postfix, from userid 500) id 86D86A91; Fri, 20 Mar 2020 17:38:27 +0100 (CET) From: Vincent Bernat To: Jan Kiszka , Kieran Bingham , Stephen Boyd , linux-kernel@vger.kernel.org Cc: Vincent Bernat Subject: [PATCH] scripts/gdb: replace "is 0" by "== 0" Date: Fri, 20 Mar 2020 17:38:20 +0100 Message-Id: <20200320163820.3634106-1-vincent@bernat.ch> X-Mailer: git-send-email 2.26.0.rc2 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org While for small numbers, using "node is 0" works with CPython, it is more portable to use "node == 0". Moreover, with Python 3, this triggers a syntax warning: SyntaxWarning: "is" with a literal. Did you mean "=="? Signed-off-by: Vincent Bernat --- scripts/gdb/linux/rbtree.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/scripts/gdb/linux/rbtree.py b/scripts/gdb/linux/rbtree.py index 39db889b874c..87d4738984d2 100644 --- a/scripts/gdb/linux/rbtree.py +++ b/scripts/gdb/linux/rbtree.py @@ -17,7 +17,7 @@ def rb_first(root): raise gdb.GdbError("Must be struct rb_root not {}".format(root.type)) node = root['rb_node'] - if node is 0: + if node == 0: return None while node['rb_left']: @@ -33,7 +33,7 @@ def rb_last(root): raise gdb.GdbError("Must be struct rb_root not {}".format(root.type)) node = root['rb_node'] - if node is 0: + if node == 0: return None while node['rb_right']: -- 2.26.0.rc2