From nobody Mon Feb 9 17:56:15 2026 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id A1E59257825 for ; Mon, 19 Jan 2026 21:01:58 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=170.10.133.124 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1768856520; cv=none; b=pTHcq/RJLqSW46pZlTUjSzwG3CJ4THpRWr+cAOtW975nCguj+Q5SE98OWmqTUhz6I3AN+9RohR72I0U+8Q34jrR4m3J8Wgi6hL7NO8MHJxJyoscAgSZM7FwnmUyaPZp+5S8sssyjELvxAHXelS60Zgb+PhJWc6pgrsF7e0tJGB8= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1768856520; c=relaxed/simple; bh=wCKv6i46VQo8RzJYs6rWEhK41I7MDPwLrrLLY3O/SZM=; h=From:To:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=eOf5SCuvDixtqG5NfG+HD+UX+LpC4xu6olLsve7FqTtaOcKSf6gPx98jhMf0GGN91M0nlvGQDe+H1PNJu18cSsY6k1rQ290IqPff33VxnQWS5g78LpaKO/fZUe6YBVJ04uVG2iine2/Zm74bx5FYf7DkbGWs4OC3LtTcaduSuh4= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=redhat.com; spf=pass smtp.mailfrom=redhat.com; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b=iR7aGWYz; arc=none smtp.client-ip=170.10.133.124 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=redhat.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=redhat.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="iR7aGWYz" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1768856517; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=JAD9YBzMW3eH6RwLMXXyDtAG2c4/YXRh5uCCHihgJCY=; b=iR7aGWYzMf8rK8S9+o7uc4IK3vEZNxuVErA18cgjS2h6NgkUosV4U8nouoS6tpf8Hm/VaR EcsxZ+tBjTuFKs5Ibf+/UMTo/11BTRE9tmSwX7LME2lA0NU9HIKuEW56BD8f+XoiQ+kpm1 hrHJfr2pP0Mvp8sxIKmi1X1zFm2g9VQ= Received: from mx-prod-mc-01.mail-002.prod.us-west-2.aws.redhat.com (ec2-54-186-198-63.us-west-2.compute.amazonaws.com [54.186.198.63]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-634-EOWiOGirNuKtyZrakNyJCw-1; Mon, 19 Jan 2026 16:01:54 -0500 X-MC-Unique: EOWiOGirNuKtyZrakNyJCw-1 X-Mimecast-MFC-AGG-ID: EOWiOGirNuKtyZrakNyJCw_1768856513 Received: from mx-prod-int-05.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-05.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.17]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mx-prod-mc-01.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id A0F6A1956094; Mon, 19 Jan 2026 21:01:53 +0000 (UTC) Received: from fedora.redhat.com (unknown [10.22.80.137]) by mx-prod-int-05.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id 2476719560AB; Mon, 19 Jan 2026 21:01:50 +0000 (UTC) From: Wander Lairson Costa To: Steven Rostedt , Gabriele Monaco , Nam Cao , Wander Lairson Costa , linux-kernel@vger.kernel.org (open list), linux-trace-kernel@vger.kernel.org (open list:RUNTIME VERIFICATION (RV)) Subject: [PATCH 08/26] rv/rvgen: simplify boolean comparison Date: Mon, 19 Jan 2026 17:45:44 -0300 Message-ID: <20260119205601.105821-9-wander@redhat.com> In-Reply-To: <20260119205601.105821-1-wander@redhat.com> References: <20260119205601.105821-1-wander@redhat.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-Scanned-By: MIMEDefang 3.0 on 10.30.177.17 Content-Type: text/plain; charset="utf-8" Replace explicit boolean comparison with truthiness test in the dot2c module. The previous implementation used the redundant pattern of comparing a boolean variable directly to False, which is not idiomatic Python and adds unnecessary verbosity to the code. Python's truthiness allows for more concise and readable boolean checks. The expression "if not first" is clearer and more Pythonic than "if first =3D=3D False" while maintaining identical semantics. This pattern is preferred in PEP 8 and is the standard approach in the Python community. This change continues the ongoing code quality improvements to align the codebase with modern Python best practices. Signed-off-by: Wander Lairson Costa Reviewed-by: Gabriele Monaco Reviewed-by: Nam Cao --- tools/verification/rvgen/rvgen/dot2c.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/verification/rvgen/rvgen/dot2c.py b/tools/verification/r= vgen/rvgen/dot2c.py index c97bb9466af6d..fa9e9ae16640f 100644 --- a/tools/verification/rvgen/rvgen/dot2c.py +++ b/tools/verification/rvgen/rvgen/dot2c.py @@ -202,7 +202,7 @@ class Dot2c(Automata): line =3D "" first =3D True for state in self.states: - if first =3D=3D False: + if not first: line =3D line + ', ' else: first =3D False --=20 2.52.0