Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1306038

Re: [PATCH v3 3/3] checkpatch: add virt barriers

From "Michael S. Tsirkin" <mst@redhat.com>
Newsgroups linux.kernel
Subject Re: [PATCH v3 3/3] checkpatch: add virt barriers
Date 2016-01-11 11:40 +0100
Message-ID <qPI3h-13k-59@gated-at.bofh.it> (permalink)
References <qPu0h-8t1-9@gated-at.bofh.it> <qPu0h-8t1-17@gated-at.bofh.it> <qPwv7-1M9-7@gated-at.bofh.it> <qPx7P-1Zb-5@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


On Sun, Jan 10, 2016 at 02:52:16PM -0800, Joe Perches wrote:
> On Mon, 2016-01-11 at 09:13 +1100, Julian Calaby wrote:
> > On Mon, Jan 11, 2016 at 6:31 AM, Michael S. Tsirkin <mst@redhat.com> wrote:
> > > Add virt_ barriers to list of barriers to check for
> > > presence of a comment.
> []
> > > diff --git a/scripts/checkpatch.pl b/scripts/checkpatch.pl
> []
> > > @@ -5133,7 +5133,8 @@ sub process {
> > >                 }x;
> > >                 my $all_barriers = qr{
> > >                         $barriers|
> > > -                       smp_(?:$smp_barrier_stems)
> > > +                       smp_(?:$smp_barrier_stems)|
> > > +                       virt_(?:$smp_barrier_stems)
> > 
> > Sorry I'm late to the party here, but would it make sense to write this as:
> > 
> > (?:smp|virt)_(?:$smp_barrier_stems)
> 
> Yes.  Perhaps the name might be better as barrier_stems.
> 
> Also, ideally this would be longest match first or use \b
> after the matches so that $all_barriers could work
> successfully without a following \s*\(
> 
> my $all_barriers = qr{
> 	(?:smp|virt)_(?:barrier_stems)|
> 	$barriers)
> }x;
> 
> or maybe add separate $smp_barriers and $virt_barriers
> 
> <shrug>  it doesn't matter much in any case

OK just to clarify - are you OK with merging the patch as is?
Refactorings can come as patches on top if required.

-- 
MST

Back to linux.kernel | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

[PATCH v3 0/3] checkpatch: handling of memory barriers "Michael S. Tsirkin" <mst@redhat.com> - 2016-01-10 20:40 +0100
  [PATCH v3 3/3] checkpatch: add virt barriers "Michael S. Tsirkin" <mst@redhat.com> - 2016-01-10 20:40 +0100
    Re: [PATCH v3 3/3] checkpatch: add virt barriers Julian Calaby <julian.calaby@gmail.com> - 2016-01-10 23:20 +0100
      Re: [PATCH v3 3/3] checkpatch: add virt barriers Joe Perches <joe@perches.com> - 2016-01-11 00:00 +0100
        Re: [PATCH v3 3/3] checkpatch: add virt barriers "Michael S. Tsirkin" <mst@redhat.com> - 2016-01-11 11:40 +0100
          Re: [PATCH v3 3/3] checkpatch: add virt barriers Julian Calaby <julian.calaby@gmail.com> - 2016-01-11 11:50 +0100
            Re: [PATCH v3 3/3] checkpatch: add virt barriers "Michael S. Tsirkin" <mst@redhat.com> - 2016-01-11 12:00 +0100
  [PATCH v3 1/3] checkpatch.pl: add missing memory barriers "Michael S. Tsirkin" <mst@redhat.com> - 2016-01-10 20:40 +0100

csiph-web