* Re: [PATCH v2 09/11] docs: Fix some broken references [not found] ` <Pine.LNX.4.44L0.1805091509100.1391-100000@iolanthe.rowland.org> @ 2018-06-14 14:23 ` Mauro Carvalho Chehab 2018-06-14 15:01 ` Andrea Parri 0 siblings, 1 reply; 2+ messages in thread From: Mauro Carvalho Chehab @ 2018-06-14 14:23 UTC (permalink / raw) To: Andrea Parri Cc: Alan Stern, Linux Doc Mailing List, Mauro Carvalho Chehab, linux-kernel, Jonathan Corbet Em Wed, 9 May 2018 15:11:07 -0400 (EDT) Alan Stern <stern@rowland.harvard.edu> escreveu: > On Wed, 9 May 2018, Mauro Carvalho Chehab wrote: > > > Em Wed, 9 May 2018 19:15:01 +0200 > > Andrea Parri <parri.andrea@gmail.com> escreveu: > > > > > tools/memory-model/README | 10 +++++----- > > > > > > As mentioned in the previous thread, I am for keeping the current > > > references: the REAMDE is listing the doc files, as well as other > > > files in tools/memory-model/, relatively to that directory. > > > > Yeah, at least this hunk deserves some rework, as now some > > references are Documentation/.../foo, while others are just > > bar. > > > > As on (almost) all other places (except for tools/memory-model/README), > > the references are always from the main directory, I would make all > > patches there also relative to main dir. If you're afraid of > > not being too clearer, we could prefix all of them with something > > like: > > > > ${LINUX}/tools/memory-model/... > > > > just like some DT binding files do: > > > > Documentation/devicetree/bindings/sound/audio-graph-card.txt:see ${LINUX}/Documentation/devicetree/bindings/graph.txt > > > > A bonus of doing that is that the broken reference detect script can > > keep parsing it without changes (well, it wouldn't be hard to make > > it also accept a relative file, but doing that just due to > > tools/memory-model/README seems overkill). > > > > Another advantage is that it would allow to easily add references > > there from the main kernel Documentation, if needed in the future, > > without messing with local x non-local relative namespace. > > How about changing the relative references so that something like > Documentation/recipes.txt becomes ./Documentation/recipes.txt? Thanks, Mauro After thinking a little bit about that, it should be easy to fix the tool to consider references relative to tools/.*/Documentation. I intend to send a new patch series with the changes to tools/memory-model/README removed from this patch and with the enclosed patch on it. Regards, Mauro [PATCH] scripts/documentation-file-ref-check: check tools/*/Documentation Some files, like tools/memory-model/README has references to a Documentation file that is locale to it. Handle references that are relative to them too. Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org> diff --git a/scripts/documentation-file-ref-check b/scripts/documentation-file-ref-check index 047f463cdf4b..078999a3fdff 100755 --- a/scripts/documentation-file-ref-check +++ b/scripts/documentation-file-ref-check @@ -78,6 +78,13 @@ while (<IN>) { # Check if exists, evaluating wildcards next if (grep -e, glob("$ref $fulref")); + # Accept relative Documentation patches for tools/ + if ($f =~ m/tools/) { + my $path = $f; + $path =~ s,(.*)/.*,$1,; + next if (grep -e, glob("$path/$ref $path/$fulref")); + } + if ($fix) { if (!($ref =~ m/(scripts|Kconfig|Kbuild)/)) { $broken_ref{$ref}++; -- To unsubscribe from this list: send the line "unsubscribe linux-doc" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html ^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH v2 09/11] docs: Fix some broken references 2018-06-14 14:23 ` [PATCH v2 09/11] docs: Fix some broken references Mauro Carvalho Chehab @ 2018-06-14 15:01 ` Andrea Parri 0 siblings, 0 replies; 2+ messages in thread From: Andrea Parri @ 2018-06-14 15:01 UTC (permalink / raw) To: Mauro Carvalho Chehab Cc: Alan Stern, Linux Doc Mailing List, Mauro Carvalho Chehab, linux-kernel, Jonathan Corbet On Thu, Jun 14, 2018 at 11:23:43AM -0300, Mauro Carvalho Chehab wrote: > Em Wed, 9 May 2018 15:11:07 -0400 (EDT) > Alan Stern <stern@rowland.harvard.edu> escreveu: > > > On Wed, 9 May 2018, Mauro Carvalho Chehab wrote: > > > > > Em Wed, 9 May 2018 19:15:01 +0200 > > > Andrea Parri <parri.andrea@gmail.com> escreveu: > > > > > > > tools/memory-model/README | 10 +++++----- > > > > > > > > As mentioned in the previous thread, I am for keeping the current > > > > references: the REAMDE is listing the doc files, as well as other > > > > files in tools/memory-model/, relatively to that directory. > > > > > > Yeah, at least this hunk deserves some rework, as now some > > > references are Documentation/.../foo, while others are just > > > bar. > > > > > > As on (almost) all other places (except for tools/memory-model/README), > > > the references are always from the main directory, I would make all > > > patches there also relative to main dir. If you're afraid of > > > not being too clearer, we could prefix all of them with something > > > like: > > > > > > ${LINUX}/tools/memory-model/... > > > > > > just like some DT binding files do: > > > > > > Documentation/devicetree/bindings/sound/audio-graph-card.txt:see ${LINUX}/Documentation/devicetree/bindings/graph.txt > > > > > > A bonus of doing that is that the broken reference detect script can > > > keep parsing it without changes (well, it wouldn't be hard to make > > > it also accept a relative file, but doing that just due to > > > tools/memory-model/README seems overkill). > > > > > > Another advantage is that it would allow to easily add references > > > there from the main kernel Documentation, if needed in the future, > > > without messing with local x non-local relative namespace. > > > > How about changing the relative references so that something like > > Documentation/recipes.txt becomes ./Documentation/recipes.txt? > > Thanks, > Mauro > > After thinking a little bit about that, it should be easy to fix the > tool to consider references relative to tools/.*/Documentation. > > I intend to send a new patch series with the changes to > tools/memory-model/README removed from this patch and with the enclosed > patch on it. LGTM, thanks! Andrea > > Regards, > Mauro > > [PATCH] scripts/documentation-file-ref-check: check > tools/*/Documentation > > Some files, like tools/memory-model/README has references to > a Documentation file that is locale to it. Handle references > that are relative to them too. > > Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org> > > diff --git a/scripts/documentation-file-ref-check b/scripts/documentation-file-ref-check > index 047f463cdf4b..078999a3fdff 100755 > --- a/scripts/documentation-file-ref-check > +++ b/scripts/documentation-file-ref-check > @@ -78,6 +78,13 @@ while (<IN>) { > # Check if exists, evaluating wildcards > next if (grep -e, glob("$ref $fulref")); > > + # Accept relative Documentation patches for tools/ > + if ($f =~ m/tools/) { > + my $path = $f; > + $path =~ s,(.*)/.*,$1,; > + next if (grep -e, glob("$path/$ref $path/$fulref")); > + } > + > if ($fix) { > if (!($ref =~ m/(scripts|Kconfig|Kbuild)/)) { > $broken_ref{$ref}++; -- To unsubscribe from this list: send the line "unsubscribe linux-doc" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html ^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2018-06-14 15:01 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <20180509152045.722f0c51@vento.lan>
[not found] ` <Pine.LNX.4.44L0.1805091509100.1391-100000@iolanthe.rowland.org>
2018-06-14 14:23 ` [PATCH v2 09/11] docs: Fix some broken references Mauro Carvalho Chehab
2018-06-14 15:01 ` Andrea Parri
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for NNTP newsgroup(s).