Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-1.0 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id F0ECAC28CC5 for ; Wed, 5 Jun 2019 16:21:24 +0000 (UTC) Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id CE3B0206C3 for ; Wed, 5 Jun 2019 16:21:24 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org CE3B0206C3 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=redhat.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Received: from localhost ([127.0.0.1]:45881 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hYYfE-0005sO-4S for qemu-devel@archiver.kernel.org; Wed, 05 Jun 2019 12:21:24 -0400 Received: from eggs.gnu.org ([209.51.188.92]:35391) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hYYe5-0005Be-0d for qemu-devel@nongnu.org; Wed, 05 Jun 2019 12:20:14 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hYYe4-0003dd-18 for qemu-devel@nongnu.org; Wed, 05 Jun 2019 12:20:13 -0400 Received: from mx1.redhat.com ([209.132.183.28]:53652) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1hYYe3-0003WY-Py for qemu-devel@nongnu.org; Wed, 05 Jun 2019 12:20:11 -0400 Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.phx2.redhat.com [10.5.11.13]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 5C8A730C252E; Wed, 5 Jun 2019 16:19:25 +0000 (UTC) Received: from lacos-laptop-7.usersys.redhat.com (ovpn-116-187.ams2.redhat.com [10.36.116.187]) by smtp.corp.redhat.com (Postfix) with ESMTP id CCFD45F7C0; Wed, 5 Jun 2019 16:18:39 +0000 (UTC) To: =?UTF-8?Q?Daniel_P._Berrang=c3=a9?= , Markus Armbruster References: <87lfyqla7r.fsf@dusky.pond.sub.org> <20190605142300.GB8956@redhat.com> From: Laszlo Ersek Message-ID: Date: Wed, 5 Jun 2019 18:18:38 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.9.1 MIME-Version: 1.0 In-Reply-To: <20190605142300.GB8956@redhat.com> Content-Type: text/plain; charset=utf-8 Content-Language: en-US X-Scanned-By: MIMEDefang 2.79 on 10.5.11.13 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.40]); Wed, 05 Jun 2019 16:20:01 +0000 (UTC) Content-Transfer-Encoding: quoted-printable X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 209.132.183.28 Subject: Re: [Qemu-devel] Headers without multiple inclusion guards X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Peter Maydell , Chris Wulff , Sagar Karandikar , David Hildenbrand , James Hogan , Anthony Green , Palmer Dabbelt , Mark Cave-Ayland , qemu-devel@nongnu.org, Max Filippov , Dmitry Fleytman , Alistair Francis , Gerd Hoffmann , "Edgar E. Iglesias" , Guan Xuetao , Marek Vasut , Stefano Stabellini , Aleksandar Rikalo , Helge Deller , "Michael S. Tsirkin" , Halil Pasic , Christian Borntraeger , Anthony Perard , Richard Henderson , Jason Wang , Artyom Tarasenko , Laurent Vivier , Thomas Huth , Riku Voipio , Eduardo Habkost , Alistair Francis , Greg Kurz , Marcelo Tosatti , Beniamino Galvani , Eric Auger , Paul Durrant , Stafford Horne , =?UTF-8?Q?Alex_Benn=c3=a9e?= , David Gibson , Claudio Fontana , Bastian Koppelmann , Cornelia Huck , Claudio Fontana , Laurent Vivier , Andrew Baumann , =?UTF-8?Q?Philippe_Mathieu-Daud=c3=a9?= , Michael Walle , Aleksandar Markovic , Paolo Bonzini , Aurelien Jarno , =?UTF-8?Q?Philippe_Mathieu-Daud=c3=a9?= Errors-To: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Sender: "Qemu-devel" On 06/05/19 16:23, Daniel P. Berrang=C3=A9 wrote: > On Tue, May 28, 2019 at 08:12:24PM +0200, Markus Armbruster wrote: >> We have a bunch of headers without multiple inclusion guards. Some ar= e >> clearly intentional, some look accidental. Too many for me to find ou= t >> by examining each of them, so I'm asking their maintainers. >> >> Why do I ask? I'd like to mark the intentional ones and fix the >> accidental ones, so they don't flunk "make check-headers" from "[RFC v= 4 >> 0/7] Baby steps towards saner headers" just because they lack multiple >> inclusion guards. >> >> Just in case: what's a multiple inclusion guard? It's >> >> #ifndef UNIQUE_GUARD_SYMBOL_H >> #define UNIQUE_GUARD_SYMBOL_H >> ... >> #endif >> >> with nothing but comments outside the conditional, so that the header >> can safely be included more than once. >=20 > Any opinions on using the less verbose syntax instead: >=20 > #pragma once >=20 > It is not portable C, but we explicitly only care about GCC or CLang, > so portability isn't an issue for us. I don't feel strongly about this particular question, so if folks prefer "#pragma once", I won't complain. I'd just like to report that section 6 of "HACKING" appears the opposite of "we explicitly only care about GCC or CLang". Thanks, Laszlo >=20 >=20 >> Cryptography >> M: Daniel P. Berrange >> crypto/ivgen-essiv.h >> crypto/ivgen-plain.h >> crypto/ivgen-plain64.h >=20 > These have header guards present >=20 >> tests/crypto-tls-psk-helpers.h >> tests/crypto-tls-x509-helpers.h >=20 > These should be fixed. >=20 > Regards, > Daniel >=20