Received: by 2002:a05:6a11:4021:0:0:0:0 with SMTP id ky33csp262186pxb; Wed, 22 Sep 2021 22:18:01 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxs1k1PCasYIfFWTV8tteUC2LS7qLUGQobkyqp8EQuavkxdi9gQf1//A0bEFpPGSpy+Q2TS X-Received: by 2002:a05:6e02:110f:: with SMTP id u15mr2192505ilk.6.1632374281234; Wed, 22 Sep 2021 22:18:01 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1632374281; cv=none; d=google.com; s=arc-20160816; b=K+BFunKAWHWWGFxIdCEIozTaSVGNRszqv+DzjZr5BOukzTWNHkzdCuGbBECyF5lqDL 7ylYTK7XYMZpMIO19FGyFldDLscnQnSMFJ01w2VcEBW/OkhD/xaU7+QxlEClxfTvF2Lh Whxc/YZVMbHrs9ULz0NFJB0OIadJD5rQMGZawsEDNOd078xEjXbu1kKCoARYvmbtduXD sWdEsNv4gMkevw0YRjiOb9wbJuEHb+j9HeD6n0sfMx2Z5NPK+R4B8OJkVgN19DDmpoDg XpIQrria3EwyyDz5sUBCFTWt9zLN/RivM3635q+uLhGmL7/ABwbcflX7z3oLAshXCXOW hBlA== 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=8xk4TmtVRRe6hB4cKhg4olQdxzyKnDwtTjdMGaeStGc=; b=pDfZp2aQKfLEowR9yq4Ke4PT7bSblbxklJbEnDyr+EEQPiFAhYM1pSS8rtgcPPyvtJ wwoLAWLlVEqHZatMjFhWJcrGo4TB5MBLcfWVBrxp2CeHz7SY/dqd/kKgplbSgZbIziaM LJwsoCMNCzgSaJpGlvT3EmdAVlF126GgUD83p9P5MWmMwc085C3OmcmnnJjVnPuvS5TF QwlqUChHfA84UFnXsPO1VGFG77XlRZLzINjUJgSHB2melK04rT0RCpIAYujwQSl9zPZJ 9ymhWUusJ5ivIW0YmMsUZsEuSU5cR84seBg75lRQuKyC1Nx31BPhdJQDr9XvH7h/uspa j3bw== 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 a10si5251599ili.135.2021.09.22.22.17.34; Wed, 22 Sep 2021 22:18:01 -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 S239135AbhIWFMF (ORCPT + 99 others); Thu, 23 Sep 2021 01:12:05 -0400 Received: from smtprelay0229.hostedemail.com ([216.40.44.229]:58002 "EHLO smtprelay.hostedemail.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S234629AbhIWFMF (ORCPT ); Thu, 23 Sep 2021 01:12:05 -0400 Received: from omf08.hostedemail.com (clb03-v110.bra.tucows.net [216.40.38.60]) by smtprelay08.hostedemail.com (Postfix) with ESMTP id 3AB12182CED2A; Thu, 23 Sep 2021 05:10:31 +0000 (UTC) Received: from [HIDDEN] (Authenticated sender: joe@perches.com) by omf08.hostedemail.com (Postfix) with ESMTPA id 8BA3C1A29FC; Thu, 23 Sep 2021 05:10:26 +0000 (UTC) Message-ID: Subject: Re: function prototype element ordering From: Joe Perches To: Linus Torvalds , Alexey Dobriyan Cc: Linux Kernel Mailing List , 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 , "open list:DOCUMENTATION" Date: Wed, 22 Sep 2021 22:10:24 -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-Stat-Signature: snz89n14ensws59qo6ginjubhwfa4zsc X-Rspamd-Server: rspamout03 X-Rspamd-Queue-Id: 8BA3C1A29FC X-Spam-Status: No, score=-0.82 X-Session-Marker: 6A6F6540706572636865732E636F6D X-Session-ID: U2FsdGVkX19xSpeXGi7fPZeju4RiHbCdzQS2uBIxyms= X-HE-Tag: 1632373826-787062 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, 2021-09-22 at 14:15 -0700, Linus Torvalds wrote: > On Wed, Sep 22, 2021 at 12:24 AM Alexey Dobriyan wrote: > > > > Attributes should be on their own line, they can be quite lengthy. > > No, no no. They really shouldn't. > > First off, no normal code should use that "__attribute__(())" syntax > anyway. It's ugly and big, and many of the attributes are > compiler-specific anyway. > > So the "quite lengthy" argument is bogus, because the actual names you > should use are things like "__packed" or "__pure" or "__user" etc. > > But the "on their own line" is complete garbage to begin with. That > will NEVER be a kernel rule. We should never have a rule that assumes > things are so long that they need to be on multiple lines. I think it's not so much that lines are long, it's more that the information provided by these markings aren't particularly useful to a caller/user of a function. Under what circumstance is a marking like __pure/__cold or __section useful to someone that just wants to call a particular function? A secondary reason why these should be separate or at least put at the begining of a function declaration is compatibility with existing tools like ctags.