From mboxrd@z Thu Jan 1 00:00:00 1970 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=-3.8 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS, UNPARSEABLE_RELAY autolearn=no 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 70C2DC433EF for ; Wed, 22 Sep 2021 08:51:42 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id F2DB161362 for ; Wed, 22 Sep 2021 08:51:41 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org F2DB161362 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=perches.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=kvack.org Received: by kanga.kvack.org (Postfix) id 886706B006C; Wed, 22 Sep 2021 04:51:41 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 836396B0072; Wed, 22 Sep 2021 04:51:41 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 6FDBA900002; Wed, 22 Sep 2021 04:51:41 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0223.hostedemail.com [216.40.44.223]) by kanga.kvack.org (Postfix) with ESMTP id 5C1C56B006C for ; Wed, 22 Sep 2021 04:51:41 -0400 (EDT) Received: from smtpin18.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay03.hostedemail.com (Postfix) with ESMTP id 00F718249980 for ; Wed, 22 Sep 2021 08:51:40 +0000 (UTC) X-FDA: 78614591202.18.F674BE3 Received: from smtprelay.hostedemail.com (smtprelay0091.hostedemail.com [216.40.44.91]) by imf28.hostedemail.com (Postfix) with ESMTP id A4F0090000A2 for ; Wed, 22 Sep 2021 08:51:40 +0000 (UTC) Received: from omf09.hostedemail.com (clb03-v110.bra.tucows.net [216.40.38.60]) by smtprelay06.hostedemail.com (Postfix) with ESMTP id 46C8818224D8D; Wed, 22 Sep 2021 08:51:40 +0000 (UTC) Received: from [HIDDEN] (Authenticated sender: joe@perches.com) by omf09.hostedemail.com (Postfix) with ESMTPA id A34D41E04D3; Wed, 22 Sep 2021 08:51:35 +0000 (UTC) Message-ID: Subject: Re: function prototype element ordering From: Joe Perches To: Alexey Dobriyan , linux-kernel@vger.kernel.org Cc: Linus Torvalds , Andrew Morton , apw@canonical.com, Christoph Lameter , Daniel Micay , Dennis Zhou , dwaipayanray1@gmail.com, Joonsoo Kim , Linux-MM , Lukas Bulwahn , mm-commits@vger.kernel.org, Nathan Chancellor , Nick Desaulniers , Miguel Ojeda , Pekka Enberg , David Rientjes , Tejun Heo , Vlastimil Babka , linux-doc@vger.kernel.org Date: Wed, 22 Sep 2021 01:51:34 -0700 In-Reply-To: References: <20210909200948.090d4e213ca34b5ad1325a7e@linux-foundation.org> <20210910031046.G76dQvPhV%akpm@linux-foundation.org> <202109211630.2D00627@keescook> <202109211757.F38DF644@keescook> Content-Type: text/plain; charset="ISO-8859-1" User-Agent: Evolution 3.40.0-1 MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Session-Marker: 6A6F6540706572636865732E636F6D X-Session-ID: U2FsdGVkX1/0VQy3rI6crSuBv+vrDUQ0lyPWzhzLHhQ= X-HE-Tag: 1632300695-215196 X-Rspamd-Server: rspam04 X-Rspamd-Queue-Id: A4F0090000A2 X-Stat-Signature: tbhzbgs7pfzi5garzbrukfhk5ozzzfa5 Authentication-Results: imf28.hostedemail.com; dkim=none; dmarc=none; spf=none (imf28.hostedemail.com: domain of joe@perches.com has no SPF policy when checking 216.40.44.91) smtp.mailfrom=joe@perches.com X-HE-Tag: 1632300700-285927 X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: On Wed, 2021-09-22 at 10:24 +0300, Alexey Dobriyan wrote: > Attributes should be on their own line, they can be quite lengthy. > > __attribute__((...)) > [static] [inline] T f(A1 arg1, ...) > { > ... > } > > There will be even more attributes in the future, both added by > compilers and developers (const, pure, WUR), so let's make "prototype lane" > for them. > > Same for structures: > > __attribute__((packed)) > struct S { > }; Do you know if placing attributes like __packed/__aligned() before definitions would work for all cases for structs/substructs/unions?