From nobody Sun Feb 8 19:48:44 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 216.205.24.124 as permitted sender) client-ip=216.205.24.124; envelope-from=libvir-list-bounces@redhat.com; helo=us-smtp-delivery-124.mimecast.com; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 216.205.24.124 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1629815137; cv=none; d=zohomail.com; s=zohoarc; b=SkpzhNK496nRoOENk6i2mjLPI27Lo2VFebPoZB9bAaDE6dtQ2LrEyTG2eUgwVC46kHuOEzWAoPOMI4UH9FDjqfuex2v85+krM3JlFEf8TmgFpIF8vc5kYU+94+4hAMDkxvRuV03jMK9pLkYjIX7Fbmm06pNiO7iZFbKYYLeXmJM= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1629815137; h=Content-Type:Content-Transfer-Encoding:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=S9qH5Nkcb+insHw4p2faPwqlBfKS1x7yYq6j7ar5J8w=; b=IJxXfyCw0GI7PAegTdse8fC5A4JULg7U0+gETvaEoFbiNq6YKwDt9CFe+igynPXx1MiXvWufF0wUeEaKtKe2xmw0cKGgYy1nIFYo2Wb7eGjlpyFYRjDFC5CgNYAB1eewZ+m058/klSm8lOPfhjOnA4RKcuLnz+NY2COls7qAQOo= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 216.205.24.124 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [216.205.24.124]) by mx.zohomail.com with SMTPS id 1629815137972981.0955098116626; Tue, 24 Aug 2021 07:25:37 -0700 (PDT) Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-281-AxGTBpv5Muac9X21syt0ug-1; Tue, 24 Aug 2021 10:25:35 -0400 Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 834B418C89DA; Tue, 24 Aug 2021 14:25:28 +0000 (UTC) Received: from colo-mx.corp.redhat.com (colo-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.21]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 63FCC60C0F; Tue, 24 Aug 2021 14:25:28 +0000 (UTC) Received: from lists01.pubmisc.prod.ext.phx2.redhat.com (lists01.pubmisc.prod.ext.phx2.redhat.com [10.5.19.33]) by colo-mx.corp.redhat.com (Postfix) with ESMTP id 313D54A7CA; Tue, 24 Aug 2021 14:25:28 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.phx2.redhat.com [10.5.11.15]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id 17OEPQDe002909 for ; Tue, 24 Aug 2021 10:25:26 -0400 Received: by smtp.corp.redhat.com (Postfix) id E18371ABDF; Tue, 24 Aug 2021 14:25:26 +0000 (UTC) Received: from hjs.redhat.com (unknown [10.43.2.20]) by smtp.corp.redhat.com (Postfix) with ESMTP id 6A4885D6CF for ; Tue, 24 Aug 2021 14:25:23 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1629815137; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:list-id:list-help: list-unsubscribe:list-subscribe:list-post; bh=S9qH5Nkcb+insHw4p2faPwqlBfKS1x7yYq6j7ar5J8w=; b=UmIjcGJE+zPlvCaxGo11RSmyaibQqsb0FUkP6H0JqOXeePIGfqdrsGHXlwH27pHMzoo6em 18k3NJ7BDMRXIxUQMbrOW+seMdFJxLHmXDVtdDmejPClY9/GQWiN7H98cYY7jDEDZKDRqN 1OTIn7AaPaP/w0fvw91WD16oXKM1opY= X-MC-Unique: AxGTBpv5Muac9X21syt0ug-1 From: =?UTF-8?q?J=C3=A1n=20Tomko?= To: libvir-list@redhat.com Subject: [libvirt PATCH 04/11] scripts: group-qemu-caps: remove unnecessary regexes Date: Tue, 24 Aug 2021 16:25:07 +0200 Message-Id: In-Reply-To: References: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.15 X-loop: libvir-list@redhat.com X-BeenThere: libvir-list@redhat.com X-Mailman-Version: 2.1.12 Precedence: junk List-Id: Development discussions about the libvirt library & tools List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: libvir-list-bounces@redhat.com Errors-To: libvir-list-bounces@redhat.com X-Scanned-By: MIMEDefang 2.79 on 10.5.11.12 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=libvir-list-bounces@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @redhat.com) X-ZM-MESSAGEID: 1629815139402100002 regroup_caps uses these to filter out lines that should not increase the counter. Here, we only care about the capability constants, so we can let the final matching regex take care of the matching. Signed-off-by: J=C3=A1n Tomko --- scripts/group-qemu-caps.py | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/scripts/group-qemu-caps.py b/scripts/group-qemu-caps.py index e56c306d10..ee33f1cf16 100755 --- a/scripts/group-qemu-caps.py +++ b/scripts/group-qemu-caps.py @@ -44,11 +44,7 @@ def load_caps_flags(filename, start_regex, end_regex): break =20 for line in lines[start:end]: - if re.search(r'''.*/\* [0-9]+ \*/.*''', line): - continue - if re.search(r'''^\s*$''', line): - continue - match =3D re.search(r'''[ ]+([A-Z0-9_]+)''', line) + match =3D re.search(r'''[ ]+([A-Z0-9_]+),''', line) =20 if match: capsflags.append(match[1]) --=20 2.31.1