From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga07.intel.com (mga07.intel.com [134.134.136.100]) by dpdk.org (Postfix) with ESMTP id 6E1195F2E for ; Mon, 17 Sep 2018 17:26:28 +0200 (CEST) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga002.jf.intel.com ([10.7.209.21]) by orsmga105.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 17 Sep 2018 08:26:26 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.53,385,1531810800"; d="scan'208";a="92459756" Received: from silpixa00399502.ir.intel.com (HELO silpixa00399502.ger.corp.intel.com) ([10.237.223.218]) by orsmga002.jf.intel.com with ESMTP; 17 Sep 2018 08:26:23 -0700 From: Marko Kovacevic To: dev@dpdk.org Cc: ferruh.yigit@intel.com, john.mcnamara@intel.com, Marko Kovacevic Date: Mon, 17 Sep 2018 16:24:29 +0100 Message-Id: <20180917152429.30518-1-marko.kovacevic@intel.com> X-Mailer: git-send-email 2.9.5 Subject: [dpdk-dev] [PATCH] doc: add note into coding style X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 17 Sep 2018 15:26:28 -0000 Added a note into the coding style to highlight the use of a bool within a struct Signed-off-by: Marko Kovacevic --- doc/guides/contributing/coding_style.rst | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/doc/guides/contributing/coding_style.rst b/doc/guides/contributing/coding_style.rst index b1bf0d1..8b1febe 100644 --- a/doc/guides/contributing/coding_style.rst +++ b/doc/guides/contributing/coding_style.rst @@ -247,6 +247,15 @@ Structure Declarations * Use of the structures should be by separate variable declarations and those declarations must be extern if they are declared in a header file. * Externally visible structure definitions should have the structure name prefixed by ``rte_`` to avoid namespace collisions. +.. note:: + + Uses of ``bool`` in structures are not preferred as is wastes space and + it's also not clear as to what type size the bool is. A preferred use of + ``bool`` is mainly as a return type from functions that return true/false, + and maybe local variable functions. + + Ref: `LKML `_ + Queues ~~~~~~ -- 2.9.5