Received: by 2002:a05:6a11:4021:0:0:0:0 with SMTP id ky33csp351189pxb; Wed, 22 Sep 2021 03:46:20 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwtYwHmc7r82SCRxntPZiNBE1RTNJxg3UItaoY69a8k1rGAzdYTYmpIiU7MetpatUiR4/iS X-Received: by 2002:a6b:5b14:: with SMTP id v20mr3808159ioh.142.1632307580714; Wed, 22 Sep 2021 03:46:20 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1632307580; cv=none; d=google.com; s=arc-20160816; b=AKNkfdWT2GiIH1W2HgWUCI1DZXSdvoEFWGO3C86uwWq0Halkw1pFa5xzd/SXYcqBUq iYNAb3thtTJ4c6KOcYUtJx2nqvu+YbEkJO7oKYRjzp5TIUCo1qAE9h3nm7HvAeXAo729 UgDeLWc2bhD89TZ1pN9YU6uoaIT27kAlgN8bVRl52UwTtQ6adHUw+mIQNphIysqOHPYu pAz/vZMoBjl0WYBlKvC5EttdoBOfgUSFhqTMjn6jZMlCwRS1JjPlmN+Kb+Y29dhKYFGF 4esm4qR3eG5JRjDZBW9EMn8F37j5LQuri88y6gUmaGJeoFKJqYepISxRiZOZ7ENsvu+W 2mLQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=Iv+aqhr6TwoBfc/MRkxFU8sk3GDAunF1Y+pLFpHKuDc=; b=aeTbdxQ7lG263Qv3YSRpdrYqIHkaDuWhvYJm+QkOCbWZVjK8y7PYPGNdvQwrPhlC5r 3TKoA3XFVNqmtsvKGZGNZoqcw/E76iky7FszMYETK0QnEv4niFlEYN+gnolpb5LbgPK4 N0GIlKT3HJrsUVGA4BvZj78Oy1yuqM291RaTh8bh9Tn9mjeXvTqTSCCLDbXiZmPfc2gK Gx+RODbeJ6wsk1Yw3+5CzSBGH5G3LU7dNYMNUr7aOeJwzT4gIWzAjtEUOeM7G1CJRqFI B29cB3Jn/fHhm0uYUFISQuDkO4FGX5Zt9NIJa4LObz4nEbU7akxg22Ey3mV3x0WlpfMM KeUg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=qjmt2THo; 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; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id g187si2000784jag.38.2021.09.22.03.46.09; Wed, 22 Sep 2021 03:46:20 -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; dkim=pass header.i=@gmail.com header.s=20210112 header.b=qjmt2THo; 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; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235119AbhIVKqv (ORCPT + 99 others); Wed, 22 Sep 2021 06:46:51 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:60540 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234871AbhIVKqu (ORCPT ); Wed, 22 Sep 2021 06:46:50 -0400 Received: from mail-ed1-x52a.google.com (mail-ed1-x52a.google.com [IPv6:2a00:1450:4864:20::52a]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 8999BC061756; Wed, 22 Sep 2021 03:45:20 -0700 (PDT) Received: by mail-ed1-x52a.google.com with SMTP id v24so8272996eda.3; Wed, 22 Sep 2021 03:45:20 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to; bh=Iv+aqhr6TwoBfc/MRkxFU8sk3GDAunF1Y+pLFpHKuDc=; b=qjmt2THoagD6EXh+TaL3hH0ci9nb+1zCV6pAebFVqofsZqVeukArMheY6DMr5Phyx6 kfQGGYRCMg1FWWpdz4mrH3ZF1bEdQgQ50HRGvdvEDuSi3UbKAI83H+qchCG5J5+qcDv9 Sdfc21N6Xgcxm4VqoYejwga2DzQ7l+/Dm8wXhVFm5qBiG8Mto2aDH2sUT0QvBQ1xV8OO w8mVEAfmvXkOD70pn3CqbNrv7FhQkrF3hsY/6gY99pxdAOiKl26UHUcM4cZn2nRogaiO m43NTADA0Jst86ecEQeVPa9V8SziZCzXZb+QvKuDxmzeJh5G3+mSk4TlPV610nPCrYrd dGIw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=Iv+aqhr6TwoBfc/MRkxFU8sk3GDAunF1Y+pLFpHKuDc=; b=u8+Zb7LtWX2zNAOMDp0Lvsq0ymclbzPVY7/LEoe4hspp97TTowlgzSOEoyfSuy7XBp dn88jVbXkGefrKRs/96WMfSxHwk6GUHOc+gquG8YtMkKyJM3RKtQYjaWObgXx58HjFa+ /F3lH3UqJuEYBs1HoLjH0RvSXR0OnLXB2zZdichm8JFFtUwI0VsSeh2/Ekxt3Ck3dl4d vIRmcytJgRgiCXtwf18tdl/2cYwMrPdJJsB/YTlM5jU8DpMA1lD4h+5qSMd4SJAEOJ69 5Vum79JNa1ZeLQQIXQylZXto8FOlQqsOitmifd5IUVxT+MuxLIrOqCHdvCyFuCINflUe U0hQ== X-Gm-Message-State: AOAM530D0/sNVo2R5DCDmkPT6x3n+JL5sMHYECgBPxMY63dfrHazP6oB WOXshA1uuoAAaKfuEOrbkw== X-Received: by 2002:a17:907:2651:: with SMTP id ar17mr40811795ejc.15.1632307519076; Wed, 22 Sep 2021 03:45:19 -0700 (PDT) Received: from localhost.localdomain ([46.53.254.56]) by smtp.gmail.com with ESMTPSA id q9sm856559ejf.70.2021.09.22.03.45.17 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 22 Sep 2021 03:45:18 -0700 (PDT) Date: Wed, 22 Sep 2021 13:45:16 +0300 From: Alexey Dobriyan To: Joe Perches Cc: linux-kernel@vger.kernel.org, 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 Subject: Re: function prototype element ordering Message-ID: References: <20210909200948.090d4e213ca34b5ad1325a7e@linux-foundation.org> <20210910031046.G76dQvPhV%akpm@linux-foundation.org> <202109211630.2D00627@keescook> <202109211757.F38DF644@keescook> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Sep 22, 2021 at 01:51:34AM -0700, Joe Perches wrote: > 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? Somehow, it doesn't. But it works for members: struct S { __attribute__((aligned(16))) int a; };