diff mbox

[media] doc-rst: Fix some Sphinx warnings

Message ID d612024e7d2acd7ec82c75b5fed271fd61673386.1469017917.git.mchehab@s-opensource.com (mailing list archive)
State New, archived
Headers show

Commit Message

Mauro Carvalho Chehab July 20, 2016, 12:32 p.m. UTC
Fix all remaining media warnings with ReST that are fixable
without changing at the Sphinx code.

Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
---
 Documentation/media/v4l-drivers/cx88.rst            | 1 +
 Documentation/media/v4l-drivers/tm6000-cardlist.rst | 2 +-
 drivers/media/dvb-core/dvb_math.h                   | 7 +++++++
 include/media/media-entity.h                        | 6 ++++--
 4 files changed, 13 insertions(+), 3 deletions(-)

Comments

Mauro Carvalho Chehab July 20, 2016, 1 p.m. UTC | #1
Em Wed, 20 Jul 2016 09:32:15 -0300
Mauro Carvalho Chehab <mchehab@s-opensource.com> escreveu:

> Fix all remaining media warnings with ReST that are fixable
> without changing at the Sphinx code.
> 

> diff --git a/include/media/media-entity.h b/include/media/media-entity.h
> index 83877719bef4..3d885d97d149 100644
> --- a/include/media/media-entity.h
> +++ b/include/media/media-entity.h
> @@ -180,8 +180,10 @@ struct media_pad {
>   *			view. The media_entity_pipeline_start() function
>   *			validates all links by calling this operation. Optional.
>   *
> - * .. note:: Those these callbacks are called with struct media_device.@graph_mutex
> - * mutex held.
> + * .. note::
> + *
> + *    Those these callbacks are called with struct media_device.@graph_mutex
> + *    mutex held.
>   */

The kernel-doc script did something wrong here... something bad
happened with "@graph_mutex". While it is showing the note box
properly, the message inside is:

	"Note

	 Those these callbacks are called with struct media_device.**graph_mutex** mutex held."


E. g. it converted @ to "**graph_mutex**" and some code seemed to
change it to: "\*\*graph_mutex\*\*", as this message is not showing
with a bold font, but, instead, with the double asterisks.

No idea how to fix it.

Thanks,
Mauro
--
To unsubscribe from this list: send the line "unsubscribe linux-media" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Markus Heiser July 20, 2016, 1:14 p.m. UTC | #2
Am 20.07.2016 um 15:00 schrieb Mauro Carvalho Chehab <mchehab@s-opensource.com>:

> Em Wed, 20 Jul 2016 09:32:15 -0300
> Mauro Carvalho Chehab <mchehab@s-opensource.com> escreveu:
> 
>> Fix all remaining media warnings with ReST that are fixable
>> without changing at the Sphinx code.
>> 
> 
>> diff --git a/include/media/media-entity.h b/include/media/media-entity.h
>> index 83877719bef4..3d885d97d149 100644
>> --- a/include/media/media-entity.h
>> +++ b/include/media/media-entity.h
>> @@ -180,8 +180,10 @@ struct media_pad {
>> *			view. The media_entity_pipeline_start() function
>> *			validates all links by calling this operation. Optional.
>> *
>> - * .. note:: Those these callbacks are called with struct media_device.@graph_mutex
>> - * mutex held.
>> + * .. note::
>> + *
>> + *    Those these callbacks are called with struct media_device.@graph_mutex
>> + *    mutex held.
>> */
> 
> The kernel-doc script did something wrong here... something bad
> happened with "@graph_mutex". While it is showing the note box
> properly, the message inside is:
> 
> 	"Note
> 
> 	 Those these callbacks are called with struct media_device.**graph_mutex** mutex held."
> 
> 
> E. g. it converted @ to "**graph_mutex**" and some code seemed to
> change it to: "\*\*graph_mutex\*\*", as this message is not showing
> with a bold font, but, instead, with the double asterisks.
> 
> No idea how to fix it.

Thanks for reporting ..
I guess it is the kernel-doc parser, currently I'am trying to eliminate
some base fails of the kernel-doc parser (e.g. you mailed handling of 
c functions) .. for this I test with your media_tree/doc-next ..
if you commit this to your doc-next I have an example (or where could I get it)
I will take a look about this also .. .. give me some time ;-)

-- Markus --

> 
> Thanks,
> Mauro
> --
> To unsubscribe from this list: send the line "unsubscribe linux-media" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html

--
To unsubscribe from this list: send the line "unsubscribe linux-media" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Mauro Carvalho Chehab July 20, 2016, 2:04 p.m. UTC | #3
Em Wed, 20 Jul 2016 15:14:27 +0200
Markus Heiser <markus.heiser@darmarit.de> escreveu:

> Am 20.07.2016 um 15:00 schrieb Mauro Carvalho Chehab <mchehab@s-opensource.com>:
> 
> > Em Wed, 20 Jul 2016 09:32:15 -0300
> > Mauro Carvalho Chehab <mchehab@s-opensource.com> escreveu:
> >   
> >> Fix all remaining media warnings with ReST that are fixable
> >> without changing at the Sphinx code.
> >>   
> >   
> >> diff --git a/include/media/media-entity.h b/include/media/media-entity.h
> >> index 83877719bef4..3d885d97d149 100644
> >> --- a/include/media/media-entity.h
> >> +++ b/include/media/media-entity.h
> >> @@ -180,8 +180,10 @@ struct media_pad {
> >> *			view. The media_entity_pipeline_start() function
> >> *			validates all links by calling this operation. Optional.
> >> *
> >> - * .. note:: Those these callbacks are called with struct media_device.@graph_mutex
> >> - * mutex held.
> >> + * .. note::
> >> + *
> >> + *    Those these callbacks are called with struct media_device.@graph_mutex
> >> + *    mutex held.
> >> */  
> > 
> > The kernel-doc script did something wrong here... something bad
> > happened with "@graph_mutex". While it is showing the note box
> > properly, the message inside is:
> > 
> > 	"Note
> > 
> > 	 Those these callbacks are called with struct media_device.**graph_mutex** mutex held."
> > 
> > 
> > E. g. it converted @ to "**graph_mutex**" and some code seemed to
> > change it to: "\*\*graph_mutex\*\*", as this message is not showing
> > with a bold font, but, instead, with the double asterisks.
> > 
> > No idea how to fix it.  
> 
> Thanks for reporting ..
> I guess it is the kernel-doc parser, currently I'am trying to eliminate
> some base fails of the kernel-doc parser (e.g. you mailed handling of 
> c functions) .. for this I test with your media_tree/doc-next ..
> if you commit this to your doc-next I have an example (or where could I get it)

It is on my development tree:
	https://git.linuxtv.org//mchehab/experimental.git/log/?h=docs-next

I'll push it to the media_tree later today.

Btw, I'm also getting this warning:

/devel/v4l/patchwork/Documentation/media/kapi/mc-core.rst:1252: WARNING: Could not lex literal_block as "C". Highlighting skipped.                                                   

With invalid line numbers. I was unable to discover why, and your
patch didn't help solving it.

---

A completely unrelated question: it seems that Sphinx is using just
one CPU to do its builds:

%Cpu0  :  3,0 us,  7,6 sy,  0,0 ni, 89,4 id,  0,0 wa,  0,0 hi,  0,0 si,  0,0 st
%Cpu1  :100,0 us,  0,0 sy,  0,0 ni,  0,0 id,  0,0 wa,  0,0 hi,  0,0 si,  0,0 st
%Cpu2  :  1,3 us,  2,7 sy,  0,0 ni, 95,7 id,  0,3 wa,  0,0 hi,  0,0 si,  0,0 st
%Cpu3  :  1,0 us,  3,3 sy,  0,0 ni, 95,7 id,  0,0 wa,  0,0 hi,  0,0 si,  0,0 st
KiB Mem : 15861876 total,  5809820 free,  1750528 used,  8301528 buff/cache
KiB Swap:  8200188 total,  8200188 free,        0 used. 13382964 avail Mem 

  PID USER      PR  NI    VIRT    RES    SHR S  %CPU %MEM     TIME+ COMMAND     
 5660 mchehab   20   0  325256  89776   8300 R  99,7  0,6   0:22.25 sphinx-bui+ 

Are there any way to speed it up and make it use all available CPUs?


> I will take a look about this also .. .. give me some time ;-)
> 
> -- Markus --
> 
> > 
> > Thanks,
> > Mauro
> > --
> > To unsubscribe from this list: send the line "unsubscribe linux-media" in
> > the body of a message to majordomo@vger.kernel.org
> > More majordomo info at  http://vger.kernel.org/majordomo-info.html  
> 



Thanks,
Mauro
--
To unsubscribe from this list: send the line "unsubscribe linux-media" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Markus Heiser Aug. 5, 2016, 9:56 a.m. UTC | #4
Am 20.07.2016 um 16:04 schrieb Mauro Carvalho Chehab <mchehab@s-opensource.com>:

> 
> A completely unrelated question: it seems that Sphinx is using just
> one CPU to do its builds:
> 
> %Cpu0  :  3,0 us,  7,6 sy,  0,0 ni, 89,4 id,  0,0 wa,  0,0 hi,  0,0 si,  0,0 st
> %Cpu1  :100,0 us,  0,0 sy,  0,0 ni,  0,0 id,  0,0 wa,  0,0 hi,  0,0 si,  0,0 st
> %Cpu2  :  1,3 us,  2,7 sy,  0,0 ni, 95,7 id,  0,3 wa,  0,0 hi,  0,0 si,  0,0 st
> %Cpu3  :  1,0 us,  3,3 sy,  0,0 ni, 95,7 id,  0,0 wa,  0,0 hi,  0,0 si,  0,0 st
> KiB Mem : 15861876 total,  5809820 free,  1750528 used,  8301528 buff/cache
> KiB Swap:  8200188 total,  8200188 free,        0 used. 13382964 avail Mem 
> 
>  PID USER      PR  NI    VIRT    RES    SHR S  %CPU %MEM     TIME+ COMMAND     
> 5660 mchehab   20   0  325256  89776   8300 R  99,7  0,6   0:22.25 sphinx-bui+ 
> 
> Are there any way to speed it up and make it use all available CPUs?

Hi Mauro, 

sorry for the late reply. There is a sphinx-build option "-j N" [1].
It is in a *experimental* state in Sphinx v1.2 and has been improved 
in v1.3. Set e.g. "-j2" to the SPHINXOPTS to use two cores.

 make SPHINXOPTS=-j2 htmldocs

But take into account what the documentation says: """not all parts and 
not all builders of Sphinx can be parallelized.""".

[1] http://www.sphinx-doc.org/en/stable/invocation.html#cmdoption-sphinx-build-j

-- Markus ----
To unsubscribe from this list: send the line "unsubscribe linux-media" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Mauro Carvalho Chehab Aug. 5, 2016, 11:41 a.m. UTC | #5
Em Fri, 5 Aug 2016 11:56:44 +0200
Markus Heiser <markus.heiser@darmarit.de> escreveu:

> Am 20.07.2016 um 16:04 schrieb Mauro Carvalho Chehab <mchehab@s-opensource.com>:
> 
> > 
> > A completely unrelated question: it seems that Sphinx is using just
> > one CPU to do its builds:
> > 
> > %Cpu0  :  3,0 us,  7,6 sy,  0,0 ni, 89,4 id,  0,0 wa,  0,0 hi,  0,0 si,  0,0 st
> > %Cpu1  :100,0 us,  0,0 sy,  0,0 ni,  0,0 id,  0,0 wa,  0,0 hi,  0,0 si,  0,0 st
> > %Cpu2  :  1,3 us,  2,7 sy,  0,0 ni, 95,7 id,  0,3 wa,  0,0 hi,  0,0 si,  0,0 st
> > %Cpu3  :  1,0 us,  3,3 sy,  0,0 ni, 95,7 id,  0,0 wa,  0,0 hi,  0,0 si,  0,0 st
> > KiB Mem : 15861876 total,  5809820 free,  1750528 used,  8301528 buff/cache
> > KiB Swap:  8200188 total,  8200188 free,        0 used. 13382964 avail Mem 
> > 
> >  PID USER      PR  NI    VIRT    RES    SHR S  %CPU %MEM     TIME+ COMMAND     
> > 5660 mchehab   20   0  325256  89776   8300 R  99,7  0,6   0:22.25 sphinx-bui+ 
> > 
> > Are there any way to speed it up and make it use all available CPUs?  
> 
> Hi Mauro, 
> 
> sorry for the late reply. There is a sphinx-build option "-j N" [1].
> It is in a *experimental* state in Sphinx v1.2 and has been improved 
> in v1.3. Set e.g. "-j2" to the SPHINXOPTS to use two cores.
> 
>  make SPHINXOPTS=-j2 htmldocs
> 
> But take into account what the documentation says: """not all parts and 
> not all builders of Sphinx can be parallelized.""".
> 
> [1] http://www.sphinx-doc.org/en/stable/invocation.html#cmdoption-sphinx-build-j

Good, thanks!

Did some tests here on a machine with 32 CPU threads using a PCIe SSD disk,
using Sphinx 1.4.5.

Using -j32, those are the timings:

real	0m59.522s
user	1m29.968s
sys	0m4.975s

not using it, I got:

real	1m27.814s
user	1m26.465s
sys	0m1.842s

Not much gain :(

Regards,
Mauro
--
To unsubscribe from this list: send the line "unsubscribe linux-media" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Markus Heiser Aug. 5, 2016, 11:57 a.m. UTC | #6
Am 05.08.2016 um 13:41 schrieb Mauro Carvalho Chehab <mchehab@s-opensource.com>:

> Em Fri, 5 Aug 2016 11:56:44 +0200
> Markus Heiser <markus.heiser@darmarit.de> escreveu:
> 
>> Am 20.07.2016 um 16:04 schrieb Mauro Carvalho Chehab <mchehab@s-opensource.com>:
>> 
>>> 
>>> A completely unrelated question: it seems that Sphinx is using just
>>> one CPU to do its builds:
>>> 
>>> %Cpu0  :  3,0 us,  7,6 sy,  0,0 ni, 89,4 id,  0,0 wa,  0,0 hi,  0,0 si,  0,0 st
>>> %Cpu1  :100,0 us,  0,0 sy,  0,0 ni,  0,0 id,  0,0 wa,  0,0 hi,  0,0 si,  0,0 st
>>> %Cpu2  :  1,3 us,  2,7 sy,  0,0 ni, 95,7 id,  0,3 wa,  0,0 hi,  0,0 si,  0,0 st
>>> %Cpu3  :  1,0 us,  3,3 sy,  0,0 ni, 95,7 id,  0,0 wa,  0,0 hi,  0,0 si,  0,0 st
>>> KiB Mem : 15861876 total,  5809820 free,  1750528 used,  8301528 buff/cache
>>> KiB Swap:  8200188 total,  8200188 free,        0 used. 13382964 avail Mem 
>>> 
>>> PID USER      PR  NI    VIRT    RES    SHR S  %CPU %MEM     TIME+ COMMAND     
>>> 5660 mchehab   20   0  325256  89776   8300 R  99,7  0,6   0:22.25 sphinx-bui+ 
>>> 
>>> Are there any way to speed it up and make it use all available CPUs?  
>> 
>> Hi Mauro, 
>> 
>> sorry for the late reply. There is a sphinx-build option "-j N" [1].
>> It is in a *experimental* state in Sphinx v1.2 and has been improved 
>> in v1.3. Set e.g. "-j2" to the SPHINXOPTS to use two cores.
>> 
>> make SPHINXOPTS=-j2 htmldocs
>> 
>> But take into account what the documentation says: """not all parts and 
>> not all builders of Sphinx can be parallelized.""".
>> 
>> [1] http://www.sphinx-doc.org/en/stable/invocation.html#cmdoption-sphinx-build-j
> 
> Good, thanks!
> 
> Did some tests here on a machine with 32 CPU threads using a PCIe SSD disk,
> using Sphinx 1.4.5.
> 
> Using -j32, those are the timings:
> 
> real	0m59.522s
> user	1m29.968s
> sys	0m4.975s
> 
> not using it, I got:
> 
> real	1m27.814s
> user	1m26.465s
> sys	0m1.842s
> 
> Not much gain :(
> 
> Regards,
> Mauro

I think, that only some reading / writing parts of the sphinx implementation
are parallel and most of the stuff is sequential. I haven't looked through
but I think, generating env and traversing trees etc. are always steps which
has to be consecutively.

I guess you will get same results with 2 or 4 threads :(

--Markus--




  --
To unsubscribe from this list: send the line "unsubscribe linux-media" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
diff mbox

Patch

diff --git a/Documentation/media/v4l-drivers/cx88.rst b/Documentation/media/v4l-drivers/cx88.rst
index 97865007f51f..d8f3a014726a 100644
--- a/Documentation/media/v4l-drivers/cx88.rst
+++ b/Documentation/media/v4l-drivers/cx88.rst
@@ -119,6 +119,7 @@  GPIO 16(I believe) is tied to the IR port (if present).
 From the data sheet:
 
 - Register 24'h20004  PCI Interrupt Status
+
  - bit [18]  IR_SMP_INT Set when 32 input samples have been collected over
  - gpio[16] pin into GP_SAMPLE register.
 
diff --git a/Documentation/media/v4l-drivers/tm6000-cardlist.rst b/Documentation/media/v4l-drivers/tm6000-cardlist.rst
index ca08d4214b38..2fbd3886b5f0 100644
--- a/Documentation/media/v4l-drivers/tm6000-cardlist.rst
+++ b/Documentation/media/v4l-drivers/tm6000-cardlist.rst
@@ -1,5 +1,5 @@ 
 TM6000 cards list
-===============
+=================
 
 .. code-block:: none
 
diff --git a/drivers/media/dvb-core/dvb_math.h b/drivers/media/dvb-core/dvb_math.h
index 34dc1df03cab..2f0326674ca6 100644
--- a/drivers/media/dvb-core/dvb_math.h
+++ b/drivers/media/dvb-core/dvb_math.h
@@ -30,11 +30,15 @@ 
  * @value: The value (must be != 0)
  *
  * to use rational values you can use the following method:
+ *
  *   intlog2(value) = intlog2(value * 2^x) - x * 2^24
  *
  * Some usecase examples:
+ *
  *	intlog2(8) will give 3 << 24 = 3 * 2^24
+ *
  *	intlog2(9) will give 3 << 24 + ... = 3.16... * 2^24
+ *
  *	intlog2(1.5) = intlog2(3) - 2^24 = 0.584... * 2^24
  *
  *
@@ -48,10 +52,13 @@  extern unsigned int intlog2(u32 value);
  * @value: The value (must be != 0)
  *
  * to use rational values you can use the following method:
+ *
  *   intlog10(value) = intlog10(value * 10^x) - x * 2^24
  *
  * An usecase example:
+ *
  *	intlog10(1000) will give 3 << 24 = 3 * 2^24
+ *
  *   due to the implementation intlog10(1000) might be not exactly 3 * 2^24
  *
  * look at intlog2 for similar examples
diff --git a/include/media/media-entity.h b/include/media/media-entity.h
index 83877719bef4..3d885d97d149 100644
--- a/include/media/media-entity.h
+++ b/include/media/media-entity.h
@@ -180,8 +180,10 @@  struct media_pad {
  *			view. The media_entity_pipeline_start() function
  *			validates all links by calling this operation. Optional.
  *
- * .. note:: Those these callbacks are called with struct media_device.@graph_mutex
- * mutex held.
+ * .. note::
+ *
+ *    Those these callbacks are called with struct media_device.@graph_mutex
+ *    mutex held.
  */
 struct media_entity_operations {
 	int (*link_setup)(struct media_entity *entity,