From patchwork Fri Jul 19 09:19:02 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jan Beulich X-Patchwork-Id: 11049895 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 9E82213B1 for ; Fri, 19 Jul 2019 09:21:54 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 8E865287FB for ; Fri, 19 Jul 2019 09:21:54 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 82AC928874; Fri, 19 Jul 2019 09:21:54 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-5.2 required=2.0 tests=BAYES_00,MAILING_LIST_MULTI, RCVD_IN_DNSWL_MED,UNPARSEABLE_RELAY autolearn=ham version=3.3.1 Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 24E1F28871 for ; Fri, 19 Jul 2019 09:21:54 +0000 (UTC) Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.89) (envelope-from ) id 1hoP3x-0006iO-7D; Fri, 19 Jul 2019 09:20:25 +0000 Received: from all-amaz-eas1.inumbo.com ([34.197.232.57] helo=us1-amaz-eas2.inumbo.com) by lists.xenproject.org with esmtp (Exim 4.89) (envelope-from ) id 1hoP3v-0006iD-H0 for xen-devel@lists.xenproject.org; Fri, 19 Jul 2019 09:20:23 +0000 X-Inumbo-ID: 6ca08e1e-aa06-11e9-b1d0-b77d4499df5b Received: from m4a0039g.houston.softwaregrp.com (unknown [15.124.2.85]) by us1-amaz-eas2.inumbo.com (Halon) with ESMTPS id 6ca08e1e-aa06-11e9-b1d0-b77d4499df5b; Fri, 19 Jul 2019 09:20:18 +0000 (UTC) Received: FROM m4a0039g.houston.softwaregrp.com (15.120.17.147) BY m4a0039g.houston.softwaregrp.com WITH ESMTP; Fri, 19 Jul 2019 09:20:16 +0000 Received: from M9W0068.microfocus.com (2002:f79:bf::f79:bf) by M4W0335.microfocus.com (2002:f78:1193::f78:1193) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1591.10; Fri, 19 Jul 2019 09:19:04 +0000 Received: from NAM03-CO1-obe.outbound.protection.outlook.com (15.124.72.14) by M9W0068.microfocus.com (15.121.0.191) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1591.10 via Frontend Transport; Fri, 19 Jul 2019 09:19:03 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=ayu/VMPMBNoVRXNRb7nT0izwMeQGN6aFR34BuBkVljaSZzW6UkqyF6Rx091lbNQSTzTagKBuBQuz9U9BWJYyq0jcHye/yWEzT1NEpqO07yhTyoSWzW+v1ougLKlCm6JcByWv8YSDStkMjRj0AWmqdHtXGvFgGHDe0xbooGVfNEvsWO9bt+gPriu/KYu5y6xz6LKM+9FTMVSm8OPh8ffBe5f8TUK/2wMjMXADWECUyKmeBZA2be4QwSHCUheQNPriM+MLFvytsp/gZq3tC6ag4rJQJEQrBVb2antjDQcKb6sEAxCMLBBe6apADBOotPBnnx3ibEJnQZN3brJEFN4DYg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=eh5fJyr96BwL7NmKrJgjTloQpCJzgn1wF8ZNuZ6dMnw=; b=Dc9SwMhVDHw17M1rD4upZQFD+K0gQhVW58gfSbTXiefxin10JhngoBE27xucupUlnimfHjXn9PwIZUrws30eqF+3toSd/sAYCNYa+f+T9DRm706Nq7zWh1UpixoQOQIcJNPwPrTHojV1KIgQeH+93nJXfUFbtWN3HrRbjK0/hRle5YNAWOB63IAcPLvvXHUlSwVT9IHfhiH7f6UJ0p6m2qUjvb3sS3IqEsV7jl9avqpo+QR/5ycoslMPBflCJ1AwwxKwr5u+RQDBuGKcgI3o5Uht3EJPNW85FWBpQ1IGvtxfBUufP2dKUX1Wf2z+RnkmQ+2H21pAkxRTJnS8Mvvvjw== ARC-Authentication-Results: i=1; mx.microsoft.com 1;spf=pass smtp.mailfrom=suse.com;dmarc=pass action=none header.from=suse.com;dkim=pass header.d=suse.com;arc=none Received: from DM6PR18MB3401.namprd18.prod.outlook.com (10.255.174.218) by DM6PR18MB2475.namprd18.prod.outlook.com (20.179.104.214) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2073.14; Fri, 19 Jul 2019 09:19:02 +0000 Received: from DM6PR18MB3401.namprd18.prod.outlook.com ([fe80::1fe:35f6:faf3:78c7]) by DM6PR18MB3401.namprd18.prod.outlook.com ([fe80::1fe:35f6:faf3:78c7%7]) with mapi id 15.20.2073.012; Fri, 19 Jul 2019 09:19:02 +0000 From: Jan Beulich To: "xen-devel@lists.xenproject.org" Thread-Topic: [PATCH 2/2] CODING_STYLE: list further brace placement exceptions Thread-Index: AQHVPhMBr+RUGGWe+UK6rQHc+fBEZA== Date: Fri, 19 Jul 2019 09:19:02 +0000 Message-ID: <29b489fe-d7ad-68b8-b555-2a6381a28829@suse.com> References: In-Reply-To: Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-clientproxiedby: LNXP265CA0057.GBRP265.PROD.OUTLOOK.COM (2603:10a6:600:5d::21) To DM6PR18MB3401.namprd18.prod.outlook.com (2603:10b6:5:1cc::26) authentication-results: spf=none (sender IP is ) smtp.mailfrom=JBeulich@suse.com; x-ms-exchange-messagesentrepresentingtype: 1 x-originating-ip: [87.234.252.170] x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: 7d17bf8b-575d-4f6f-20bc-08d70c2a23b5 x-microsoft-antispam: BCL:0; PCL:0; RULEID:(2390118)(7020095)(4652040)(8989299)(5600148)(711020)(4605104)(1401327)(4534185)(4627221)(201703031133081)(201702281549075)(8990200)(2017052603328)(7193020); SRVR:DM6PR18MB2475; x-ms-traffictypediagnostic: DM6PR18MB2475: x-microsoft-antispam-prvs: x-ms-oob-tlc-oobclassifiers: OLM:7691; x-forefront-prvs: 01039C93E4 x-forefront-antispam-report: SFV:NSPM; SFS:(10019020)(4636009)(39860400002)(366004)(346002)(136003)(396003)(376002)(189003)(199004)(52116002)(81156014)(81166006)(14454004)(6916009)(4326008)(80792005)(186003)(5660300002)(31696002)(66066001)(6512007)(478600001)(66946007)(2906002)(66556008)(66446008)(64756008)(66476007)(54906003)(86362001)(316002)(6486002)(6436002)(446003)(68736007)(11346002)(305945005)(8676002)(3846002)(476003)(2616005)(5640700003)(2351001)(99286004)(71200400001)(71190400001)(7736002)(8936002)(31686004)(36756003)(486006)(76176011)(102836004)(6506007)(386003)(6116002)(26005)(53936002)(25786009)(256004)(2501003); DIR:OUT; SFP:1102; SCL:1; SRVR:DM6PR18MB2475; H:DM6PR18MB3401.namprd18.prod.outlook.com; FPR:; SPF:None; LANG:en; PTR:InfoNoRecords; MX:1; A:1; received-spf: None (protection.outlook.com: suse.com does not designate permitted sender hosts) x-ms-exchange-senderadcheck: 1 x-microsoft-antispam-message-info: 7ZQJHzRf0ZXLEp54SuZsNLFQrez91Z/umPlE/PcBPI2XWqpAuVdECPoj6OVws5AL2muoWpA7nbJdGu9bbWHCM0JquFypvK8wroB74J0E77D07GDNozrlSjXBlFiS4N3gonvW07q0GpyQd55HI3KP/J2QR+xvjs9EMHbleHb+buyPad3QoCLPLHXRNLBvA1jhORxpzAPYSzh9IYE/kbBZKrtcdOhnko+QOJobElOYCqWeMpV74Vn8GR2bA7iSJC3DtLBTNhG0qutbqLaCV/6xvs2QzJZCIANlRCoEj6fV9fWxYrJ2nKhjmsn/q5BKtiOgwAe2oCl/9cq02sa1tO6EaHeZLzwKvtYQ227n4HjAfZG6QSdDCCBdMtVoi76z0XDZ1E74HIqK54+IEHkvAHP/tqKghF3jzWJosmayk/TH2uc= Content-ID: MIME-Version: 1.0 X-MS-Exchange-CrossTenant-Network-Message-Id: 7d17bf8b-575d-4f6f-20bc-08d70c2a23b5 X-MS-Exchange-CrossTenant-originalarrivaltime: 19 Jul 2019 09:19:02.5266 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 856b813c-16e5-49a5-85ec-6f081e13b527 X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: JBeulich@suse.com X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM6PR18MB2475 X-OriginatorOrg: suse.com Subject: [Xen-devel] [PATCH 2/2] CODING_STYLE: list further brace placement exceptions X-BeenThere: xen-devel@lists.xenproject.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Cc: Stefano Stabellini , Wei Liu , Konrad Wilk , George Dunlap , Andrew Cooper , Tim Deegan , JulienGrall , Ian Jackson Errors-To: xen-devel-bounces@lists.xenproject.org Sender: "Xen-devel" X-Virus-Scanned: ClamAV using ClamSMTP For easy spotting of struct/union/enum definitions we already commonly place the opening braces on the initial line of such a definition. We also often don't place the opening brace of an initializer on a separate line. And finally for compound literals placing the braces on separate lines often makes the code more difficult to read, so it should (and in practice does) typically go on the same line as well. The placement of the closing brace often depends on how large such a compound literal is. Signed-off-by: Jan Beulich Acked-by: Stefano Stabellini --- TBD: We may want to make explicit that for initializers both forms are fine. --- a/CODING_STYLE +++ b/CODING_STYLE @@ -64,8 +64,13 @@ Bracing ------- Braces ('{' and '}') are usually placed on a line of their own, except -for the do/while loop. This is unlike the Linux coding style and -unlike K&R. do/while loops are an exception. e.g.: +for +- the do/while loop +- the opening brace in definitions of enum, struct, and union +- the opening brace in initializers +- compound literals +This is unlike the Linux coding style and unlike K&R. do/while loops +are one exception. e.g.: if ( condition ) {