Received: by 2002:a05:6a11:4021:0:0:0:0 with SMTP id ky33csp280712pxb; Wed, 22 Sep 2021 01:55:51 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwD8vZ0Y+ClWyATsRduPggyJQ7g6gZEQuh6hB9rViApOee4Ek+JfUuJpYY5ZeInWg8nBShS X-Received: by 2002:a17:906:311b:: with SMTP id 27mr39763462ejx.428.1632300950941; Wed, 22 Sep 2021 01:55:50 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1632300950; cv=none; d=google.com; s=arc-20160816; b=QUSgV7aWjlG/V+/oMJX0v/jRENhgYPNVNE9tsfR/1O/qMlEq8kZyWlJ+b9Jbv/ORZl 1g7sJDVONYq8HqezoWkuQvoeIjEP+DMDaC4Xl5ToiCTc+Kdb57QCJOfm7URcG0YUkPwQ NX04+5RxkMOENUgNH/jfFiggR9ev8kQNLo4n9RmKnGExc+dj/lCrJtspa9VXqI0SZ4ye T4EihFsMJLTljV2/EVk4G/u6c4tkk6WvVzC/coh3eV1Aeo1d8y8Es4GvsbJLcWY1FK97 kwxT1Wc4jWoXbGjeajBsF0XnNbvOcNfi8vymEVxVOMdNPM03ypsKtdVz1fDbW7UIauU5 ycKA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:date:cc:to:from:subject :message-id; bh=j/QIGec4yprJHe/mLWYmof7q5pVMD5tgGOqBr7Vo8j0=; b=qD3VnVQWrELC/tNLoSYYuyQ2Iqg7Oj8my84jznlbtczee/vAHbdaPT/FRf7AyEz8aD ldP7Qj+E0DW+bRMGpNvQ7onXl4VSRuTzPaNEdclwexFqjFKZtrENGva2cCU1hk8M5Z/X TGmBkYcA5hO1cYyEKsqlGTK31svF3Sx+yum7ZKDty2lK5ovYroKOiJWtNK0Ry8W52ioF yf9D/dMyeAlQCR8sp1LaAR8yyhQtda/WJcaiAynN6AK8JM1vSlryk0FHMFCo1eVN/b1P w7IFr0761YhIfcisdPvNlFNN2C8Ox7ePz18uuQXMbUcPsnxKQdB1/JnjDAIFMxGWaqD9 TIlw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id p21si1788242ejn.785.2021.09.22.01.55.27; Wed, 22 Sep 2021 01:55:50 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234040AbhIVIxM (ORCPT + 99 others); Wed, 22 Sep 2021 04:53:12 -0400 Received: from smtprelay0158.hostedemail.com ([216.40.44.158]:44110 "EHLO smtprelay.hostedemail.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S233741AbhIVIxL (ORCPT ); Wed, 22 Sep 2021 04:53:11 -0400 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-Spam-Status: No, score=1.58 X-Stat-Signature: stsnoorhuzzsu81jzy15qc4susetbm8e X-Rspamd-Server: rspamout02 X-Rspamd-Queue-Id: A34D41E04D3 X-Session-Marker: 6A6F6540706572636865732E636F6D X-Session-ID: U2FsdGVkX1/0VQy3rI6crSuBv+vrDUQ0lyPWzhzLHhQ= X-HE-Tag: 1632300695-215196 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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?