Skip to content

[doc,dma] Fix RANGE_REGWEN anchor in programmer's guide - #31007

Open
DanielMBouyou wants to merge 1 commit into
lowRISC:masterfrom
DanielMBouyou:doc-dma-fix-range-regwen-anchor
Open

[doc,dma] Fix RANGE_REGWEN anchor in programmer's guide#31007
DanielMBouyou wants to merge 1 commit into
lowRISC:masterfrom
DanielMBouyou:doc-dma-fix-range-regwen-anchor

Conversation

@DanielMBouyou

Copy link
Copy Markdown

hw/ip/dma/doc/programmers_guide.md line 12 links to registers.md#range_regwEN.

The heading that link targets is at hw/ip/dma/doc/registers.md line 328, ## RANGE_REGWEN. mdBook derives anchors from heading text by lowercasing, so the anchor generated for that heading is #range_regwen and the link as written does not match it. I have not run the documentation build to observe the generated anchor; that step is stated from the heading text and from this repository's existing convention, not from a rendered page.

No heading spelled that way has ever existed. git log --all -S"regwEN" --oneline -- hw/ip/dma/doc/registers.md returns no commits. git grep -n "range_regwEN" HEAD -- hw/ip/dma/ returns exactly one hit, hw/ip/dma/doc/programmers_guide.md:12, the line changed here.

The same file gets this right everywhere else. git show HEAD~1:hw/ip/dma/doc/programmers_guide.md | grep -o "registers\.md#[A-Za-z_0-9-]*" yields 37 links, of which 36 are entirely lowercase and this was the only one that was not. Three of the correct ones sit on the two lines immediately above, lines 10 and 11: #enabled_memory_range_base, #enabled_memory_range_limit and #range_valid.

The link was introduced in 775fcef, "[hw,dma,doc] Add DMA programmers guide".

Nothing was built, rendered, simulated or synthesised for this change.

Spotted, not fixed

Two further cases of the same kind, untouched here. I am happy to send them separately if you would like them.

  • hw/ip/csrng/doc/programmers_guide.md lines 42, 70 and 114 link to data/csrng.hjson, a path under doc/ that has never existed; the same three registers are linked correctly through registers.md#... a few lines above, on lines 37, 39, 68 and 108.
  • hw/ip/entropy_src/doc/theory_of_operation.md lines 74, 120 and 176 carry a stray trailing slash, programmers_guide.md/#... and interfaces.md/#.... That file also carries a second, separate defect, anchors in the legacy Hugo format, so it needs a wider fix than this one.

The link pointed at registers.md#range_regwEN, but the heading it
targets is "## RANGE_REGWEN" at registers.md:328, from which mdBook
derives the anchor #range_regwen. This is the only one of the 37
registers.md links in this file that is not lowercase; three correct
ones sit on the two lines immediately above.

Signed-off-by: Daniel M'BOUYOU <danielmbouyou@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant