search for: all_barri

Displaying 20 results from an estimated 27 matches for "all_barri".

2016 Jan 04
4
[PATCH 1/3] checkpatch.pl: add missing memory barriers
...9;, 'smp_load_acquire', 'smp_store_mb'); > + > + @smp_barriers = (@smp_barriers, map {"smp_" . $_} @barriers); I think using map, which so far checkpatch doesn't use, makes smp_barriers harder to understand and it'd be better to enumerate them. > + my $all_barriers = join('|', (@barriers, @smp_barriers)); > + > + if ($line =~ /\b($all_barriers)\(/) { It would be better to use /\b$all_barriers\s*\(/ as there's no reason for the capture and there could be a space between the function and the open parenthesis. > ? if (!ctx_has_comme...
2016 Jan 04
4
[PATCH 1/3] checkpatch.pl: add missing memory barriers
...9;, 'smp_load_acquire', 'smp_store_mb'); > + > + @smp_barriers = (@smp_barriers, map {"smp_" . $_} @barriers); I think using map, which so far checkpatch doesn't use, makes smp_barriers harder to understand and it'd be better to enumerate them. > + my $all_barriers = join('|', (@barriers, @smp_barriers)); > + > + if ($line =~ /\b($all_barriers)\(/) { It would be better to use /\b$all_barriers\s*\(/ as there's no reason for the capture and there could be a space between the function and the open parenthesis. > ? if (!ctx_has_comme...
2016 Jan 11
2
[PATCH v3 3/3] checkpatch: add virt barriers
...dd 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...
2016 Jan 11
2
[PATCH v3 3/3] checkpatch: add virt barriers
...dd 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...
2016 Jan 10
3
[PATCH v2 1/3] checkpatch.pl: add missing memory barriers
...arriers, not to have to prefix it with smp_ before using it. my $smp_barriers = qr{ smp_store_release| smp_load_acquire| smp_store_mb| smp_read_barrier_depends }x; or my $smp_barriers = qr{ smp_(?:store_release|load_acquire|store_mb|read_barrier_depends) }x; ? > + my $all_barriers = qr{ > + $barriers| > + smp_($smp_barriers) > + }x; And this shouldn't have a capture group. my $all_barriers = qr{ $barriers| $smp_barriers }x; > + > + if ($line =~ /\b($all_barriers)\s*\(/) { This doesn't need the capture group either (?:all_barrier...
2016 Jan 10
3
[PATCH v2 1/3] checkpatch.pl: add missing memory barriers
...arriers, not to have to prefix it with smp_ before using it. my $smp_barriers = qr{ smp_store_release| smp_load_acquire| smp_store_mb| smp_read_barrier_depends }x; or my $smp_barriers = qr{ smp_(?:store_release|load_acquire|store_mb|read_barrier_depends) }x; ? > + my $all_barriers = qr{ > + $barriers| > + smp_($smp_barriers) > + }x; And this shouldn't have a capture group. my $all_barriers = qr{ $barriers| $smp_barriers }x; > + > + if ($line =~ /\b($all_barriers)\s*\(/) { This doesn't need the capture group either (?:all_barrier...
2016 Jan 10
2
[PATCH v3 3/3] checkpatch: add virt barriers
...hanged, 2 insertions(+), 1 deletion(-) > > diff --git a/scripts/checkpatch.pl b/scripts/checkpatch.pl > index 15cfca4..4466579 100755 > --- 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:...
2016 Jan 10
2
[PATCH v3 3/3] checkpatch: add virt barriers
...hanged, 2 insertions(+), 1 deletion(-) > > diff --git a/scripts/checkpatch.pl b/scripts/checkpatch.pl > index 15cfca4..4466579 100755 > --- 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:...
2016 Jan 04
5
[PATCH 0/3] checkpatch: handling of memory barriers
As part of memory barrier cleanup, this patchset extends checkpatch to make it easier to stop incorrect memory barrier usage. This applies on top of my series arch: barrier cleanup + barriers for virt and will be included in the next version of the series. Michael S. Tsirkin (3): checkpatch.pl: add missing memory barriers checkpatch: check for __smp outside barrier.h checkpatch: add virt
2016 Jan 04
5
[PATCH 0/3] checkpatch: handling of memory barriers
As part of memory barrier cleanup, this patchset extends checkpatch to make it easier to stop incorrect memory barrier usage. This applies on top of my series arch: barrier cleanup + barriers for virt and will be included in the next version of the series. Michael S. Tsirkin (3): checkpatch.pl: add missing memory barriers checkpatch: check for __smp outside barrier.h checkpatch: add virt
2016 Jan 10
5
[PATCH v2 0/3] checkpatch: handling of memory barriers
As part of memory barrier cleanup, this patchset extends checkpatch to make it easier to stop incorrect memory barrier usage. This applies on top of my series arch: barrier cleanup + barriers for virt and will be included in the next version of the series. Changes from v2: catch optional\s* before () in barriers rewrite using qr{} instead of map Michael S. Tsirkin (3): checkpatch.pl: add
2016 Jan 10
5
[PATCH v2 0/3] checkpatch: handling of memory barriers
As part of memory barrier cleanup, this patchset extends checkpatch to make it easier to stop incorrect memory barrier usage. This applies on top of my series arch: barrier cleanup + barriers for virt and will be included in the next version of the series. Changes from v2: catch optional\s* before () in barriers rewrite using qr{} instead of map Michael S. Tsirkin (3): checkpatch.pl: add
2016 Jan 04
0
[PATCH 1/3] checkpatch.pl: add missing memory barriers
On Mon, Jan 04, 2016 at 08:07:40AM -0800, Joe Perches wrote: > On Mon, 2016-01-04 at 13:36 +0200, Michael S. Tsirkin wrote: > > + my $all_barriers = join('|', (@barriers, @smp_barriers)); > > + > > + if ($line =~ /\b($all_barriers)\(/) { > > It would be better to use /\b$all_barriers\s*\(/ > as there's no reason for the capture and there > could be a space between the function and the > open parenth...
2016 Jan 10
4
[PATCH v3 0/3] checkpatch: handling of memory barriers
As part of memory barrier cleanup, this patchset extends checkpatch to make it easier to stop incorrect memory barrier usage. This replaces the checkpatch patches in my series arch: barrier cleanup + barriers for virt and will be included in the next version of the series. changes from v2: address comments by Joe Perches: use (?: ... ) to avoid unnecessary capture groups rename smp_barriers
2016 Jan 10
4
[PATCH v3 0/3] checkpatch: handling of memory barriers
As part of memory barrier cleanup, this patchset extends checkpatch to make it easier to stop incorrect memory barrier usage. This replaces the checkpatch patches in my series arch: barrier cleanup + barriers for virt and will be included in the next version of the series. changes from v2: address comments by Joe Perches: use (?: ... ) to avoid unnecessary capture groups rename smp_barriers
2016 Jan 04
0
[PATCH 3/3] checkpatch: add virt barriers
...d9..5fb6ef7 100755 --- a/scripts/checkpatch.pl +++ b/scripts/checkpatch.pl @@ -5121,7 +5121,8 @@ sub process { my @smp_barriers = ('smp_store_release', 'smp_load_acquire', 'smp_store_mb'); @smp_barriers = (@smp_barriers, map {"smp_" . $_} @barriers); - my $all_barriers = join('|', (@barriers, @smp_barriers)); + my @virt_barriers = map {my $l = $_; $l =~ s/smp_/virt_/; $l} @smp_barriers; + my $all_barriers = join('|', (@barriers, @smp_barriers, @virt_barriers)); if ($line =~ /\b($all_barriers)\(/) { if (!ctx_has_comment($first_line, $...
2016 Jan 04
0
[PATCH 1/3] checkpatch.pl: add missing memory barriers
...gt; + @smp_barriers = (@smp_barriers, map {"smp_" . $_} @barriers); > > I think using map, which so far checkpatch doesn't use, > makes smp_barriers harder to understand and it'd be > better to enumerate them. Okay - I'll rewrite using foreach. > > + my $all_barriers = join('|', (@barriers, @smp_barriers)); > > + > > + if ($line =~ /\b($all_barriers)\(/) { > > It would be better to use /\b$all_barriers\s*\(/ > as there's no reason for the capture and there > could be a space between the function and the > open parenth...
2016 Jan 10
0
[PATCH v3 3/3] checkpatch: add virt barriers
...t 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 i...
2016 Jan 11
0
[PATCH v3 3/3] checkpatch: add virt barriers
...; > > 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) >...
2016 Jan 11
0
[PATCH v3 3/3] checkpatch: add virt barriers
...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) >> > >> &...