Received: by 2002:ac0:a594:0:0:0:0:0 with SMTP id m20-v6csp2266675imm; Sat, 12 May 2018 08:42:31 -0700 (PDT) X-Google-Smtp-Source: AB8JxZquIb5Kz7/CIYgFCSGs6pEU6kBHuPeUigt1mk/LiTTmta8mUzO4jGTQH05usV5A5wPMP13C X-Received: by 2002:a62:a096:: with SMTP id p22-v6mr3573937pfl.9.1526139750945; Sat, 12 May 2018 08:42:30 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1526139750; cv=none; d=google.com; s=arc-20160816; b=N5VblZdsGZbO68MYNa+ZfPxsKVIW/Pzh2xvUEvOel1hi7FCFkMV5mfctq+/nTnWpUk fhbFVE/WnDJSLIlG82229+tB/tR9/ZND3aNJPVKrxCXHL6i1H/YOjVD6+Fc73v7sPsgk 2diVQIifP/MF+Zs06gloujZfPKFI2X28Ipg1vJSPtlDqHrf5JY+STuO+KilPL3EsGhJn azxwpQfpg5VJwlXj1mjBv+vMXj1JtYoc2VjjVRusmu7jftr/5ektvxegTr4Tu70yCN/A g0uptnrDi7gSxxd2+PmcY0Cc5omhAZDKxyBpk4YM3upxaDYBtPGMEzcC3yagH6H9upJf 1BMw== 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:mime-version :references:in-reply-to:date:to:from:subject:message-id :arc-authentication-results; bh=XK029M1i5JBkcnZYKm0BJkPcNXGssKsd0/2kCebtIlc=; b=qQC9bMI3UuEEAvO6nnnIrVBvwXgdm0js8jATJNanPfipRCyHiaIgE9Z8cxWgqoP/wH oUYKkIkow2cgjgCcJuWOlYKNm1ERpDeZqAEQVAlnRBaMIAKO0h0e2pYTOrKBiuT/6y1S AC4xWdn2PQ4F97Vb2H9W9Ys1nUQELNGDuZRu8rUZmTJ6X50WVII9Yi61Gte0UVk5raZZ 9mNuF/Nr1psvaVgmeA5DUMKqR5/x0++/VjCNHI9NStuSNmsN09zdi3sJ9vrTz9mS6t+e KJmriL2BICBJtzteRDEZ7KAnYtlLNVvNdDa3JxnGY9BElP9QpOr35OTqP9V1buGm5eNA 65DQ== ARC-Authentication-Results: i=1; mx.google.com; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id 3-v6si5747585plt.98.2018.05.12.08.41.44; Sat, 12 May 2018 08:42:30 -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; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751806AbeELPlf (ORCPT + 99 others); Sat, 12 May 2018 11:41:35 -0400 Received: from smtprelay0086.hostedemail.com ([216.40.44.86]:44066 "EHLO smtprelay.hostedemail.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1751048AbeELPle (ORCPT ); Sat, 12 May 2018 11:41:34 -0400 Received: from filter.hostedemail.com (clb03-v110.bra.tucows.net [216.40.38.60]) by smtprelay03.hostedemail.com (Postfix) with ESMTP id 63A07837F243; Sat, 12 May 2018 15:41:33 +0000 (UTC) X-Session-Marker: 6A6F6540706572636865732E636F6D X-Spam-Summary: 2,0,0,,d41d8cd98f00b204,joe@perches.com,:::::,RULES_HIT:41:355:379:541:599:960:973:988:989:1260:1277:1311:1313:1314:1345:1359:1381:1437:1515:1516:1518:1534:1539:1593:1594:1711:1730:1747:1777:1792:2393:2559:2562:2828:3138:3139:3140:3141:3142:3352:3622:3865:3866:3867:3870:3871:3872:3874:4321:5007:10004:10400:10450:10455:10848:11026:11232:11658:11914:12296:12740:12760:12895:13069:13255:13311:13357:13439:14096:14097:14659:14721:19904:19999:21080:21326:21627:30054:30091,0,RBL:47.151.150.235:@perches.com:.lbl8.mailshell.net-62.8.0.100 64.201.201.201,CacheIP:none,Bayesian:0.5,0.5,0.5,Netcheck:none,DomainCache:0,MSF:not bulk,SPF:fn,MSBL:0,DNSBL:neutral,Custom_rules:0:0:0,LFtime:20,LUA_SUMMARY:none X-HE-Tag: ocean36_64c8e426eeb2d X-Filterd-Recvd-Size: 1598 Received: from XPS-9350.home (unknown [47.151.150.235]) (Authenticated sender: joe@perches.com) by omf04.hostedemail.com (Postfix) with ESMTPA; Sat, 12 May 2018 15:41:32 +0000 (UTC) Message-ID: <2d0127b079b8c9547519ee8c38a42042ad946d50.camel@perches.com> Subject: Re: [RFC: Coding Style] Best way to split a long function declaration with modifiers From: Joe Perches To: Igor Stoppa , Jonathan Corbet , linux-kernel@vger.kernel.org Date: Sat, 12 May 2018 08:41:31 -0700 In-Reply-To: <4fdc0980-d0af-3a02-02e7-0beed8ba05e2@gmail.com> References: <4fdc0980-d0af-3a02-02e7-0beed8ba05e2@gmail.com> Content-Type: text/plain; charset="ISO-8859-1" X-Mailer: Evolution 3.28.1-2 Mime-Version: 1.0 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Sat, 2018-05-12 at 18:19 +0300, Igor Stoppa wrote: > 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 think so. > 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. I think the first style should be preferred when the combined character length of is relatively long.