Received: by 2002:a05:6520:4d:b0:139:a872:a4c9 with SMTP id i13csp758974lkm; Wed, 22 Sep 2021 14:17:52 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxv7omTuShhhL5yLqwkDsWXu0HlVKbCnoEy2fGFHsdRBSf1QM5ixLXj9GXOpfZTQ/kez1OW X-Received: by 2002:a5d:8612:: with SMTP id f18mr930793iol.66.1632345471969; Wed, 22 Sep 2021 14:17:51 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1632345471; cv=none; d=google.com; s=arc-20160816; b=iCFpHQZPiQ6awX86moeJNoYIOAS5KYe3HfPZk8C8PjBTWPSYvWKeYWwu8tCfkUJEO4 3cbmT9DHx15kmTAX5of/TaU1b0uRi9hKfiwICeUI7K39RF/mApvGPanz3LfivGhiWQ2Y mAmDeRAoy9a4vMqRXNpOjrsKYxH2Y6SkjGNILZgCgL6vmpSDL5dNXZcf7u9sgAUf1nXv ijuIae7iRU9jHPR77COSzbqFZ9Q5bl9I+aH1ugAUOr71k6ZYq2DzrYVcSVEEIktftLtN EG93kOrZ57dFQcjLWo4WYWr61sYbwBc49QBd+UwY8c+dt4GN0sHgikiJc6VV4idxmug7 3sVw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature; bh=7XJav0dfWNxK79pvtGX/UV/+fzNxl315YNj5Lb0kUtk=; b=T/edWYBJr5PaJeveBnPYLyfTqN/KEe+oQ7LVajxTsBOTBafXRy7t5kEdZObMwodnb+ rLJMVNxfVATKvv8ToiEvPOyEh1kY3VecxFp2GnIp/S4QOoLFBJYpLIl+vMtPnGC4ZmmS 2Fu87jTOq0+/1qD1x1eIvuEGNVh6p6t69EqDdeO3GjtnsZbPGTnWbqdeZhF3+FH+hLGi 36quIO8QtZiM1Bb+Zi1KM6XBc27f/eqelvP8qXoAbAnJ6moz61hdBW/1ThpxSV0+GLXq 2Wr5TTJEU7Mb+3dEPyUH4/LZpPZaHv33xboL/XufqCrTEzZIk8m1bp+nGfP2mwAz57FM AwCA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linux-foundation.org header.s=google header.b="QA/EzrWb"; 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 b68si2918650jab.118.2021.09.22.14.17.40; Wed, 22 Sep 2021 14:17:51 -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=@linux-foundation.org header.s=google header.b="QA/EzrWb"; 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 S237770AbhIVVR3 (ORCPT + 99 others); Wed, 22 Sep 2021 17:17:29 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:38982 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S237904AbhIVVRY (ORCPT ); Wed, 22 Sep 2021 17:17:24 -0400 Received: from mail-lf1-x133.google.com (mail-lf1-x133.google.com [IPv6:2a00:1450:4864:20::133]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 3C29CC061756 for ; Wed, 22 Sep 2021 14:15:54 -0700 (PDT) Received: by mail-lf1-x133.google.com with SMTP id g41so17318295lfv.1 for ; Wed, 22 Sep 2021 14:15:54 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux-foundation.org; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=7XJav0dfWNxK79pvtGX/UV/+fzNxl315YNj5Lb0kUtk=; b=QA/EzrWbAIrSwOaNV4uqMw33DYIddOpz6ZYLeSLgSw/6W5sXis/SfJPUXmmq3UhODG 6HTHGK+Pi7RNxhY6fHDq1cECQSdwskC8x9GDOcCAMch8XMogspIaioLO3jy91LAe9v+p zPQysb2+nkIu4xF1pvfTRTKDEaNJCficfXCxw= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=7XJav0dfWNxK79pvtGX/UV/+fzNxl315YNj5Lb0kUtk=; b=B1VbZcGu9BrvZqXZvAlyS8r4I+zKTnwL5q5DcqmKe/w0K6Hr4A9Uz+CLEhvX0x6+/l q3pvgIFI20IGy1nedmq0/dt3kR1vHVuP90iiYILfa5sSJvGcttrft1ZaNYNeXaCeqtZe QcAVu0qj/HBYIc+vfUJz7wTy2E4JMLMbln7R6f/0xV1UUtxw+v5Q4/Kna/r3IV48HMc+ jtL0mxohs4PcMQO8b4RyVCy8WTzK48IYAF8CsyifT2K5pzjUa1lcqOGBAt0STflct+kL AyOH6BO9QDUk3YQLd5xaft40rStL1+moTzgNHS39yqKqvsLdP3rnw/eL0qHiJZ+gx/JI T6ZQ== X-Gm-Message-State: AOAM533W008PXDrV4g7c12IBo56LjITgEqc343PPgvBESrxqsJciTrAq AJuqTtT46fvEXi4Ej+ypL8p03nC3NnZDoDViBDU= X-Received: by 2002:a2e:8915:: with SMTP id d21mr1474028lji.45.1632345352248; Wed, 22 Sep 2021 14:15:52 -0700 (PDT) Received: from mail-lf1-f41.google.com (mail-lf1-f41.google.com. [209.85.167.41]) by smtp.gmail.com with ESMTPSA id s14sm369789ljh.38.2021.09.22.14.15.49 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Wed, 22 Sep 2021 14:15:50 -0700 (PDT) Received: by mail-lf1-f41.google.com with SMTP id u8so16856927lff.9 for ; Wed, 22 Sep 2021 14:15:49 -0700 (PDT) X-Received: by 2002:a05:6512:12c4:: with SMTP id p4mr1044332lfg.280.1632345349597; Wed, 22 Sep 2021 14:15:49 -0700 (PDT) MIME-Version: 1.0 References: <20210909200948.090d4e213ca34b5ad1325a7e@linux-foundation.org> <20210910031046.G76dQvPhV%akpm@linux-foundation.org> <202109211630.2D00627@keescook> <202109211757.F38DF644@keescook> In-Reply-To: From: Linus Torvalds Date: Wed, 22 Sep 2021 14:15:33 -0700 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: function prototype element ordering To: Alexey Dobriyan Cc: Linux Kernel Mailing List , Joe Perches , 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" Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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. We don't put function return types on their own lines either, even if some other projects have that rule (just to get function names at the beginning of lines or some other odd reason). So no, attributes do not go on their own lines, and they also generally don't go before the thing they describe. Your examples are wrong, and explicitly against kernel rules. Linus