Received: by 2002:ac0:a5a7:0:0:0:0:0 with SMTP id m36-v6csp629844imm; Fri, 27 Jul 2018 03:21:54 -0700 (PDT) X-Google-Smtp-Source: AAOMgpeVwWJOhUs8bwhyDllKejZbn+HSaBrP6QGpuz0lV/TSbDpJfYR2Rl2l+BOCJvqvfp4Bbp7o X-Received: by 2002:a17:902:aa8f:: with SMTP id d15-v6mr5586039plr.64.1532686914428; Fri, 27 Jul 2018 03:21:54 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1532686914; cv=none; d=google.com; s=arc-20160816; b=X8DFEjDMhdPGMO/4lQTFAi34FK/37Rl5L/93xVtutRdkVTi/u1h1u0kAoN4CG+yUBv CFzM3UgCkrLIiGRI+1KIfOSlsb/6tXzu3dYoAjVkgg7BDaHJuznz7BMr+y6jzkbVmjjQ a+d1NTgADyvwecjAVFbk1ZiwN2dHRy0Lo+61y9ZV601lLttLp8t0NwRJmdrWDZZbC0Nl OYDt73XF7NYfuk8tp7ixcpMmLQrEl5q9r++F8lLBj1KrxxcnPNvkqmIH0iICDDFIq2zi 2y7shNDzNSgNAQECjhnEfA64lULctuXDwhCtP3UlOKq44/rORBbWXtpafNWM+65rQavI V4fQ== 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 :content-language:accept-language:in-reply-to:references:message-id :date:thread-index:thread-topic:subject:to:from :arc-authentication-results; bh=Cehe4TpbybzWlQIFINmLQ7AIcOSuSEsrB+Mdu46iLNM=; b=Fd97wuGq6FqjFOW8zV7SW6UIpaVEat86pNvnDroi8/YS0jg8zlGaxWvy90+5SqGlP1 O0ZPpChkUE/+QJ9j7UE2lm1gZVU8cnzBb2DlRtvyipeGC0T0N9f7vUA44i5bfGpm/yJC gRXJEKcfTWh95w6UFNqHhquRQG9IsdNYca+AaQpae80ZCaS5wAvGlQItRG5MLdKx7e4n ysMR3K0RIjqFikZejiVpymI9JQ6Z7Ae7XG0x/+XT0C0ULHQZUBDb0GU/G5tHBKDMXi/S n2YbDlblKXvZt7EnFJRY+3H3cU8sMZiyAMwdVMC2pLltiP5XIcMFHEre4JmkbvoTP3wN CSXQ== 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 t10-v6si3190166plh.306.2018.07.27.03.21.37; Fri, 27 Jul 2018 03:21:54 -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 S1732143AbeG0LlQ convert rfc822-to-8bit (ORCPT + 99 others); Fri, 27 Jul 2018 07:41:16 -0400 Received: from eu-smtp-delivery-211.mimecast.com ([207.82.80.211]:40621 "EHLO eu-smtp-delivery-211.mimecast.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730244AbeG0LlP (ORCPT ); Fri, 27 Jul 2018 07:41:15 -0400 Received: from AcuMS.aculab.com (156.67.243.126 [156.67.243.126]) (Using TLS) by eu-smtp-1.mimecast.com with ESMTP id uk-mta-96-CY0F_BACMpiGhIxL7VMmiw-1; Fri, 27 Jul 2018 11:19:58 +0100 Received: from AcuMS.Aculab.com (fd9f:af1c:a25b::d117) by AcuMS.aculab.com (fd9f:af1c:a25b::d117) with Microsoft SMTP Server (TLS) id 15.0.1347.2; Fri, 27 Jul 2018 11:21:37 +0100 Received: from AcuMS.Aculab.com ([fe80::43c:695e:880f:8750]) by AcuMS.aculab.com ([fe80::43c:695e:880f:8750%12]) with mapi id 15.00.1347.000; Fri, 27 Jul 2018 11:21:37 +0100 From: David Laight To: 'Joe Perches' , 'Andrew Morton' , Andy Whitcroft , LKML Subject: RE: [RFC PATCH] checkpatch: check for function calls with struct or union on stack Thread-Topic: [RFC PATCH] checkpatch: check for function calls with struct or union on stack Thread-Index: AQHUJRcFUx4+BuOgSky66zuZVVqB+6Si1nhw///yOQCAABM5YA== Date: Fri, 27 Jul 2018 10:21:37 +0000 Message-ID: <9f0377fa74bd4964912ba5a4fc76526d@AcuMS.aculab.com> References: <1236369d28b2f1f5389ff652c4eb89e699e6481e.camel@perches.com> <20180726122533.104f6eea950853ef50ebc680@linux-foundation.org> <20180726122807.fad0566951e36d930edb6874@linux-foundation.org> <9d7441a14897426f8ed5befe8da0cad3@AcuMS.aculab.com> <0a6d2ecfacf3786228de664c8e01f6de10314c1b.camel@perches.com> In-Reply-To: <0a6d2ecfacf3786228de664c8e01f6de10314c1b.camel@perches.com> Accept-Language: en-GB, en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-ms-exchange-transport-fromentityheader: Hosted x-originating-ip: [10.202.205.33] MIME-Version: 1.0 X-MC-Unique: CY0F_BACMpiGhIxL7VMmiw-1 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8BIT Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Joe Perches > Sent: 27 July 2018 11:09 > On Fri, 2018-07-27 at 10:04 +0000, David Laight wrote: > > From: Andrew Morton > > > Sent: 26 July 2018 20:28 > > > On Thu, 26 Jul 2018 12:25:33 -0700 Andrew Morton wrote: > > > > > > > I'll give it a spin, see how noisy it is. > > > > > > Actually, I would prefer if the message, changelog and title > > > used the term "passed by value". It's a more familiar term > > > and it is possible for a passed-by-value aggregate to in fact > > > be passed in registers. > > > > You need to detect (and ignore) 'small' structures. > > checkpatch is stupid and basically can't do that > as it has no context other than the current line. > > It would need a list of specific struct types to > ignore. Care to create and send that list to me? Does it even have the type? If it has the prototype it could ignore aggregates that are marked 'const'. At least we're not in the K&R days where missing out the & got very confusing. David - Registered Address Lakeside, Bramley Road, Mount Farm, Milton Keynes, MK1 1PT, UK Registration No: 1397386 (Wales)