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=-2.8 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS 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 0456BC433F5 for ; Wed, 22 Sep 2021 10:45:22 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id A2CBD61214 for ; Wed, 22 Sep 2021 10:45:21 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org A2CBD61214 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=kvack.org Received: by kanga.kvack.org (Postfix) id 3C1F4900002; Wed, 22 Sep 2021 06:45:21 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 372056B0072; Wed, 22 Sep 2021 06:45:21 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 1C5D0900002; Wed, 22 Sep 2021 06:45:21 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0179.hostedemail.com [216.40.44.179]) by kanga.kvack.org (Postfix) with ESMTP id 0ACD36B006C for ; Wed, 22 Sep 2021 06:45:21 -0400 (EDT) Received: from smtpin23.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay04.hostedemail.com (Postfix) with ESMTP id B86872C587 for ; Wed, 22 Sep 2021 10:45:20 +0000 (UTC) X-FDA: 78614877600.23.46BA9A2 Received: from mail-ed1-f53.google.com (mail-ed1-f53.google.com [209.85.208.53]) by imf22.hostedemail.com (Postfix) with ESMTP id 705AD1905 for ; Wed, 22 Sep 2021 10:45:20 +0000 (UTC) Received: by mail-ed1-f53.google.com with SMTP id c22so8015113edn.12 for ; 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=Blrvw8wWrJUhA+4hYlM340Q0MEStXiSMYz3wsVVhqPqge/89GJ+4h9E7IHvF9Gdu2g PXCjW2vwNSMzOqqwikkH1hglCcJwrguf4dysknN4BRmJLbkmmmu7OD+/JnXemII2I85L Q4pMWoU3JBNfRFwjs3/Nc2gXtQ+0IPTnBsQWWtYTTeKOnpweZJm65A6TleGIuh5uWU6n f6I4kE47X/1IMz8RQcuGrw0ukKTznWTSrd2zgDObQVr06SIwZE9fmER/NhklpvuCuIP5 dzZjtJfKijWcpD8nOLll3uVR0/Jj873Q96cmI4DBImfS80JWpfFcAAxFQzWI6J88Ev7Q wnxA== X-Gm-Message-State: AOAM532B0RCF1wB2qBJPPgW1FYhmXKmff0uaEP1vxEZBlZ/6Sh7TnBqA hzpP1JuUHaHjcF7Ycs5gaQ== X-Google-Smtp-Source: ABdhPJzj/AQfGN60lBCLn+qgySa/N4l+FMMQkwlUu1OhUnv2YzCSyAY89M7fuFzI5HdjB1wBVBRpyQ== 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: X-Rspamd-Server: rspam01 X-Rspamd-Queue-Id: 705AD1905 Authentication-Results: imf22.hostedemail.com; dkim=pass header.d=gmail.com header.s=20210112 header.b=qjmt2THo; dmarc=pass (policy=none) header.from=gmail.com; spf=pass (imf22.hostedemail.com: domain of adobriyan@gmail.com designates 209.85.208.53 as permitted sender) smtp.mailfrom=adobriyan@gmail.com X-Stat-Signature: wo4je8spau47jepmi6c6whfxtx8kdymo X-HE-Tag: 1632307520-20775 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, 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; };