From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by mx.groups.io with SMTP id smtpd.web10.32430.1683638862875520508 for ; Tue, 09 May 2023 06:27:43 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=OGynT9KH; spf=pass (domain: redhat.com, ip: 170.10.129.124, mailfrom: lersek@redhat.com) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1683638861; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=ghkcsmku8u1O7eTlMpFwyfEUyBTBZ/WWjDls+Qmsk1k=; b=OGynT9KHx8tHY++kFPvgD8g38i6KM5Mddj6+5GCkIjFDycatFSZTQS153mHRRUjjp1VT59 k8+AgZiwXJlkDHmpuDRbpMYFUakBdB+V/xUnTQwuiVq5HXyTQ4VxdjMHBgCEji+H3wLjvF uji/Z/PHxlv6lIFMpegVYGEInWvGd/w= Received: from mimecast-mx02.redhat.com (mimecast-mx02.redhat.com [66.187.233.88]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-355-ES6KOMBPMpyZcEASlGgXHg-1; Tue, 09 May 2023 09:27:38 -0400 X-MC-Unique: ES6KOMBPMpyZcEASlGgXHg-1 Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.rdu2.redhat.com [10.11.54.6]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id C4ED5857E65; Tue, 9 May 2023 13:27:37 +0000 (UTC) Received: from [10.39.192.152] (unknown [10.39.192.152]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 63CA12166B29; Tue, 9 May 2023 13:27:36 +0000 (UTC) Message-ID: <25f6c13a-3ece-03ad-e49f-d4446dc36a30@redhat.com> Date: Tue, 9 May 2023 15:27:34 +0200 MIME-Version: 1.0 Subject: Re: [edk2-devel] [PATCH 0/2] OvmfPkg: Relax assertion that interrupts do not occur at TPL_HIGH_LEVEL To: Michael Brown , devel@edk2.groups.io Cc: Gerd Hoffmann , Oliver Steffen , Pawel Polawski , Jiewen Yao , Ard Biesheuvel , Jordan Justen References: <476bbc17-6484-9afd-9be9-08de14d1d72e@redhat.com> <01020187fd46b80f-a69b4ae5-545f-45ae-ab0d-a48f725c7a40-000000@eu-west-1.amazonses.com> <50bf1804-70ba-dfff-73ad-d2afdbedf5e7@redhat.com> <010201880069b0b6-6a5f2d29-9bab-44b2-aa25-0a7507daf587-000000@eu-west-1.amazonses.com> From: "Laszlo Ersek" In-Reply-To: <010201880069b0b6-6a5f2d29-9bab-44b2-aa25-0a7507daf587-000000@eu-west-1.amazonses.com> X-Scanned-By: MIMEDefang 3.1 on 10.11.54.6 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Language: en-US Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit On 5/9/23 14:08, Michael Brown wrote: > On 09/05/2023 09:43, Laszlo Ersek wrote: >> I'm not subscribed to the list, so I don't have a copy of patch#1. I've >> checked patch#1 at this URL: >> >> https://listman.redhat.com/archives/edk2-devel-archive/2023-May/063591.html >> >> and I'll comment on it using the cover letter: >> >> I really like that patch, with one stylistic exception: in edk2, >> explicit FALSE and TRUE comparisons are not desired. So I suggest: >> >>    ASSERT (!GetInterruptState ()); >> >> Twice. >> >> In fact, I *think* that if you run uncrustify with the edk2 config on >> the patch, then it will rewrite that code. > > I built and ran uncrustify with the edk2 config but it did not modify > the code.  (I did check that it would fix other deliberate errors such > as extra whitespace, so I don't think this was an error in my setup.) > > I will send through v2 with the explicit "== FALSE" still present, for > consistency with the rest of the code in that file.  (I think I vaguely > remember someone asking me to add the explicit comparisons when I first > submitted the code.) Wow, I totally missed the preexistent comparisons. You are right to stay consistent. (I do disagree with the preexistent comparisons as well, but that's indeed a different discussion.) Thanks! Laszlo > I'm happy for there to be a follow up patch to > change the coding style to remove all of the explicit boolean > comparisons, if that is what is wanted. > > Thanks, > > Michael >