All of lore.kernel.org
 help / color / mirror / Atom feed
From: David Laight <David.Laight@ACULAB.COM>
To: 'Joe Perches' <joe@perches.com>,
	'Andrew Morton' <akpm@linux-foundation.org>,
	Andy Whitcroft <apw@canonical.com>,
	LKML <linux-kernel@vger.kernel.org>
Subject: RE: [RFC PATCH] checkpatch: check for function calls with struct or union on stack
Date: Fri, 27 Jul 2018 10:21:37 +0000	[thread overview]
Message-ID: <9f0377fa74bd4964912ba5a4fc76526d@AcuMS.aculab.com> (raw)
In-Reply-To: <0a6d2ecfacf3786228de664c8e01f6de10314c1b.camel@perches.com>

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 <akpm@linux-foundation.org> 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)


  reply	other threads:[~2018-07-27 10:20 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-07-26 18:27 [RFC PATCH] checkpatch: check for function calls with struct or union on stack Joe Perches
2018-07-26 19:25 ` Andrew Morton
2018-07-26 19:28   ` Andrew Morton
2018-07-26 20:05     ` Joe Perches
2018-07-26 20:38       ` Andrew Morton
2018-07-27 10:04     ` David Laight
2018-07-27 10:08       ` Joe Perches
2018-07-27 10:21         ` David Laight [this message]
2018-07-27 10:36           ` Joe Perches
2018-07-28  6:25             ` Julia Lawall
2018-07-28 17:14               ` Joe Perches
2018-07-28 17:24                 ` Julia Lawall
2018-07-28 17:20               ` Joe Perches

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=9f0377fa74bd4964912ba5a4fc76526d@AcuMS.aculab.com \
    --to=david.laight@aculab.com \
    --cc=akpm@linux-foundation.org \
    --cc=apw@canonical.com \
    --cc=joe@perches.com \
    --cc=linux-kernel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.