From patchwork Tue Jul 30 21:07:18 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Eduardo Habkost X-Patchwork-Id: 1139385 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (mailfrom) smtp.mailfrom=nongnu.org (client-ip=209.51.188.17; helo=lists.gnu.org; envelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org; receiver=) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=redhat.com Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 45yq0V328Gz9s00 for ; Wed, 31 Jul 2019 07:08:24 +1000 (AEST) Received: from localhost ([::1]:36412 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.86_2) (envelope-from ) id 1hsZM5-0002RZ-CC for incoming@patchwork.ozlabs.org; Tue, 30 Jul 2019 17:08:21 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:39267) by lists.gnu.org with esmtp (Exim 4.86_2) (envelope-from ) id 1hsZLG-0002Q5-4o for qemu-devel@nongnu.org; Tue, 30 Jul 2019 17:07:31 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hsZLF-0001Dn-5d for qemu-devel@nongnu.org; Tue, 30 Jul 2019 17:07:30 -0400 Received: from mx1.redhat.com ([209.132.183.28]:37186) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1hsZLC-00017k-FA for qemu-devel@nongnu.org; Tue, 30 Jul 2019 17:07:27 -0400 Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.phx2.redhat.com [10.5.11.14]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 477E43082E61; Tue, 30 Jul 2019 21:07:20 +0000 (UTC) Received: from localhost (ovpn-116-22.gru2.redhat.com [10.97.116.22]) by smtp.corp.redhat.com (Postfix) with ESMTP id C7DC05D9CA; Tue, 30 Jul 2019 21:07:19 +0000 (UTC) Date: Tue, 30 Jul 2019 18:07:18 -0300 From: Eduardo Habkost To: qemu-devel@nongnu.org Message-ID: <20190730210718.GU4313@habkost.net> References: <20190726120542.9894-1-armbru@redhat.com> <20190726120542.9894-24-armbru@redhat.com> <20190729194414.GG4313@habkost.net> <87d0hreqh3.fsf_-_@dusky.pond.sub.org> <8bea0201-f796-d682-22e6-069985b45523@redhat.com> <0eb2518f-147c-2b47-f48c-3af26bf5d264@redhat.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <0eb2518f-147c-2b47-f48c-3af26bf5d264@redhat.com> X-Scanned-By: MIMEDefang 2.79 on 10.5.11.14 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.46]); Tue, 30 Jul 2019 21:07:20 +0000 (UTC) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 209.132.183.28 Subject: [Qemu-devel] [RFC] HACKING: Document 'struct' keyword usage X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Paolo Bonzini , Richard Henderson , Markus Armbruster , Peter Maydell Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: "Qemu-devel" Sometimes we use the 'struct' keyword to help us reduce dependencies between header files. Document that practice. Signed-off-by: Eduardo Habkost Reviewed-by: Aleksandar Markovic Reviewed-by: Thomas Huth --- I wonder if this is too terse? Should we give examples? --- HACKING | 2 ++ 1 file changed, 2 insertions(+) diff --git a/HACKING b/HACKING index 0fc3e0fc04..112685bdaf 100644 --- a/HACKING +++ b/HACKING @@ -101,6 +101,8 @@ it points to, or it is aliased to another pointer that is. 2.3. Typedefs Typedefs are used to eliminate the redundant 'struct' keyword. +However, the 'struct' keyword may be sometimes used in header +files to avoid unnecessary dependencies between headers. 2.4. Reserved namespaces in C and POSIX Underscore capital, double underscore, and underscore 't' suffixes should be