All of lore.kernel.org
 help / color / mirror / Atom feed
From: Joe Perches <joe@perches.com>
To: Andrew Morton <akpm@linux-foundation.org>
Cc: Andy Whitcroft <apw@canonical.com>, linux-kernel@vger.kernel.org
Subject: Re: [PATCH 2/3] checkpatch: Add error on use of attribute((weak)) or __weak
Date: Wed, 15 Oct 2014 12:45:48 -0700	[thread overview]
Message-ID: <1413402348.7484.8.camel@perches.com> (raw)
In-Reply-To: <20141015124225.01a4cad19c4f3a198efc996e@linux-foundation.org>

On Wed, 2014-10-15 at 12:42 -0700, Andrew Morton wrote:
> On Wed, 15 Oct 2014 12:32:08 -0700 Joe Perches <joe@perches.com> wrote:
> 
> > Using weak can have unintended link defects.
> > Emit an error on its use.
> 
> Well, we don't want a warning about use of __weak in function
> definitions.  Only in declarations.

Why is that?

> > --- a/scripts/checkpatch.pl
> > +++ b/scripts/checkpatch.pl
> > @@ -4671,6 +4671,14 @@ sub process {
> >  			}
> >  		}
> >  
> > +# Check for __attribute__ weak, or __weak (may have link issues)
> > +		if ($realfile !~ m@\binclude/uapi/@ &&
> 
> And this bit maybe is checking for use in a header file, which is not
> as good as checking for a declaration but is probably good enough. 
> However the "uapi" bit is confusing.
> 
> Can we have a better changelog please?

Suggestions?


  reply	other threads:[~2014-10-15 19:45 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-10-15 19:32 [PATCH 0/3] checkpatch: Miscellaneous cleanups Joe Perches
2014-10-15 19:32 ` [PATCH 1/3] checkpatch: Add an error test for no space before comma Joe Perches
2014-10-15 19:32 ` [PATCH 2/3] checkpatch: Add error on use of attribute((weak)) or __weak Joe Perches
2014-10-15 19:42   ` Andrew Morton
2014-10-15 19:45     ` Joe Perches [this message]
2014-10-15 19:50       ` Andrew Morton
2014-10-15 19:52         ` Joe Perches
2014-10-15 20:01           ` Andrew Morton
2014-10-15 20:46             ` [PATCH 2/3 V2] [PATCH] checkpatch: Add error on use of attribute((weak)) or __weak declarations Joe Perches
2014-10-15 19:32 ` [PATCH 3/3] checkpatch: Improve test for no space after cast 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=1413402348.7484.8.camel@perches.com \
    --to=joe@perches.com \
    --cc=akpm@linux-foundation.org \
    --cc=apw@canonical.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.