Received: by 2002:ac0:a594:0:0:0:0:0 with SMTP id m20-v6csp2244551imm; Sat, 12 May 2018 08:20:03 -0700 (PDT) X-Google-Smtp-Source: AB8JxZrhzVKu94aDUdIN4h4zc6T6wPRpxARLiQW4QgdR0wh+Wq98soS1a/+3ZYS917YurHuaN1vN X-Received: by 2002:a63:18c:: with SMTP id 134-v6mr2983801pgb.138.1526138403199; Sat, 12 May 2018 08:20:03 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1526138403; cv=none; d=google.com; s=arc-20160816; b=IGMB84a5MTh/Uy1rmzIXK6PZS+46h7fEcDtVQ/Vf1chtbOaDDnQnIZchPVT4X1PKrw tOVbxs3cbP3wibOimXPGhw5ub//5Vug6M+XIEylZbbt6sZOVR/whAsDTD12++RnuiBnt fFuqM6tCt4bzab9nGPLuT40c8geri0l6MMpFLlNe9CD5tEx+5RTDJEAT5DyvFAr0NmbD KHqc05UmG4caDj6z5CZzZ/fI1EmmJPSCZbpRf/GErP2UQQt3d4OageYkJJLfiIpNJOzT 8YEKZVGAz+mW7N0J317WjBjg3xedqOztL4OhidA/G9CQCCanc/I/fvBx4ypeC8c8+fmE hRxg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding :content-language:mime-version:user-agent:date:message-id:subject :from:to:dkim-signature:arc-authentication-results; bh=uiXmNG+eCV30IPdjTOR+BHTjfgBJKfJzfSfcICVgdUo=; b=00kS/cOjlbcMpSHTW3dbvfgFUzJs72odrRq77H/tcEBxl5owrVhhmv/PnTu8q6Dh60 YnKvmkFaFCDYkrUWKS8jq/f1FIwnJNrdUvMwFXBnP5m1CjBVzA9SLxde4meIgXK4UWl3 2cuRX2/lrzrWO6kmpD6YrHtmH+nRmID06MdP455Gq5GId96uoHcdzKnXAxkICvBIodXn KQiC4JG4bpsnsEZKyZCD2T7apwB9U1OKTizoEjUDZhrCY50bmaY1IzjyXVdA8T0fGDzD /7BsNhenz40bqKn5hF7itrzVn3xRhUgyynWeHgGkYgxJ1jqzxLIlEZ3q+SuHS4hq2Rd9 jNsQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=j7Pyv0uz; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 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. [209.132.180.67]) by mx.google.com with ESMTP id z13-v6si6014669pfc.128.2018.05.12.08.19.35; Sat, 12 May 2018 08:20:03 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=j7Pyv0uz; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 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 S1751312AbeELPT0 (ORCPT + 99 others); Sat, 12 May 2018 11:19:26 -0400 Received: from mail-lf0-f41.google.com ([209.85.215.41]:41049 "EHLO mail-lf0-f41.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751033AbeELPTZ (ORCPT ); Sat, 12 May 2018 11:19:25 -0400 Received: by mail-lf0-f41.google.com with SMTP id m17-v6so6842253lfj.8 for ; Sat, 12 May 2018 08:19:24 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=to:from:subject:message-id:date:user-agent:mime-version :content-language:content-transfer-encoding; bh=uiXmNG+eCV30IPdjTOR+BHTjfgBJKfJzfSfcICVgdUo=; b=j7Pyv0uztKHuAwKv6BXj+3hMGuh92jRBKAtCfOcHJqbZqQ5jt6YlLk7whOghzU7LwO 65WMyxGqi7fcyhGAw+6D4Eze8ljRRUsGQA2EItC+s9M9Sgk1VfAp4WbecxAlGRGslHKn 3LjyxJdn7iJ0OobWNl+JWFObmFf4qARNMwnZgMsZaIgeBd1pKMlbLWqBsc7F9eoqvSCX BqXvrttcbK4GBiP5VOE0Whe8fJn1z/Sp60WLYxKFqOTZSvVOGd5Ei2ZUwgT9b5II8E2u MBbDv1aU4GfUGILxJVCicF/Kxi9HSWIzTc0IKbczcMHVZexQe++sTaTliBcyQuxOnAOQ CBLQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:to:from:subject:message-id:date:user-agent :mime-version:content-language:content-transfer-encoding; bh=uiXmNG+eCV30IPdjTOR+BHTjfgBJKfJzfSfcICVgdUo=; b=ny66UIA4iYowWaPOJLr572kCHrKaffKPrDbsyC+YqZH7aIjmzUKOOAxSoPIbiywfRo 2pd8mGtePnN5zojR54FQWtzSPAHW1NP+h44TWKAYUwOpL6YBOyFmIpqJLMbZagH3RhSp J2YlkwLtJe/MHN1GDEMtn48+1ZlpSIbfVBXGS+w8GsvPe7OjbPUsGFQhM1Egs9awo1mV l0/7igozz5+svC9n+3eKMSASybZ5yQWyxC9tSYuM208H9V1pkIymBpoqc1C5zWlrmfpk zu7gs3gETXPVkVCndgpUwmP2h9TKwBzvYgzABDrWWQBj6B/FVAXCzZzpCfNxxV45jhnv +4Kg== X-Gm-Message-State: ALKqPwfbbjtxTNb85C3JLsFbmxfwPQEmt0SzfNBOYbw/xHXkAn6b0ejs odWMjSbHm6WtSU+ILESk4qRYzAL7 X-Received: by 2002:a2e:81d0:: with SMTP id s16-v6mr1181219ljg.115.1526138363458; Sat, 12 May 2018 08:19:23 -0700 (PDT) Received: from [192.168.10.160] (91-159-63-40.elisa-laajakaista.fi. [91.159.63.40]) by smtp.gmail.com with ESMTPSA id x129-v6sm400828lff.51.2018.05.12.08.19.22 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sat, 12 May 2018 08:19:22 -0700 (PDT) To: Jonathan Corbet , linux-kernel@vger.kernel.org From: Igor Stoppa Subject: [RFC: Coding Style] Best way to split a long function declaration with modifiers Message-ID: <4fdc0980-d0af-3a02-02e7-0beed8ba05e2@gmail.com> Date: Sat, 12 May 2018 18:19:21 +0300 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.7.0 MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi, I have been wondering if it's ok to break a long (function declaration) line in the following way: static __always_inline struct foo_bar *__get_foo_bar(type1 parm1, type2 parm2, type3 parm3) instead of: static __always_inline struct foo_bar *__get_foo_bar(type1 parm1, type2 parm2, type3 parm3) I personally like more the former, not to mention that it uses also one line less, but it seems less common in the sources. The coding style references do not seem to say anything explicit about which style to prefer. And not all the code in the kernel is of the same quality, so finding an example doesn't automatically mean that it's a good practice to follow :-) -- thanks, igor