linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/3] Additional doc warning fixes for issues at next-20200915
@ 2020-09-17  8:04 Mauro Carvalho Chehab
  2020-09-17  8:04 ` [PATCH 1/3] docs: kasan.rst: add two missing blank lines Mauro Carvalho Chehab
                   ` (2 more replies)
  0 siblings, 3 replies; 6+ messages in thread
From: Mauro Carvalho Chehab @ 2020-09-17  8:04 UTC (permalink / raw)
  To: Linux Doc Mailing List
  Cc: Mauro Carvalho Chehab, linux-kernel, Jonathan Corbet,
	Matthew Wilcox (Oracle),
	Alexander Potapenko, Alexei Starovoitov, Andreas Gruenbacher,
	Andrew Morton, Andrey Ryabinin, Andrii Nakryiko, Daniel Borkmann,
	Dmitry Vyukov, Guoqing Jiang, Jens Axboe, Johannes Weiner,
	John Fastabend, KP Singh, Martin KaFai Lau, Song Liu,
	Stephen Rothwell, William Kucharski, Yang Shi, Yonghong Song,
	bpf, kasan-dev, netdev

There are a couple of new warnings introduced at linux-next.

This small patch series address them.

The complete series addressing (almost) all doc warnings is at:

	https://git.linuxtv.org/mchehab/experimental.git/log/?h=doc-fixes

I'll keep rebasing such tree until we get rid of all doc warnings upstream,
hopefully in time for Kernel 5.10.

Mauro Carvalho Chehab (3):
  docs: kasan.rst: add two missing blank lines
  mm: pagemap.h: fix two kernel-doc markups
  docs: bpf: ringbuf.rst: fix a broken cross-reference

 Documentation/bpf/ringbuf.rst     | 2 +-
 Documentation/dev-tools/kasan.rst | 2 ++
 include/linux/pagemap.h           | 8 ++++----
 3 files changed, 7 insertions(+), 5 deletions(-)

-- 
2.26.2



^ permalink raw reply	[flat|nested] 6+ messages in thread

* [PATCH 1/3] docs: kasan.rst: add two missing blank lines
  2020-09-17  8:04 [PATCH 0/3] Additional doc warning fixes for issues at next-20200915 Mauro Carvalho Chehab
@ 2020-09-17  8:04 ` Mauro Carvalho Chehab
  2020-09-18 11:44   ` Andrey Konovalov
  2020-09-17  8:04 ` [PATCH 2/3] mm: pagemap.h: fix two kernel-doc markups Mauro Carvalho Chehab
  2020-09-17  8:04 ` [PATCH 3/3] docs: bpf: ringbuf.rst: fix a broken cross-reference Mauro Carvalho Chehab
  2 siblings, 1 reply; 6+ messages in thread
From: Mauro Carvalho Chehab @ 2020-09-17  8:04 UTC (permalink / raw)
  To: Linux Doc Mailing List
  Cc: Mauro Carvalho Chehab, Jonathan Corbet, Alexander Potapenko,
	Andrey Ryabinin, Dmitry Vyukov, kasan-dev, linux-kernel

literal blocks should start and end with a blank line,
as otherwise the parser complains and may do the wrong
thing, as warned by Sphinx:

	Documentation/dev-tools/kasan.rst:298: WARNING: Literal block ends without a blank line; unexpected unindent.
	Documentation/dev-tools/kasan.rst:303: WARNING: Literal block ends without a blank line; unexpected unindent.

Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
---
 Documentation/dev-tools/kasan.rst | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/Documentation/dev-tools/kasan.rst b/Documentation/dev-tools/kasan.rst
index c09c9ca2ff1c..2b68addaadcd 100644
--- a/Documentation/dev-tools/kasan.rst
+++ b/Documentation/dev-tools/kasan.rst
@@ -295,11 +295,13 @@ print the number of the test and the status of the test:
 pass::
 
         ok 28 - kmalloc_double_kzfree
+
 or, if kmalloc failed::
 
         # kmalloc_large_oob_right: ASSERTION FAILED at lib/test_kasan.c:163
         Expected ptr is not null, but is
         not ok 4 - kmalloc_large_oob_right
+
 or, if a KASAN report was expected, but not found::
 
         # kmalloc_double_kzfree: EXPECTATION FAILED at lib/test_kasan.c:629
-- 
2.26.2


^ permalink raw reply related	[flat|nested] 6+ messages in thread

* [PATCH 2/3] mm: pagemap.h: fix two kernel-doc markups
  2020-09-17  8:04 [PATCH 0/3] Additional doc warning fixes for issues at next-20200915 Mauro Carvalho Chehab
  2020-09-17  8:04 ` [PATCH 1/3] docs: kasan.rst: add two missing blank lines Mauro Carvalho Chehab
@ 2020-09-17  8:04 ` Mauro Carvalho Chehab
  2020-09-17  8:04 ` [PATCH 3/3] docs: bpf: ringbuf.rst: fix a broken cross-reference Mauro Carvalho Chehab
  2 siblings, 0 replies; 6+ messages in thread
From: Mauro Carvalho Chehab @ 2020-09-17  8:04 UTC (permalink / raw)
  To: Linux Doc Mailing List
  Cc: Mauro Carvalho Chehab, Jonathan Corbet, Matthew Wilcox (Oracle),
	Andreas Gruenbacher, Andrew Morton, Guoqing Jiang, Jens Axboe,
	Johannes Weiner, Stephen Rothwell, William Kucharski, Yang Shi,
	linux-kernel

Changeset 6c8adf8446a3 ("mm: add find_lock_head") renamed the
index parameter, but forgot to update the kernel-doc markups
accordingly.

Fixes: 6c8adf8446a3 ("mm: add find_lock_head")
Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
---
 include/linux/pagemap.h | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/include/linux/pagemap.h b/include/linux/pagemap.h
index 4e52a3ff92fb..965ee92df1ad 100644
--- a/include/linux/pagemap.h
+++ b/include/linux/pagemap.h
@@ -308,9 +308,9 @@ static inline struct page *find_get_page_flags(struct address_space *mapping,
 /**
  * find_lock_page - locate, pin and lock a pagecache page
  * @mapping: the address_space to search
- * @offset: the page index
+ * @index: the page index
  *
- * Looks up the page cache entry at @mapping & @offset.  If there is a
+ * Looks up the page cache entry at @mapping & @index.  If there is a
  * page cache page, it is returned locked and with an increased
  * refcount.
  *
@@ -327,9 +327,9 @@ static inline struct page *find_lock_page(struct address_space *mapping,
 /**
  * find_lock_head - Locate, pin and lock a pagecache page.
  * @mapping: The address_space to search.
- * @offset: The page index.
+ * @index: The page index.
  *
- * Looks up the page cache entry at @mapping & @offset.  If there is a
+ * Looks up the page cache entry at @mapping & @index.  If there is a
  * page cache page, its head page is returned locked and with an increased
  * refcount.
  *
-- 
2.26.2


^ permalink raw reply related	[flat|nested] 6+ messages in thread

* [PATCH 3/3] docs: bpf: ringbuf.rst: fix a broken cross-reference
  2020-09-17  8:04 [PATCH 0/3] Additional doc warning fixes for issues at next-20200915 Mauro Carvalho Chehab
  2020-09-17  8:04 ` [PATCH 1/3] docs: kasan.rst: add two missing blank lines Mauro Carvalho Chehab
  2020-09-17  8:04 ` [PATCH 2/3] mm: pagemap.h: fix two kernel-doc markups Mauro Carvalho Chehab
@ 2020-09-17  8:04 ` Mauro Carvalho Chehab
  2020-09-17 14:57   ` Alexei Starovoitov
  2 siblings, 1 reply; 6+ messages in thread
From: Mauro Carvalho Chehab @ 2020-09-17  8:04 UTC (permalink / raw)
  To: Linux Doc Mailing List
  Cc: Mauro Carvalho Chehab, Jonathan Corbet, Alexei Starovoitov,
	Andrii Nakryiko, Daniel Borkmann, John Fastabend, KP Singh,
	Martin KaFai Lau, Song Liu, Yonghong Song, bpf, linux-kernel,
	netdev

Sphinx warns about a broken cross-reference:

	Documentation/bpf/ringbuf.rst:194: WARNING: Unknown target name: "bench_ringbufs.c".

It seems that the original idea were to add a reference for this file:

	tools/testing/selftests/bpf/benchs/bench_ringbufs.c

However, this won't work as such file is not part of the
documentation output dir. It could be possible to use
an extension like interSphinx in order to make external
references to be pointed to some website (like kernel.org),
where the file is stored, but currently we don't use it.

It would also be possible to include this file as a
literal include, placing it inside Documentation/bpf.

For now, let's take the simplest approach: just drop
the "_" markup at the end of the reference. This
should solve the warning, and it sounds quite obvious
that the file to see is at the Kernel tree.

Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
---
 Documentation/bpf/ringbuf.rst | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/Documentation/bpf/ringbuf.rst b/Documentation/bpf/ringbuf.rst
index 4d4f3bcb1477..6a615cd62bda 100644
--- a/Documentation/bpf/ringbuf.rst
+++ b/Documentation/bpf/ringbuf.rst
@@ -197,7 +197,7 @@ a self-pacing notifications of new data being availability.
 being available after commit only if consumer has already caught up right up to
 the record being committed. If not, consumer still has to catch up and thus
 will see new data anyways without needing an extra poll notification.
-Benchmarks (see tools/testing/selftests/bpf/benchs/bench_ringbufs.c_) show that
+Benchmarks (see tools/testing/selftests/bpf/benchs/bench_ringbufs.c) show that
 this allows to achieve a very high throughput without having to resort to
 tricks like "notify only every Nth sample", which are necessary with perf
 buffer. For extreme cases, when BPF program wants more manual control of
-- 
2.26.2


^ permalink raw reply related	[flat|nested] 6+ messages in thread

* Re: [PATCH 3/3] docs: bpf: ringbuf.rst: fix a broken cross-reference
  2020-09-17  8:04 ` [PATCH 3/3] docs: bpf: ringbuf.rst: fix a broken cross-reference Mauro Carvalho Chehab
@ 2020-09-17 14:57   ` Alexei Starovoitov
  0 siblings, 0 replies; 6+ messages in thread
From: Alexei Starovoitov @ 2020-09-17 14:57 UTC (permalink / raw)
  To: Mauro Carvalho Chehab
  Cc: Linux Doc Mailing List, Jonathan Corbet, Alexei Starovoitov,
	Andrii Nakryiko, Daniel Borkmann, John Fastabend, KP Singh,
	Martin KaFai Lau, Song Liu, Yonghong Song, bpf, LKML,
	Network Development

On Thu, Sep 17, 2020 at 1:04 AM Mauro Carvalho Chehab
<mchehab+huawei@kernel.org> wrote:
>
> Sphinx warns about a broken cross-reference:
>
>         Documentation/bpf/ringbuf.rst:194: WARNING: Unknown target name: "bench_ringbufs.c".
>
> It seems that the original idea were to add a reference for this file:
>
>         tools/testing/selftests/bpf/benchs/bench_ringbufs.c
>
> However, this won't work as such file is not part of the
> documentation output dir. It could be possible to use
> an extension like interSphinx in order to make external
> references to be pointed to some website (like kernel.org),
> where the file is stored, but currently we don't use it.
>
> It would also be possible to include this file as a
> literal include, placing it inside Documentation/bpf.
>
> For now, let's take the simplest approach: just drop
> the "_" markup at the end of the reference. This
> should solve the warning, and it sounds quite obvious
> that the file to see is at the Kernel tree.
>
> Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
> ---
>  Documentation/bpf/ringbuf.rst | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/Documentation/bpf/ringbuf.rst b/Documentation/bpf/ringbuf.rst
> index 4d4f3bcb1477..6a615cd62bda 100644
> --- a/Documentation/bpf/ringbuf.rst
> +++ b/Documentation/bpf/ringbuf.rst
> @@ -197,7 +197,7 @@ a self-pacing notifications of new data being availability.
>  being available after commit only if consumer has already caught up right up to
>  the record being committed. If not, consumer still has to catch up and thus
>  will see new data anyways without needing an extra poll notification.
> -Benchmarks (see tools/testing/selftests/bpf/benchs/bench_ringbufs.c_) show that
> +Benchmarks (see tools/testing/selftests/bpf/benchs/bench_ringbufs.c) show that

This fix already landed in bpf and net trees.
Did you miss it?

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH 1/3] docs: kasan.rst: add two missing blank lines
  2020-09-17  8:04 ` [PATCH 1/3] docs: kasan.rst: add two missing blank lines Mauro Carvalho Chehab
@ 2020-09-18 11:44   ` Andrey Konovalov
  0 siblings, 0 replies; 6+ messages in thread
From: Andrey Konovalov @ 2020-09-18 11:44 UTC (permalink / raw)
  To: Mauro Carvalho Chehab
  Cc: Linux Doc Mailing List, Jonathan Corbet, Alexander Potapenko,
	Andrey Ryabinin, Dmitry Vyukov, kasan-dev, LKML

On Thu, Sep 17, 2020 at 10:04 AM Mauro Carvalho Chehab
<mchehab+huawei@kernel.org> wrote:
>
> literal blocks should start and end with a blank line,
> as otherwise the parser complains and may do the wrong
> thing, as warned by Sphinx:
>
>         Documentation/dev-tools/kasan.rst:298: WARNING: Literal block ends without a blank line; unexpected unindent.
>         Documentation/dev-tools/kasan.rst:303: WARNING: Literal block ends without a blank line; unexpected unindent.
>
> Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
> ---
>  Documentation/dev-tools/kasan.rst | 2 ++
>  1 file changed, 2 insertions(+)
>
> diff --git a/Documentation/dev-tools/kasan.rst b/Documentation/dev-tools/kasan.rst
> index c09c9ca2ff1c..2b68addaadcd 100644
> --- a/Documentation/dev-tools/kasan.rst
> +++ b/Documentation/dev-tools/kasan.rst
> @@ -295,11 +295,13 @@ print the number of the test and the status of the test:
>  pass::
>
>          ok 28 - kmalloc_double_kzfree
> +
>  or, if kmalloc failed::
>
>          # kmalloc_large_oob_right: ASSERTION FAILED at lib/test_kasan.c:163
>          Expected ptr is not null, but is
>          not ok 4 - kmalloc_large_oob_right
> +
>  or, if a KASAN report was expected, but not found::
>
>          # kmalloc_double_kzfree: EXPECTATION FAILED at lib/test_kasan.c:629

Reviewed-by: Andrey Konovalov <andreyknvl@google.com>

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2020-09-18 11:44 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-09-17  8:04 [PATCH 0/3] Additional doc warning fixes for issues at next-20200915 Mauro Carvalho Chehab
2020-09-17  8:04 ` [PATCH 1/3] docs: kasan.rst: add two missing blank lines Mauro Carvalho Chehab
2020-09-18 11:44   ` Andrey Konovalov
2020-09-17  8:04 ` [PATCH 2/3] mm: pagemap.h: fix two kernel-doc markups Mauro Carvalho Chehab
2020-09-17  8:04 ` [PATCH 3/3] docs: bpf: ringbuf.rst: fix a broken cross-reference Mauro Carvalho Chehab
2020-09-17 14:57   ` Alexei Starovoitov

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).