Received: by 2002:ac0:a5a7:0:0:0:0:0 with SMTP id m36-v6csp614859imm; Fri, 27 Jul 2018 03:04:50 -0700 (PDT) X-Google-Smtp-Source: AAOMgpc95OvQ45qOLhOAo5CLHza8wGt6/Zdyst4XRVqG+CfUdEBo/4Xz+KST3zpxqNgEqCVgm00d X-Received: by 2002:a17:902:542:: with SMTP id 60-v6mr5538969plf.122.1532685890728; Fri, 27 Jul 2018 03:04:50 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1532685890; cv=none; d=google.com; s=arc-20160816; b=VEsPXGQFI//xsGeRyMaTr8wNfGL0SWg7TorhdmD6YueeC2U9W+UAFxYA8pQxuQCdBD 6PTlOampN6CqfKetqHySI7iH3HTIGUaSCWwxIhFgUYz7O/hVmBS/stOltYZo3N9gbbsQ 7Hotenxl96XHSNUg3XVnn/R5Xnjr/7jeuUlZogYr6eJoR5MJVyB9l60mTP7E7++Ye5Io TC0bWjJg0oBWRKzonK4hMyCzEhcnwCOqbnyfrNP+biKw9QoyavteYdz8c698zS0f8Owk y5gQ3R0cJkHu0f8MmwTOKPGh+MzusLVJTl2m/fmXMP+5XFLsC3UUnRJ54Yn+Ld1JSwj8 kA4g== 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=Yb46f1L/fPxEgdIG4fAp37LXPYuuvNsDunbvAtvqc90=; b=Xnm2T524jvWq2HUaKnV2Ke1xo0yQddV06zEIr/EG2HkbX1q6IiLjB0d+pWaFoeFMaQ RnkPF5uwnsF8Tow0VpfK0rK7nkJEgY8vxFJehnlY2LLAePS7hpzedBx+y314DKfm+a6e 5UJmOeB/k48tHH3n+FaIcj0rtFFyELf/UKNxzaS8JID85ZLpI8cXERKpN3nW5zahG2AX zbuHaAzaI9l1HtgnMdIDZpoxQi6db8JAxPn2hgA046t25YU7/BzBZYtzSUGxBWFRgapU Qq9urtEesEA7+hZXBFCKmsd5EtrnkQ119/ieg5sm7d3o8VZ0mTpmCop46qhz7Ongybxi 3ptQ== 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 c17-v6si3449262pge.273.2018.07.27.03.04.36; Fri, 27 Jul 2018 03:04:50 -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 S2389362AbeG0LY2 convert rfc822-to-8bit (ORCPT + 99 others); Fri, 27 Jul 2018 07:24:28 -0400 Received: from eu-smtp-delivery-211.mimecast.com ([146.101.78.211]:28204 "EHLO eu-smtp-delivery-211.mimecast.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2388562AbeG0LY2 (ORCPT ); Fri, 27 Jul 2018 07:24:28 -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-89-ojS13K8VPQCLTutgFW1spg-1; Fri, 27 Jul 2018 11:03:15 +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:04:54 +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:04:54 +0100 From: David Laight To: 'Andrew Morton' , Joe Perches , 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 Date: Fri, 27 Jul 2018 10:04:54 +0000 Message-ID: <9d7441a14897426f8ed5befe8da0cad3@AcuMS.aculab.com> References: <1236369d28b2f1f5389ff652c4eb89e699e6481e.camel@perches.com> <20180726122533.104f6eea950853ef50ebc680@linux-foundation.org> <20180726122807.fad0566951e36d930edb6874@linux-foundation.org> In-Reply-To: <20180726122807.fad0566951e36d930edb6874@linux-foundation.org> 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: ojS13K8VPQCLTutgFW1spg-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: 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. Quite a few ABI pass small structures by value in register(s) or directly on the stack. So it can make sense to encapsulate an integer value in a structure in order to get strong typing. It would, for instance, make sense to do that for user addresses. David - Registered Address Lakeside, Bramley Road, Mount Farm, Milton Keynes, MK1 1PT, UK Registration No: 1397386 (Wales)