Re: [PATCH 0/5] Convert more books to ReST

2017-05-16 Thread Boris Brezillon
Hi Jonathan,

On Mon, 15 May 2017 11:15:19 -0600
Jonathan Corbet  wrote:

> On Mon, 15 May 2017 14:09:12 +0200
> Boris Brezillon  wrote:
> 
> > >   mtd: adjust kernel-docs to avoid Sphinx/kerneldoc warnings
> > 
> > Not sure how you plan to merge these changes, but if it goes through
> > a single tree I'll probably need an immutable topic branch, because I
> > plan to change a few things in nand_base.c nand.h for the next release.  
> 
> docs-next doesn't rebase, so there shouldn't be trouble there.  But we
> could also just separate this patch into two pieces.  I suspect we could
> live with a couple of warnings for a period during the 4.13 merge window
> without too much pain...

I like this idea. This way I can take the nand_base.c/nand.h changes
through my tree and let you pick the Doc migration bits.

Thanks,

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


Re: [PATCH v4 2/3] hwmon: (adt7475) temperature smoothing

2017-05-16 Thread kbuild test robot
Hi Chris,

[auto build test ERROR on hwmon/hwmon-next]
[also build test ERROR on v4.12-rc1 next-20170516]
[if your patch is applied to the wrong git tree, please drop us a note to help 
improve the system]

url:
https://github.com/0day-ci/linux/commits/Chris-Packham/hwmon-adt7475-fan-stall-prevention/20170515-093530
base:   
https://git.kernel.org/pub/scm/linux/kernel/git/groeck/linux-staging.git 
hwmon-next
config: x86_64-rhel (attached as .config)
compiler: gcc-6 (Debian 6.2.0-3) 6.2.0 20160901
reproduce:
# save the attached .config to linux build tree
make ARCH=x86_64 

All errors (new ones prefixed by >>):

   drivers/hwmon/adt7475.c: In function 'set_temp_st':
>> drivers/hwmon/adt7475.c:622:9: error: implicit declaration of function 
>> 'find_closest_descending' [-Werror=implicit-function-declaration]
  val = find_closest_descending(val, ad7475_st_map,
^~~
   cc1: some warnings being treated as errors

vim +/find_closest_descending +622 drivers/hwmon/adt7475.c

   616  shift = 4;
   617  idx = 1;
   618  break;
   619  }
   620  
   621  if (val > 0) {
 > 622  val = find_closest_descending(val, ad7475_st_map,
   623
ARRAY_SIZE(ad7475_st_map));
   624  val |= 0x8;
   625  }

---
0-DAY kernel test infrastructureOpen Source Technology Center
https://lists.01.org/pipermail/kbuild-all   Intel Corporation


.config.gz
Description: application/gzip


Re: [PATCH v5 18/32] x86, mpparse: Use memremap to map the mpf and mpc data

2017-05-16 Thread Borislav Petkov
On Tue, Apr 18, 2017 at 04:19:30PM -0500, Tom Lendacky wrote:
> The SMP MP-table is built by UEFI and placed in memory in a decrypted
> state. These tables are accessed using a mix of early_memremap(),
> early_memunmap(), phys_to_virt() and virt_to_phys(). Change all accesses
> to use early_memremap()/early_memunmap(). This allows for proper setting
> of the encryption mask so that the data can be successfully accessed when
> SME is active.
> 
> Signed-off-by: Tom Lendacky 
> ---
>  arch/x86/kernel/mpparse.c |  102 
> +++--
>  1 file changed, 71 insertions(+), 31 deletions(-)
> 
> diff --git a/arch/x86/kernel/mpparse.c b/arch/x86/kernel/mpparse.c
> index fd37f39..afbda41d 100644
> --- a/arch/x86/kernel/mpparse.c
> +++ b/arch/x86/kernel/mpparse.c
> @@ -429,7 +429,21 @@ static inline void __init 
> construct_default_ISA_mptable(int mpc_default_type)
>   }
>  }
>  
> -static struct mpf_intel *mpf_found;
> +static unsigned long mpf_base;
> +
> +static void __init unmap_mpf(struct mpf_intel *mpf)
> +{
> + early_memunmap(mpf, sizeof(*mpf));
> +}
> +
> +static struct mpf_intel * __init map_mpf(unsigned long paddr)
> +{
> + struct mpf_intel *mpf;
> +
> + mpf = early_memremap(paddr, sizeof(*mpf));
> +
> + return mpf;

return early_memremap(paddr, sizeof(*mpf));

...

> @@ -842,25 +873,26 @@ static int __init update_mp_table(void)
>   if (!enable_update_mptable)
>   return 0;
>  
> - mpf = mpf_found;
> - if (!mpf)
> + if (!mpf_base)
>   return 0;
>  
> + mpf = map_mpf(mpf_base);
> +
>   /*
>* Now see if we need to go further.
>*/
>   if (mpf->feature1 != 0)

You're kidding, right? map_mpf() *can* return NULL.

Also, simplify that test:

if (mpf->feature1)
...


> - return 0;
> + goto do_unmap_mpf;
>  
>   if (!mpf->physptr)
> - return 0;
> + goto do_unmap_mpf;
>  
> - mpc = phys_to_virt(mpf->physptr);
> + mpc = map_mpc(mpf->physptr);

Again: error checking !!!

You have other calls to early_memremap()/map_mpf() in this patch. Please
add error checking everywhere.

>  
>   if (!smp_check_mpc(mpc, oem, str))
> - return 0;
> + goto do_unmap_mpc;
>  
> - pr_info("mpf: %llx\n", (u64)virt_to_phys(mpf));
> + pr_info("mpf: %llx\n", (u64)mpf_base);
>   pr_info("physptr: %x\n", mpf->physptr);
>  
>   if (mpc_new_phys && mpc->length > mpc_new_length) {
> @@ -878,21 +910,23 @@ static int __init update_mp_table(void)
>   new = mpf_checksum((unsigned char *)mpc, mpc->length);
>   if (old == new) {
>   pr_info("mpc is readonly, please try alloc_mptable 
> instead\n");
> - return 0;
> + goto do_unmap_mpc;
>   }
>   pr_info("use in-position replacing\n");
>   } else {
>   mpf->physptr = mpc_new_phys;
> - mpc_new = phys_to_virt(mpc_new_phys);
> + mpc_new = map_mpc(mpc_new_phys);

Ditto.

>   memcpy(mpc_new, mpc, mpc->length);
> + unmap_mpc(mpc);
>   mpc = mpc_new;
>   /* check if we can modify that */
>   if (mpc_new_phys - mpf->physptr) {
>   struct mpf_intel *mpf_new;
>   /* steal 16 bytes from [0, 1k) */
>   pr_info("mpf new: %x\n", 0x400 - 16);
> - mpf_new = phys_to_virt(0x400 - 16);
> + mpf_new = map_mpf(0x400 - 16);

Ditto.

>   memcpy(mpf_new, mpf, 16);
> + unmap_mpf(mpf);
>   mpf = mpf_new;
>   mpf->physptr = mpc_new_phys;
>   }

-- 
Regards/Gruss,
Boris.

Good mailing practices for 400: avoid top-posting and trim the reply.
--
To unsubscribe from this list: send the line "unsubscribe linux-doc" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH] mm, docs: update memory.stat description with workingset* entries

2017-05-16 Thread Michal Hocko
On Thu 11-05-17 20:18:13, Roman Gushchin wrote:
> Commit 4b4cea91691d ("mm: vmscan: fix IO/refault regression in
> cache workingset transition") introduced three new entries in memory
> stat file:
>  - workingset_refault,
>  - workingset_activate,
>  - workingset_nodereclaim.
> 
> This commit adds a corresponding description to the cgroup v2 docs.
> 
> Signed-off-by: Roman Gushchin 
> Cc: Johannes Weiner 
> Cc: Michal Hocko 
> Cc: Vladimir Davydov 
> Cc: Tejun Heo 
> Cc: Li Zefan 
> Cc: cgro...@vger.kernel.org
> Cc: linux-doc@vger.kernel.org
> Cc: linux-ker...@vger.kernel.org

Missed this one. Sorry about that
Acked-by: Michal Hocko 

> ---
>  Documentation/cgroup-v2.txt | 12 
>  1 file changed, 12 insertions(+)
> 
> diff --git a/Documentation/cgroup-v2.txt b/Documentation/cgroup-v2.txt
> index e50b95c..dc5e2dc 100644
> --- a/Documentation/cgroup-v2.txt
> +++ b/Documentation/cgroup-v2.txt
> @@ -918,6 +918,18 @@ PAGE_SIZE multiple when read back.
>  
>   Number of major page faults incurred
>  
> +   workingset_refault
> +
> + Number of refaults of previously evicted pages
> +
> +   workingset_activate
> +
> + Number of refaulted pages that were immediately activated
> +
> +   workingset_nodereclaim
> +
> + Number of times a shadow node has been reclaimed
> +
>memory.swap.current
>  
>   A read-only single value file which exists on non-root
> -- 
> 2.7.4

-- 
Michal Hocko
SUSE Labs
--
To unsubscribe from this list: send the line "unsubscribe linux-doc" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH 28/36] docs-rst: convert s390-drivers DocBook to ReST

2017-05-16 Thread Mauro Carvalho Chehab
Em Mon, 15 May 2017 10:09:40 +0200
Cornelia Huck  escreveu:

> On Fri, 12 May 2017 11:00:11 -0300
> Mauro Carvalho Chehab  wrote:
> 
> > Use pandoc to convert documentation to ReST by calling
> > Documentation/sphinx/tmplcvt script.
> > 
> > Signed-off-by: Mauro Carvalho Chehab 
> > ---
> >  Documentation/DocBook/Makefile|   2 +-
> >  Documentation/DocBook/s390-drivers.tmpl   | 161 
> > --
> >  Documentation/driver-api/index.rst|   1 +
> >  Documentation/driver-api/s390-drivers.rst | 111 
> >  4 files changed, 113 insertions(+), 162 deletions(-)
> >  delete mode 100644 Documentation/DocBook/s390-drivers.tmpl
> >  create mode 100644 Documentation/driver-api/s390-drivers.rst  
> 
> Acked-by: Cornelia Huck 

Thanks!

> 
> ...but I wonder how good the information in there still is, given that
> I haven't touched it in ages...

The text inside it is just a brief description of s390 specifics,
but the real API descriptions are inside those files:

.. kernel-doc:: arch/s390/include/asm/cio.h
.. kernel-doc:: arch/s390/include/asm/ccwdev.h
.. kernel-doc:: drivers/s390/cio/device.c
.. kernel-doc:: drivers/s390/cio/device_ops.c
.. kernel-doc:: arch/s390/include/asm/cmb.h
.. kernel-doc:: drivers/s390/cio/cmf.c
.. kernel-doc:: arch/s390/include/asm/ccwgroup.h
.. kernel-doc:: drivers/s390/cio/ccwgroup.c
.. kernel-doc:: drivers/s390/cio/airq.c

Those 9 files seem to have been updated lately:

$ git log arch/s390/include/asm/cio.h arch/s390/include/asm/ccwdev.h 
drivers/s390/cio/device.c drivers/s390/cio/device_ops.c 
arch/s390/include/asm/cmb.h drivers/s390/cio/cmf.c 
arch/s390/include/asm/ccwgroup.h drivers/s390/cio/ccwgroup.c 
drivers/s390/cio/airq.c|grep Date
Date:   Fri Mar 17 04:17:42 2017 +0100
Date:   Thu Feb 2 19:15:33 2017 +0100
Date:   Thu Jan 12 18:53:56 2017 +0100
Date:   Sun Oct 30 16:37:24 2016 -0400
Date:   Fri Jul 29 10:43:53 2016 +0200
Date:   Thu Jun 23 11:09:26 2016 +0200
Date:   Tue Jul 12 19:57:57 2016 +0200
Date:   Mon Jun 20 14:03:38 2016 +0200
Date:   Tue May 31 09:09:57 2016 +0200
Date:   Thu Mar 3 20:49:57 2016 -0800
Date:   Fri Dec 18 12:59:36 2015 +0100
Date:   Mon Jun 29 18:39:54 2015 +0200
Date:   Mon Oct 26 12:38:13 2015 +0100
Date:   Mon Oct 26 12:35:06 2015 +0100
Date:   Mon Sep 21 18:40:33 2015 +0200
...

So, I guess that what's there is still valid.

Yet, on a quick grep:

$ git grep -l "/\*\*" drivers/s390/|wc -l
91

So, it seems that only 10% of the kernel-doc markups are actually
documented :-)

Perhaps you could add the missing files there after this patch ;-)


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


Re: [PATCH] mm: per-cgroup memory reclaim stats

2017-05-16 Thread Michal Hocko
On Thu 11-05-17 20:16:23, Roman Gushchin wrote:
> Track the following reclaim counters for every memory cgroup:
> PGREFILL, PGSCAN, PGSTEAL, PGACTIVATE, PGDEACTIVATE, PGLAZYFREE and
> PGLAZYFREED.

yes, those are definitely useful. I have an old patch to add them as
well but never managed to clean it up and post...

> These values are exposed using the memory.stats interface of cgroup v2.

Is there any reason to not add them to v1? This should be rather trivial
after recent changes from Johannes.

> The meaning of each value is the same as for global counters,
> available using /proc/vmstat.
> 
> Also, for consistency, rename mem_cgroup_count_vm_event() to
> count_memcg_event_mm().
> 
> Signed-off-by: Roman Gushchin 
> Suggested-by: Johannes Weiner 
> Cc: Johannes Weiner 
> Cc: Tejun Heo 
> Cc: Li Zefan 
> Cc: Michal Hocko 
> Cc: Vladimir Davydov 
> Cc: cgro...@vger.kernel.org
> Cc: linux-doc@vger.kernel.org
> Cc: linux-ker...@vger.kernel.org
> Cc: linux...@kvack.org

the patch itself looks good to me. I will have to double check it after
I am done with what I am doing currently and then will add my Acked-by
-- 
Michal Hocko
SUSE Labs
--
To unsubscribe from this list: send the line "unsubscribe linux-doc" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH 04/36] mutex, futex: adjust kernel-doc markups to generate ReST

2017-05-16 Thread Mauro Carvalho Chehab
Em Mon, 15 May 2017 09:40:44 -0700
Darren Hart  escreveu:

> On Mon, May 15, 2017 at 01:49:19PM +0200, Peter Zijlstra wrote:
> > On Mon, May 15, 2017 at 01:29:58PM +0300, Jani Nikula wrote:  
> > > On Mon, 15 May 2017, Peter Zijlstra  wrote:  
> > > > The intention is to aid readability. Making comments worse so that some
> > > > retarded script can generate better html or whatnot is just that,
> > > > retarded.
> > > >
> > > > Code matters, generated documentation not so much. I'll take a comment
> > > > that reads well over one that generates pretty html any day.  
> > > 
> > > The deal is that if you start your comments with "/**" they'll be
> > > processed with the retarded script to produce pretty html.
> > > 
> > > For the most part the comments that generate pretty html also read well,
> > > and we don't expect or want anyone to go overboard with markup. I don't
> > > think it's unreasonable to make small concessions to improve generated
> > > documentation for people who care about it even if you don't.  
> > 
> > No. Such a concession has pure negative value. It opens the door to more
> > patches converting this or that comment to be prettier or whatnot. And
> > before you know it there's a Markus like idiot spamming you with dozens
> > of crap patches to prettify the generated crud.  
> 
> Well that I can certainly understand.
> 
> > 
> > Not to mention that this would mean having to learn this rest crud in
> > order to write these comments.  
> 
> I have complete confidence in you here Peter :-b
> 
> > 
> > All things I'm not prepared to do.
> > 
> > 
> > I'm all for useful comments, but I see no value _at_all_ in this
> > generated nonsense. The only reason I sometimes use the docbook comment
> > style is because its fairly uniform and the build bot gets you a warning
> > when your function signature no longer matches with the comment. But
> > if you make this painful I'll simply stop using them.
> >   
> 
> Making documentation more accessible to people is a good thing. This type of
> automated publication reduces the barrier to access. The lack of this kind of
> tooling, honestly, also discourages participation among some groups of
> of capable contributors.
> 
> That said, I support the direction both Mauro and Peter have voiced to 
> minimize
> the impact to comment blocks. What does rest do with this formatting it 
> doesn't
> understand - does it fail gracefully? Falling back to  or something
> like that?

ReST produces a warning or error if it finds something it can't
parse, but it usually doesn't crash. The result of its output usually
is not what you would expect on such cases, though.

So, IMHO, the bare minimum to do is to make sure that it won't produce
errors/warnings.

PS.: kernel-doc itself also produce errors/warnings, if the vars at
the kernel-doc block don't match the ones at the function or if a
documented function was added or removed.

-

That's said, on the subsystems I maintain, I'm not satisfied with the
bare minimum ;) I usually build the html output and look into it
to be sure that the output from kernel-doc also looks nice.

In the case of the media subsystem, we have a big book describing the 
userspace API. Non-eventual media developers read the uAPI docs in html
or pdf for API docs before coding. 

So, on media subsysem, we ended by adding a few ReST specific
markups[1] where added, in order to improve its readability
in html/pdf, but the main documentation just use what's specified at
Documentation/doc-guide/kernel-doc.rst.

[1] There aren't much such markups used there. As far as I remember,
we use:

- bulleted lists like:
return:
  - value 1
  - value 2
  ...

- **bold** when we need to bold something;

- ``literal`` for complex literal strings that %FOO won't handle
  (e. g. when it contains space and/or special chars);

- ".. note::" or ".. attention::" in order to bold important
  notes, when some function have special requirements 
  to be called (for example, the need to lock or unlock 
  some mutex or spin lock before calling it).

  For example, the description for "v4l2_ctrl_handler_init_class"
  at:

http://www.infradead.org/~mchehab/kernel_docs/media/kapi/v4l2-controls.html

  uses an attention markup that bolds that such function should
  not be called directly by API clients.

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


Re: [PATCH 0/5] Convert more books to ReST

2017-05-16 Thread Mauro Carvalho Chehab
Em Mon, 15 May 2017 14:09:12 +0200
Boris Brezillon  escreveu:

> On Sat, 13 May 2017 08:10:53 -0300
> Mauro Carvalho Chehab  wrote:
> 
> > This patch series convert the following books to ReST:
> > - librs
> > - mtdnand
> > - sh
> > 
> > And it is based on my previous series of conversion patches.
> > 
> > After this series, there will be just one DocBook pending conversion:
> > - lsm (Linux Security Modules)
> > 
> > This book is very outdated: no changes since the Kernel moved 
> > to git, in 2005 (except for a minor editorial fix in 2008).
> > 
> > I took a look on the described API: it doesn't seem to be describing
> > the current security implementation.
> > 
> > The best here is if someone that works with LSM to convert it to
> > ReST with:
> > $ Documentation/sphinx/tmplcvt Documentation/DocBook/lsm.tmpl lsm.rst
> > 
> > And fix the document to produce something that reflects the current
> > implementation. If nobody is interested, then maybe we could just
> > drop it.
> > 
> > -
> > 
> > This patch series is based on my past 00/36 patch series, applied on
> > the top of docs tree (next branch).
> > 
> > The full patch series is on this tree is at:
> > 
> >https://git.linuxtv.org//mchehab/experimental.git/log/?h=docbook
> > 
> > And the HTML output at:
> > 
> >   http://www.infradead.org/~mchehab/kernel_docs/
> >   https://mchehab.fedorapeople.org/kernel_docs/ 
> > 
> > Mauro Carvalho Chehab (5):
> >   docs-rst: convert librs book to ReST
> >   docs-rst: convert mtdnand book to ReST
> >   mtdnand.rst: Fix some typos and group the "::" with previous line  
> 
> MTD maintainers did not receive the above patch. Can you Cc us the
> whole series next time.

Sorry. I'll add you on the whole series. It will be a big one, though,
as it will contain the other docbook conversions on it (~50+ patches).

> BTW, I had a look at your branch and it seems the typo you're fixing is
> actually not a type. Flags are *OR-ed* (with the | operator) to form a
> valid combination of flags.

Ah! Ok, I updated the patch (see enclosed). Would that be OK for you?

> >   mtd: adjust kernel-docs to avoid Sphinx/kerneldoc warnings  
> 
> Not sure how you plan to merge these changes, but if it goes through
> a single tree I'll probably need an immutable topic branch, because I
> plan to change a few things in nand_base.c nand.h for the next release.

At least the patches that touch at Documentation/* should go, IMHO,
via a single tree:
git://git.lwn.net/linux.git docs-next

As Jon mentioned, he doesn't rebase it, so you should be able to get an
immutable branch from it.


Thanks,
Mauro

---

[PATCH] mtdnand.rst: group the "::" with previous line

Group the :: with the previous paragraph, in order to make it
visually better when reading as a text file.

While here, replace:
ored (with means "Covered or adorned with ore or metal")
by:
OR-ed

To reflect its true meaning.

Signed-off-by: Mauro Carvalho Chehab 

diff --git a/Documentation/driver-api/mtdnand.rst 
b/Documentation/driver-api/mtdnand.rst
index 8723175f955e..7c19795ebb4a 100644
--- a/Documentation/driver-api/mtdnand.rst
+++ b/Documentation/driver-api/mtdnand.rst
@@ -843,10 +843,8 @@ Chip option constants
 Constants for chip id table
 ~~~
 
-These constants are defined in nand.h. They are ored together to
-describe the chip functionality.
-
-::
+These constants are defined in nand.h. They are OR-ed together to
+describe the chip functionality::
 
 /* Buswitdh is 16 bit */
 #define NAND_BUSWIDTH_160x0002
@@ -867,10 +865,8 @@ describe the chip functionality.
 Constants for runtime options
 ~
 
-These constants are defined in nand.h. They are ored together to
-describe the functionality.
-
-::
+These constants are defined in nand.h. They are OR-ed together to
+describe the functionality::
 
 /* The hw ecc generator provides a syndrome instead a ecc value on read
  * This can only work if we have the ecc bytes directly behind the
@@ -881,9 +877,7 @@ describe the functionality.
 ECC selection constants
 ---
 
-Use these constants to select the ECC algorithm.
-
-::
+Use these constants to select the ECC algorithm::
 
 /* No ECC. Usage is not recommended ! */
 #define NAND_ECC_NONE   0
@@ -903,9 +897,7 @@ Hardware control related constants
 --
 
 These constants describe the requested hardware access function when the
-boardspecific hardware control function is called
-
-::
+boardspecific hardware control function is called::
 
 /* Select the chip by setting nCE to low */
 #define NAND_CTL_SETNCE 1
@@ -929,9 +921,7 @@ Bad block table related constants
 -
 
 These constants describe the options used for bad block table
-descriptors.
-
-::
+descriptors::
 
 /* Options for the bad block table descriptors */
 


--
To unsubscribe from this list: send the

Re: [PATCH 10/13] sound: fix the comments that refers to kernel-doc

2017-05-16 Thread Mauro Carvalho Chehab
Em Mon, 15 May 2017 11:04:26 +0200
Takashi Iwai  escreveu:

> On Sun, 14 May 2017 17:38:44 +0200,
> Mauro Carvalho Chehab wrote:
> > 
> > The markup inside the #if 0 comment actually refers to a
> > kernel-doc markup. As we're getting rid of DocBook update it.
> > 
> > Signed-off-by: Mauro Carvalho Chehab   
> 
> I guess you prefer taking it from your tree?  Feel free to take my
> ack:
>   Reviewed-by: Takashi Iwai 

In the specific case of this patch, it doesn't matter much from what
tree it would be merged, as no other patch depends on it ;)

So, if you prefer, you can merge it directly on your tree. Otherwise,
I'll keep it on my pile of patches to be send to docs -next.


> 
> 
> thanks,
> 
> Takashi
> 
> > ---
> >  include/sound/pcm.h | 2 +-
> >  1 file changed, 1 insertion(+), 1 deletion(-)
> > 
> > diff --git a/include/sound/pcm.h b/include/sound/pcm.h
> > index 361749e60799..bbf97d4c4c17 100644
> > --- a/include/sound/pcm.h
> > +++ b/include/sound/pcm.h
> > @@ -1054,7 +1054,7 @@ int snd_pcm_format_unsigned(snd_pcm_format_t format);
> >  int snd_pcm_format_linear(snd_pcm_format_t format);
> >  int snd_pcm_format_little_endian(snd_pcm_format_t format);
> >  int snd_pcm_format_big_endian(snd_pcm_format_t format);
> > -#if 0 /* just for DocBook */
> > +#if 0 /* just for kernel-doc */
> >  /**
> >   * snd_pcm_format_cpu_endian - Check the PCM format is CPU-endian
> >   * @format: the format to check
> > -- 
> > 2.9.3
> > 
> >   



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


Re: [PATCH 10/13] sound: fix the comments that refers to kernel-doc

2017-05-16 Thread Takashi Iwai
On Tue, 16 May 2017 12:46:53 +0200,
Mauro Carvalho Chehab wrote:
> 
> Em Mon, 15 May 2017 11:04:26 +0200
> Takashi Iwai  escreveu:
> 
> > On Sun, 14 May 2017 17:38:44 +0200,
> > Mauro Carvalho Chehab wrote:
> > > 
> > > The markup inside the #if 0 comment actually refers to a
> > > kernel-doc markup. As we're getting rid of DocBook update it.
> > > 
> > > Signed-off-by: Mauro Carvalho Chehab   
> > 
> > I guess you prefer taking it from your tree?  Feel free to take my
> > ack:
> >   Reviewed-by: Takashi Iwai 
> 
> In the specific case of this patch, it doesn't matter much from what
> tree it would be merged, as no other patch depends on it ;)
> 
> So, if you prefer, you can merge it directly on your tree. Otherwise,
> I'll keep it on my pile of patches to be send to docs -next.

OK, since the PCM stuff is being changed for 4.13, may be it's safer
that I take this patch in sound git tree.


thanks,

Takashi

> 
> 
> > 
> > 
> > thanks,
> > 
> > Takashi
> > 
> > > ---
> > >  include/sound/pcm.h | 2 +-
> > >  1 file changed, 1 insertion(+), 1 deletion(-)
> > > 
> > > diff --git a/include/sound/pcm.h b/include/sound/pcm.h
> > > index 361749e60799..bbf97d4c4c17 100644
> > > --- a/include/sound/pcm.h
> > > +++ b/include/sound/pcm.h
> > > @@ -1054,7 +1054,7 @@ int snd_pcm_format_unsigned(snd_pcm_format_t 
> > > format);
> > >  int snd_pcm_format_linear(snd_pcm_format_t format);
> > >  int snd_pcm_format_little_endian(snd_pcm_format_t format);
> > >  int snd_pcm_format_big_endian(snd_pcm_format_t format);
> > > -#if 0 /* just for DocBook */
> > > +#if 0 /* just for kernel-doc */
> > >  /**
> > >   * snd_pcm_format_cpu_endian - Check the PCM format is CPU-endian
> > >   * @format: the format to check
> > > -- 
> > > 2.9.3
> > > 
> > >   
> 
> 
> 
> Thanks,
> Mauro
> 
--
To unsubscribe from this list: send the line "unsubscribe linux-doc" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH 10/13] sound: fix the comments that refers to kernel-doc

2017-05-16 Thread Mauro Carvalho Chehab
Em Tue, 16 May 2017 12:50:55 +0200
Takashi Iwai  escreveu:

> On Tue, 16 May 2017 12:46:53 +0200,
> Mauro Carvalho Chehab wrote:
> > 
> > Em Mon, 15 May 2017 11:04:26 +0200
> > Takashi Iwai  escreveu:
> >   
> > > On Sun, 14 May 2017 17:38:44 +0200,
> > > Mauro Carvalho Chehab wrote:  
> > > > 
> > > > The markup inside the #if 0 comment actually refers to a
> > > > kernel-doc markup. As we're getting rid of DocBook update it.
> > > > 
> > > > Signed-off-by: Mauro Carvalho Chehab 
> > > 
> > > I guess you prefer taking it from your tree?  Feel free to take my
> > > ack:
> > >   Reviewed-by: Takashi Iwai   
> > 
> > In the specific case of this patch, it doesn't matter much from what
> > tree it would be merged, as no other patch depends on it ;)
> > 
> > So, if you prefer, you can merge it directly on your tree. Otherwise,
> > I'll keep it on my pile of patches to be send to docs -next.  
> 
> OK, since the PCM stuff is being changed for 4.13, may be it's safer
> that I take this patch in sound git tree.

OK! I'll remove from my patch pile :-)

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


Re: [PATCH 04/36] mutex, futex: adjust kernel-doc markups to generate ReST

2017-05-16 Thread Peter Zijlstra
On Mon, May 15, 2017 at 02:22:39PM -0300, Mauro Carvalho Chehab wrote:
>  Yet, on the other hand, nobody wants lots of warnings/errors
> produced when building the Kernel or the documentation, as it can ride
> important things that would require fixes.

So would that actually generate a warn/error? Or just generate weird
output?

Because I'm perfectly fine with weird output.

Our primary interface to the code is a text editor, and things should be
readable in that form. Anything that detracts from that is a fail.

If people like to use web browsers (I don't) then I won't stop them, but
they have to realize they're the odd ducks out for viewing things
outside its native form.

> diff --git a/kernel/locking/mutex.c b/kernel/locking/mutex.c
> index 198527a62149..858a07590e39 100644
> --- a/kernel/locking/mutex.c
> +++ b/kernel/locking/mutex.c
> @@ -227,9 +227,9 @@ static void __sched __mutex_lock_slowpath(struct mutex 
> *lock);
>   * (or statically defined) before it can be locked. memset()-ing
>   * the mutex to 0 is not allowed.
>   *
> - * ( The CONFIG_DEBUG_MUTEXES .config option turns on debugging
> - *   checks that will enforce the restrictions and will also do
> - *   deadlock debugging. )
> + * (The CONFIG_DEBUG_MUTEXES .config option turns on debugging
> + * checks that will enforce the restrictions and will also do
> + * deadlock debugging)
>   *
>   * This function is similar to (but not equivalent to) down().
>   */
> 
> 
> 
--
To unsubscribe from this list: send the line "unsubscribe linux-doc" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH 04/36] mutex, futex: adjust kernel-doc markups to generate ReST

2017-05-16 Thread Mauro Carvalho Chehab
Em Tue, 16 May 2017 13:16:56 +0200
Peter Zijlstra  escreveu:

> On Mon, May 15, 2017 at 02:22:39PM -0300, Mauro Carvalho Chehab wrote:
> >  Yet, on the other hand, nobody wants lots of warnings/errors
> > produced when building the Kernel or the documentation, as it can ride
> > important things that would require fixes.  
> 
> So would that actually generate a warn/error? Or just generate weird
> output?

Both warn/error and weird output. From my side, the only reason
for writing this patch is to fix the warnings that would otherwise
be produced without it:

./kernel/futex.c:492: WARNING: Inline emphasis start-string without end-string.
./kernel/futex.c:1264: WARNING: Block quote ends without a blank line; 
unexpected unindent.
./kernel/futex.c:1721: WARNING: Block quote ends without a blank line; 
unexpected unindent.
./kernel/futex.c:2338: WARNING: Block quote ends without a blank line; 
unexpected unindent.
./kernel/futex.c:2426: WARNING: Block quote ends without a blank line; 
unexpected unindent.
./kernel/futex.c:2899: WARNING: Block quote ends without a blank line; 
unexpected unindent.
./kernel/futex.c:2972: WARNING: Block quote ends without a blank line; 
unexpected unindent.


> 
> Because I'm perfectly fine with weird output.
> 
> Our primary interface to the code is a text editor, and things should be
> readable in that form. Anything that detracts from that is a fail.
> 
> If people like to use web browsers (I don't) then I won't stop them, but
> they have to realize they're the odd ducks out for viewing things
> outside its native form.
> 
> > diff --git a/kernel/locking/mutex.c b/kernel/locking/mutex.c
> > index 198527a62149..858a07590e39 100644
> > --- a/kernel/locking/mutex.c
> > +++ b/kernel/locking/mutex.c
> > @@ -227,9 +227,9 @@ static void __sched __mutex_lock_slowpath(struct mutex 
> > *lock);
> >   * (or statically defined) before it can be locked. memset()-ing
> >   * the mutex to 0 is not allowed.
> >   *
> > - * ( The CONFIG_DEBUG_MUTEXES .config option turns on debugging
> > - *   checks that will enforce the restrictions and will also do
> > - *   deadlock debugging. )
> > + * (The CONFIG_DEBUG_MUTEXES .config option turns on debugging
> > + * checks that will enforce the restrictions and will also do
> > + * deadlock debugging)
> >   *
> >   * This function is similar to (but not equivalent to) down().
> >   */
> > 
> > 
> >   



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


[PATCH v2 23/53] fs: jbd2: escape a string with special chars on a kernel-doc

2017-05-16 Thread Mauro Carvalho Chehab
kernel-doc will try to interpret a foo() string, except if
properly escaped.

Reviewed-by: Jan Kara 
Signed-off-by: Mauro Carvalho Chehab 
---
 fs/jbd2/transaction.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/fs/jbd2/transaction.c b/fs/jbd2/transaction.c
index fe7f4a373436..38e1dcabbaca 100644
--- a/fs/jbd2/transaction.c
+++ b/fs/jbd2/transaction.c
@@ -1066,10 +1066,10 @@ static bool jbd2_write_access_granted(handle_t *handle, 
struct buffer_head *bh,
  * @handle: transaction to add buffer modifications to
  * @bh: bh to be used for metadata writes
  *
- * Returns an error code or 0 on success.
+ * Returns: error code or 0 on success.
  *
  * In full data journalling mode the buffer may be of type BJ_AsyncData,
- * because we're write()ing a buffer which is also part of a shared mapping.
+ * because we're ``write()ing`` a buffer which is also part of a shared 
mapping.
  */
 
 int jbd2_journal_get_write_access(handle_t *handle, struct buffer_head *bh)
-- 
2.9.3

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


[PATCH v2 07/53] locking.rst: Update some ReST markups

2017-05-16 Thread Mauro Carvalho Chehab
Correct a few minor issues with ReST notation used on
this file (produced by an automatic tool).

Signed-off-by: Mauro Carvalho Chehab 
---
 Documentation/kernel-hacking/locking.rst | 16 
 1 file changed, 8 insertions(+), 8 deletions(-)

diff --git a/Documentation/kernel-hacking/locking.rst 
b/Documentation/kernel-hacking/locking.rst
index b70c2c4eb147..f937c0fd11aa 100644
--- a/Documentation/kernel-hacking/locking.rst
+++ b/Documentation/kernel-hacking/locking.rst
@@ -93,13 +93,13 @@ Locking in the Linux Kernel
 ===
 
 If I could give you one piece of advice: never sleep with anyone crazier
-than yourself. But if I had to give you advice on locking: *keep it
-simple*.
+than yourself. But if I had to give you advice on locking: **keep it
+simple**.
 
 Be reluctant to introduce new locks.
 
 Strangely enough, this last one is the exact reverse of my advice when
-you *have* slept with someone crazier than yourself. And you should
+you **have** slept with someone crazier than yourself. And you should
 think about getting a big dog.
 
 Two Main Types of Kernel Locks: Spinlocks and Mutexes
@@ -311,7 +311,7 @@ Pete Zaitcev gives the following summary:
 Table of Minimum Requirements
 -
 
-The following table lists the *minimum* locking requirements between
+The following table lists the **minimum** locking requirements between
 various contexts. In some cases, the same context can only be running on
 one CPU at a time, so no locking is required for that context (eg. a
 particular thread can only run on one CPU at a time, but if it needs
@@ -703,7 +703,7 @@ reference count, but they are more complicated.
 Using Atomic Operations For The Reference Count
 ~~~
 
-In practice, ``atomic_t`` would usually be used for refcnt. There are a
+In practice, :c:type:`atomic_t` would usually be used for refcnt. There are a
 number of atomic operations defined in ``include/asm/atomic.h``: these
 are guaranteed to be seen atomically from all CPUs in the system, so no
 lock is required. In this case, it is simpler than using spinlocks,
@@ -1321,7 +1321,7 @@ from user context, and can sleep.
 
-  :c:func:`put_user()`
 
--  ``kmalloc(GFP_KERNEL)``
+-  :c:func:`kmalloc(GFP_KERNEL) `
 
 -  :c:func:`mutex_lock_interruptible()` and
:c:func:`mutex_lock()`
@@ -1431,10 +1431,10 @@ tasklet
 timer
   A dynamically-registrable software interrupt, which is run at (or close
   to) a given time. When running, it is just like a tasklet (in fact, they
-  are called from the TIMER_SOFTIRQ).
+  are called from the ``TIMER_SOFTIRQ``).
 
 UP
-  Uni-Processor: Non-SMP. (CONFIG_SMP=n).
+  Uni-Processor: Non-SMP. (``CONFIG_SMP=n``).
 
 User Context
   The kernel executing on behalf of a particular process (ie. a system
-- 
2.9.3

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


[PATCH v2 18/53] docs-rst: filesystems: use c domain references where needed

2017-05-16 Thread Mauro Carvalho Chehab
Instead of just mention the function names, use cross-references
to the kernel-doc tags where pertinent.

While not all function documentation is included here, I
double-checked that all functions mentioned there still
exists.

Signed-off-by: Mauro Carvalho Chehab 
---
 Documentation/filesystems/index.rst | 76 +++--
 1 file changed, 40 insertions(+), 36 deletions(-)

diff --git a/Documentation/filesystems/index.rst 
b/Documentation/filesystems/index.rst
index 3bc82e9d22f0..148becd91cba 100644
--- a/Documentation/filesystems/index.rst
+++ b/Documentation/filesystems/index.rst
@@ -125,27 +125,27 @@ Details
 The journalling layer is easy to use. You need to first of all create a
 journal_t data structure. There are two calls to do this dependent on
 how you decide to allocate the physical media on which the journal
-resides. The jbd2_journal_init_inode() call is for journals stored in
-filesystem inodes, or the jbd2_journal_init_dev() call can be used
+resides. The :c:func:`jbd2_journal_init_inode` call is for journals stored in
+filesystem inodes, or the :c:func:`jbd2_journal_init_dev` call can be used
 for journal stored on a raw device (in a continuous range of blocks). A
 journal_t is a typedef for a struct pointer, so when you are finally
-finished make sure you call jbd2_journal_destroy() on it to free up
+finished make sure you call :c:func:`jbd2_journal_destroy` on it to free up
 any used kernel memory.
 
 Once you have got your journal_t object you need to 'mount' or load the
 journal file. The journalling layer expects the space for the journal
 was already allocated and initialized properly by the userspace tools.
-When loading the journal you must call jbd2_journal_load() to process
+When loading the journal you must call :c:func:`jbd2_journal_load` to process
 journal contents. If the client file system detects the journal contents
 does not need to be processed (or even need not have valid contents), it
-may call jbd2_journal_wipe() to clear the journal contents before
-calling jbd2_journal_load().
+may call :c:func:`jbd2_journal_wipe` to clear the journal contents before
+calling :c:func:`jbd2_journal_load`.
 
 Note that jbd2_journal_wipe(..,0) calls
-jbd2_journal_skip_recovery() for you if it detects any outstanding
-transactions in the journal and similarly jbd2_journal_load() will
-call jbd2_journal_recover() if necessary. I would advise reading
-ext4_load_journal() in fs/ext4/super.c for examples on this stage.
+:c:func:`jbd2_journal_skip_recovery` for you if it detects any outstanding
+transactions in the journal and similarly :c:func:`jbd2_journal_load` will
+call :c:func:`jbd2_journal_recover` if necessary. I would advise reading
+:c:func:`ext4_load_journal` in fs/ext4/super.c for examples on this stage.
 
 Now you can go ahead and start modifying the underlying filesystem.
 Almost.
@@ -154,54 +154,57 @@ You still need to actually journal your filesystem 
changes, this is done
 by wrapping them into transactions. Additionally you also need to wrap
 the modification of each of the buffers with calls to the journal layer,
 so it knows what the modifications you are actually making are. To do
-this use jbd2_journal_start() which returns a transaction handle.
+this use :c:func:`jbd2_journal_start` which returns a transaction handle.
 
-jbd2_journal_start() and its counterpart jbd2_journal_stop(), which
-indicates the end of a transaction are nestable calls, so you can
+:c:func:`jbd2_journal_start` and its counterpart :c:func:`jbd2_journal_stop`,
+which indicates the end of a transaction are nestable calls, so you can
 reenter a transaction if necessary, but remember you must call
-jbd2_journal_stop() the same number of times as jbd2_journal_start()
-before the transaction is completed (or more accurately leaves the
-update phase). Ext4/VFS makes use of this feature to simplify handling
-of inode dirtying, quota support, etc.
+:c:func:`jbd2_journal_stop` the same number of times as
+:c:func:`jbd2_journal_start` before the transaction is completed (or more
+accurately leaves the update phase). Ext4/VFS makes use of this feature to
+simplify handling of inode dirtying, quota support, etc.
 
 Inside each transaction you need to wrap the modifications to the
 individual buffers (blocks). Before you start to modify a buffer you
-need to call jbd2_journal_get_{create,write,undo}_access() as
-appropriate, this allows the journalling layer to copy the unmodified
+need to call :c:func:`jbd2_journal_get_create_access()` /
+:c:func:`jbd2_journal_get_write_access()` /
+:c:func:`jbd2_journal_get_undo_access()` as appropriate, this allows the
+journalling layer to copy the unmodified
 data if it needs to. After all the buffer may be part of a previously
 uncommitted transaction. At this point you are at last ready to modify a
 buffer, and once you are have done so you need to call
-jbd2_journal_dirty_{meta,}data(). Or if you've asked for access to a
+:c:func:`jbd2_journal_di

[PATCH v2 45/53] ata: update references for libata documentation

2017-05-16 Thread Mauro Carvalho Chehab
The libata documentation is now using ReST. Update references
to it to point to the new place.

Signed-off-by: Mauro Carvalho Chehab 
---
 drivers/ata/acard-ahci.c| 2 +-
 drivers/ata/ahci.c  | 2 +-
 drivers/ata/ahci.h  | 2 +-
 drivers/ata/ata_piix.c  | 2 +-
 drivers/ata/libahci.c   | 2 +-
 drivers/ata/libata-core.c   | 2 +-
 drivers/ata/libata-eh.c | 2 +-
 drivers/ata/libata-scsi.c   | 2 +-
 drivers/ata/libata-sff.c| 2 +-
 drivers/ata/libata.h| 2 +-
 drivers/ata/pata_pdc2027x.c | 2 +-
 drivers/ata/pdc_adma.c  | 2 +-
 drivers/ata/sata_nv.c   | 2 +-
 drivers/ata/sata_promise.c  | 2 +-
 drivers/ata/sata_promise.h  | 2 +-
 drivers/ata/sata_qstor.c| 2 +-
 drivers/ata/sata_sil.c  | 2 +-
 drivers/ata/sata_sis.c  | 2 +-
 drivers/ata/sata_svw.c  | 2 +-
 drivers/ata/sata_sx4.c  | 2 +-
 drivers/ata/sata_uli.c  | 2 +-
 drivers/ata/sata_via.c  | 2 +-
 drivers/ata/sata_vsc.c  | 2 +-
 include/linux/ata.h | 2 +-
 include/linux/libata.h  | 2 +-
 25 files changed, 25 insertions(+), 25 deletions(-)

diff --git a/drivers/ata/acard-ahci.c b/drivers/ata/acard-ahci.c
index ed6a30cd681a..940ddbc59aa7 100644
--- a/drivers/ata/acard-ahci.c
+++ b/drivers/ata/acard-ahci.c
@@ -25,7 +25,7 @@
  *
  *
  * libata documentation is available via 'make {ps|pdf}docs',
- * as Documentation/DocBook/libata.*
+ * as Documentation/driver-api/libata.rst
  *
  * AHCI hardware documentation:
  * http://www.intel.com/technology/serialata/pdf/rev1_0.pdf
diff --git a/drivers/ata/ahci.c b/drivers/ata/ahci.c
index 2fc52407306c..fd712e0e9d87 100644
--- a/drivers/ata/ahci.c
+++ b/drivers/ata/ahci.c
@@ -24,7 +24,7 @@
  *
  *
  * libata documentation is available via 'make {ps|pdf}docs',
- * as Documentation/DocBook/libata.*
+ * as Documentation/driver-api/libata.rst
  *
  * AHCI hardware documentation:
  * http://www.intel.com/technology/serialata/pdf/rev1_0.pdf
diff --git a/drivers/ata/ahci.h b/drivers/ata/ahci.h
index 5db6ab261643..30f67a1a4f54 100644
--- a/drivers/ata/ahci.h
+++ b/drivers/ata/ahci.h
@@ -24,7 +24,7 @@
  *
  *
  * libata documentation is available via 'make {ps|pdf}docs',
- * as Documentation/DocBook/libata.*
+ * as Documentation/driver-api/libata.rst
  *
  * AHCI hardware documentation:
  * http://www.intel.com/technology/serialata/pdf/rev1_0.pdf
diff --git a/drivers/ata/ata_piix.c b/drivers/ata/ata_piix.c
index ffbe625e6fd2..8401c3b5be92 100644
--- a/drivers/ata/ata_piix.c
+++ b/drivers/ata/ata_piix.c
@@ -33,7 +33,7 @@
  *
  *
  *  libata documentation is available via 'make {ps|pdf}docs',
- *  as Documentation/DocBook/libata.*
+ *  as Documentation/driver-api/libata.rst
  *
  *  Hardware documentation available at http://developer.intel.com/
  *
diff --git a/drivers/ata/libahci.c b/drivers/ata/libahci.c
index 3159f9e66d8f..6154f0e2b81a 100644
--- a/drivers/ata/libahci.c
+++ b/drivers/ata/libahci.c
@@ -24,7 +24,7 @@
  *
  *
  * libata documentation is available via 'make {ps|pdf}docs',
- * as Documentation/DocBook/libata.*
+ * as Documentation/driver-api/libata.rst
  *
  * AHCI hardware documentation:
  * http://www.intel.com/technology/serialata/pdf/rev1_0.pdf
diff --git a/drivers/ata/libata-core.c b/drivers/ata/libata-core.c
index 2d83b8c75965..55aaa2e4c683 100644
--- a/drivers/ata/libata-core.c
+++ b/drivers/ata/libata-core.c
@@ -25,7 +25,7 @@
  *
  *
  *  libata documentation is available via 'make {ps|pdf}docs',
- *  as Documentation/DocBook/libata.*
+ *  as Documentation/driver-api/libata.rst
  *
  *  Hardware documentation available from http://www.t13.org/ and
  *  http://www.sata-io.org/
diff --git a/drivers/ata/libata-eh.c b/drivers/ata/libata-eh.c
index ef68232b5222..7e33e200aae5 100644
--- a/drivers/ata/libata-eh.c
+++ b/drivers/ata/libata-eh.c
@@ -25,7 +25,7 @@
  *
  *
  *  libata documentation is available via 'make {ps|pdf}docs',
- *  as Documentation/DocBook/libata.*
+ *  as Documentation/driver-api/libata.rst
  *
  *  Hardware documentation available from http://www.t13.org/ and
  *  http://www.sata-io.org/
diff --git a/drivers/ata/libata-scsi.c b/drivers/ata/libata-scsi.c
index dcd38d9e9804..b0866f040d1f 100644
--- a/drivers/ata/libata-scsi.c
+++ b/drivers/ata/libata-scsi.c
@@ -25,7 +25,7 @@
  *
  *
  *  libata documentation is available via 'make {ps|pdf}docs',
- *  as Documentation/DocBook/libata.*
+ *  as Documentation/driver-api/libata.rst
  *
  *  Hardware documentation available from
  *  - http://www.t10.org/
diff --git a/drivers/ata/libata-sff.c b/drivers/ata/libata-sff.c
index 274d6d7193d7..052921352f31 100644
--- a/drivers/ata/libata-sff.c
+++ b/drivers/ata/libata-sff.c
@@ -25,7 +25,7 @@
  *
  *
  *  libata documentation is available via 'make {ps|pdf}docs',
- *  as Documentation/DocBook/libata.*
+ *  as Documentation/driver-api/libata.rst
  *
  *  Hardware documentation available from http://www.t13.org/ and
  *  http://www.sata-io.org/
diff --git a/drivers/ata/libata.h b/drivers/ata/libata.h
index 120fce0befd3..5af

[PATCH v2 08/53] docs-rst: convert kgdb DocBook to ReST

2017-05-16 Thread Mauro Carvalho Chehab
Use pandoc to convert documentation to ReST by calling
Documentation/sphinx/tmplcvt script.

Signed-off-by: Mauro Carvalho Chehab 
---
 Documentation/DocBook/Makefile|   2 +-
 Documentation/DocBook/kgdb.tmpl   | 918 -
 Documentation/dev-tools/index.rst |   1 +
 Documentation/dev-tools/kgdb.rst  | 930 ++
 4 files changed, 932 insertions(+), 919 deletions(-)
 delete mode 100644 Documentation/DocBook/kgdb.tmpl
 create mode 100644 Documentation/dev-tools/kgdb.rst

diff --git a/Documentation/DocBook/Makefile b/Documentation/DocBook/Makefile
index 9df94f7c2003..b9d2b88b9905 100644
--- a/Documentation/DocBook/Makefile
+++ b/Documentation/DocBook/Makefile
@@ -8,7 +8,7 @@
 
 DOCBOOKS := z8530book.xml  \
networking.xml \
-   filesystems.xml lsm.xml kgdb.xml \
+   filesystems.xml lsm.xml \
libata.xml mtdnand.xml librs.xml rapidio.xml \
s390-drivers.xml scsi.xml \
sh.xml w1.xml
diff --git a/Documentation/DocBook/kgdb.tmpl b/Documentation/DocBook/kgdb.tmpl
deleted file mode 100644
index 856ac20bf367..
--- a/Documentation/DocBook/kgdb.tmpl
+++ /dev/null
@@ -1,918 +0,0 @@
-
-http://www.oasis-open.org/docbook/xml/4.1.2/docbookx.dtd"; []>
-
-
- 
-  Using kgdb, kdb and the kernel debugger internals
-
-  
-   
-Jason
-Wessel
-
- 
-  jason.wes...@windriver.com
- 
-
-   
-  
-  
-   2008,2010
-   Wind River Systems, Inc.
-  
-  
-   2004-2005
-   MontaVista Software, Inc.
-  
-  
-   2004
-   Amit S. Kale
-  
-
-  
-   
-   This file is licensed under the terms of the GNU General Public License
-   version 2. This program is licensed "as is" without any warranty of any
-   kind, whether express or implied.
-   
-
-  
- 
-
-
-  
-Introduction
-
-The kernel has two different debugger front ends (kdb and kgdb)
-which interface to the debug core.  It is possible to use either
-of the debugger front ends and dynamically transition between them
-if you configure the kernel properly at compile and runtime.
-
-
-Kdb is simplistic shell-style interface which you can use on a
-system console with a keyboard or serial console.  You can use it
-to inspect memory, registers, process lists, dmesg, and even set
-breakpoints to stop in a certain location.  Kdb is not a source
-level debugger, although you can set breakpoints and execute some
-basic kernel run control.  Kdb is mainly aimed at doing some
-analysis to aid in development or diagnosing kernel problems.  You
-can access some symbols by name in kernel built-ins or in kernel
-modules if the code was built
-with CONFIG_KALLSYMS.
-
-
-Kgdb is intended to be used as a source level debugger for the
-Linux kernel. It is used along with gdb to debug a Linux kernel.
-The expectation is that gdb can be used to "break in" to the
-kernel to inspect memory, variables and look through call stack
-information similar to the way an application developer would use
-gdb to debug an application.  It is possible to place breakpoints
-in kernel code and perform some limited execution stepping.
-
-
-Two machines are required for using kgdb. One of these machines is
-a development machine and the other is the target machine.  The
-kernel to be debugged runs on the target machine. The development
-machine runs an instance of gdb against the vmlinux file which
-contains the symbols (not a boot image such as bzImage, zImage,
-uImage...).  In gdb the developer specifies the connection
-parameters and connects to kgdb.  The type of connection a
-developer makes with gdb depends on the availability of kgdb I/O
-modules compiled as built-ins or loadable kernel modules in the test
-machine's kernel.
-
-  
-  
-  Compiling a kernel
-  
-  
-  In order to enable compilation of kdb, you must first enable 
kgdb.
-  The kgdb test compile options are described in the kgdb test 
suite chapter.
-  
-  
-  
-Kernel config options for kgdb
-
-To enable CONFIG_KGDB you should look under
-"Kernel hacking" / "Kernel debugging" and select "KGDB: kernel debugger".
-
-
-While it is not a hard requirement that you have symbols in your
-vmlinux file, gdb tends not to be very useful without the symbolic
-data, so you will want to turn
-on CONFIG_DEBUG_INFO which is called "Compile the
-kernel with debug info" in the config menu.
-
-
-It is advised, but not required, that you turn on the
-CONFIG_FRAME_POINTER kernel option which is called 
"Compile the
-kernel with frame pointers" in the config menu.  This option
-inserts code to into the compiled executable which saves the frame
-information in registers or on the stack at different points which
-allows a debugger such as gdb to more accurately construct
-stack back tr

[PATCH v2 24/53] docs-rst: convert libata book to ReST

2017-05-16 Thread Mauro Carvalho Chehab
Use pandoc to convert documentation to ReST by calling
Documentation/sphinx/tmplcvt script.

Signed-off-by: Mauro Carvalho Chehab 
---
 Documentation/DocBook/Makefile  |2 +-
 Documentation/DocBook/libata.tmpl   | 1625 ---
 Documentation/driver-api/index.rst  |1 +
 Documentation/driver-api/libata.rst | 1027 ++
 4 files changed, 1029 insertions(+), 1626 deletions(-)
 delete mode 100644 Documentation/DocBook/libata.tmpl
 create mode 100644 Documentation/driver-api/libata.rst

diff --git a/Documentation/DocBook/Makefile b/Documentation/DocBook/Makefile
index 2f767e30b59e..abe71345160b 100644
--- a/Documentation/DocBook/Makefile
+++ b/Documentation/DocBook/Makefile
@@ -9,7 +9,7 @@
 DOCBOOKS := z8530book.xml  \
networking.xml \
lsm.xml \
-   libata.xml mtdnand.xml librs.xml rapidio.xml \
+   mtdnand.xml librs.xml rapidio.xml \
s390-drivers.xml scsi.xml \
sh.xml w1.xml
 
diff --git a/Documentation/DocBook/libata.tmpl 
b/Documentation/DocBook/libata.tmpl
deleted file mode 100644
index 0320910b866d..
--- a/Documentation/DocBook/libata.tmpl
+++ /dev/null
@@ -1,1625 +0,0 @@
-
-http://www.oasis-open.org/docbook/xml/4.1.2/docbookx.dtd"; []>
-
-
- 
-  libATA Developer's Guide
-  
-  
-   
-Jeff
-Garzik
-   
-  
-
-  
-   2003-2006
-   Jeff Garzik
-  
-
-  
-   
-   The contents of this file are subject to the Open
-   Software License version 1.1 that can be found at
-   http://fedoraproject.org/wiki/Licensing:OSL1.1";>http://fedoraproject.org/wiki/Licensing:OSL1.1
-   and is included herein by reference.
-   
-
-   
-   Alternatively, the contents of this file may be used under the terms
-   of the GNU General Public License version 2 (the "GPL") as distributed
-   in the kernel source COPYING file, in which case the provisions of
-   the GPL are applicable instead of the above.  If you wish to allow
-   the use of your version of this file only under the terms of the
-   GPL and not to allow others to use your version of this file under
-   the OSL, indicate your decision by deleting the provisions above and
-   replace them with the notice and other provisions required by the GPL.
-   If you do not delete the provisions above, a recipient may use your
-   version of this file under either the OSL or the GPL.
-   
-
-  
- 
-
-
-
-  
- Introduction
-  
-  libATA is a library used inside the Linux kernel to support ATA host
-  controllers and devices.  libATA provides an ATA driver API, class
-  transports for ATA and ATAPI devices, and SCSI<->ATA translation
-  for ATA devices according to the T10 SAT specification.
-  
-  
-  This Guide documents the libATA driver API, library functions, library
-  internals, and a couple sample ATA low-level drivers.
-  
-  
-
-  
- libata Driver API
- 
- struct ata_port_operations is defined for every low-level libata
- hardware driver, and it controls how the low-level driver
- interfaces with the ATA and SCSI layers.
- 
- 
- FIS-based drivers will hook into the system with ->qc_prep() and
- ->qc_issue() high-level hooks.  Hardware which behaves in a manner
- similar to PCI IDE hardware may utilize several generic helpers,
- defining at a bare minimum the bus I/O addresses of the ATA shadow
- register blocks.
- 
- 
-struct ata_port_operations
-
-   Disable ATA port
-   
-void (*port_disable) (struct ata_port *);
-   
-
-   
-   Called from ata_bus_probe() error path, as well as when
-   unregistering from the SCSI module (rmmod, hot unplug).
-   This function should do whatever needs to be done to take the
-   port out of use.  In most cases, ata_port_disable() can be used
-   as this hook.
-   
-   
-   Called from ata_bus_probe() on a failed probe.
-   Called from ata_scsi_release().
-   
-
-   
-
-   Post-IDENTIFY device configuration
-   
-void (*dev_config) (struct ata_port *, struct ata_device *);
-   
-
-   
-   Called after IDENTIFY [PACKET] DEVICE is issued to each device
-   found.  Typically used to apply device-specific fixups prior to
-   issue of SET FEATURES - XFER MODE, and prior to operation.
-   
-   
-   This entry may be specified as NULL in ata_port_operations.
-   
-
-   
-
-   Set PIO/DMA mode
-   
-void (*set_piomode) (struct ata_port *, struct ata_device *);
-void (*set_dmamode) (struct ata_port *, struct ata_device *);
-void (*post_set_mode) (struct ata_port *);
-unsigned int (*mode_filter) (struct ata_port *, struct ata_device *, unsigned 
int);
-   
-
-   
-   Hooks called prior to the issue of SET FEATURES - XFER MODE
-   command.  The optional ->mode_filter() hook is called when libata
-   has built a mask of the possible modes. This is passed to the 
-   ->mode_filter() function which should return a m

[PATCH v2 19/53] fs: jbd2: make jbd2_journal_start() kernel-doc parseable

2017-05-16 Thread Mauro Carvalho Chehab
kernel-doc script expects that a function documentation to
be just before the function, otherwise it will be ignored.

So, move the kernel-doc markup to the right place.

Reviewed-by: Jan Kara 
Signed-off-by: Mauro Carvalho Chehab 
---
 fs/jbd2/transaction.c | 38 +++---
 1 file changed, 19 insertions(+), 19 deletions(-)

diff --git a/fs/jbd2/transaction.c b/fs/jbd2/transaction.c
index 9ee4832b6f8b..fe7f4a373436 100644
--- a/fs/jbd2/transaction.c
+++ b/fs/jbd2/transaction.c
@@ -409,25 +409,6 @@ static handle_t *new_handle(int nblocks)
return handle;
 }
 
-/**
- * handle_t *jbd2_journal_start() - Obtain a new handle.
- * @journal: Journal to start transaction on.
- * @nblocks: number of block buffer we might modify
- *
- * We make sure that the transaction can guarantee at least nblocks of
- * modified buffers in the log.  We block until the log can guarantee
- * that much space. Additionally, if rsv_blocks > 0, we also create another
- * handle with rsv_blocks reserved blocks in the journal. This handle is
- * is stored in h_rsv_handle. It is not attached to any particular transaction
- * and thus doesn't block transaction commit. If the caller uses this reserved
- * handle, it has to set h_rsv_handle to NULL as otherwise jbd2_journal_stop()
- * on the parent handle will dispose the reserved one. Reserved handle has to
- * be converted to a normal handle using jbd2_journal_start_reserved() before
- * it can be used.
- *
- * Return a pointer to a newly allocated handle, or an ERR_PTR() value
- * on failure.
- */
 handle_t *jbd2__journal_start(journal_t *journal, int nblocks, int rsv_blocks,
  gfp_t gfp_mask, unsigned int type,
  unsigned int line_no)
@@ -478,6 +459,25 @@ handle_t *jbd2__journal_start(journal_t *journal, int 
nblocks, int rsv_blocks,
 EXPORT_SYMBOL(jbd2__journal_start);
 
 
+/**
+ * handle_t *jbd2_journal_start() - Obtain a new handle.
+ * @journal: Journal to start transaction on.
+ * @nblocks: number of block buffer we might modify
+ *
+ * We make sure that the transaction can guarantee at least nblocks of
+ * modified buffers in the log.  We block until the log can guarantee
+ * that much space. Additionally, if rsv_blocks > 0, we also create another
+ * handle with rsv_blocks reserved blocks in the journal. This handle is
+ * is stored in h_rsv_handle. It is not attached to any particular transaction
+ * and thus doesn't block transaction commit. If the caller uses this reserved
+ * handle, it has to set h_rsv_handle to NULL as otherwise jbd2_journal_stop()
+ * on the parent handle will dispose the reserved one. Reserved handle has to
+ * be converted to a normal handle using jbd2_journal_start_reserved() before
+ * it can be used.
+ *
+ * Return a pointer to a newly allocated handle, or an ERR_PTR() value
+ * on failure.
+ */
 handle_t *jbd2_journal_start(journal_t *journal, int nblocks)
 {
return jbd2__journal_start(journal, nblocks, 0, GFP_NOFS, 0, 0);
-- 
2.9.3

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


[PATCH v2 17/53] docs-rst: convert filesystems book to ReST

2017-05-16 Thread Mauro Carvalho Chehab
Use pandoc to convert documentation to ReST by calling
Documentation/sphinx/tmplcvt script.

Signed-off-by: Mauro Carvalho Chehab 
---
 Documentation/DocBook/Makefile |   2 +-
 Documentation/DocBook/filesystems.tmpl | 381 -
 Documentation/conf.py  |   2 +
 Documentation/filesystems/conf.py  |  10 +
 Documentation/filesystems/index.rst| 314 +++
 Documentation/index.rst|   1 +
 6 files changed, 328 insertions(+), 382 deletions(-)
 delete mode 100644 Documentation/DocBook/filesystems.tmpl
 create mode 100644 Documentation/filesystems/conf.py
 create mode 100644 Documentation/filesystems/index.rst

diff --git a/Documentation/DocBook/Makefile b/Documentation/DocBook/Makefile
index b9d2b88b9905..2f767e30b59e 100644
--- a/Documentation/DocBook/Makefile
+++ b/Documentation/DocBook/Makefile
@@ -8,7 +8,7 @@
 
 DOCBOOKS := z8530book.xml  \
networking.xml \
-   filesystems.xml lsm.xml \
+   lsm.xml \
libata.xml mtdnand.xml librs.xml rapidio.xml \
s390-drivers.xml scsi.xml \
sh.xml w1.xml
diff --git a/Documentation/DocBook/filesystems.tmpl 
b/Documentation/DocBook/filesystems.tmpl
deleted file mode 100644
index 6006b6358c86..
--- a/Documentation/DocBook/filesystems.tmpl
+++ /dev/null
@@ -1,381 +0,0 @@
-
-http://www.oasis-open.org/docbook/xml/4.1.2/docbookx.dtd"; []>
-
-
- 
-  Linux Filesystems API
-
-  
-   
- This documentation is free software; you can redistribute
- it and/or modify it under the terms of the GNU General Public
- License as published by the Free Software Foundation; either
- version 2 of the License, or (at your option) any later
- version.
-   
-
-   
- This program is distributed in the hope that it will be
- useful, but WITHOUT ANY WARRANTY; without even the implied
- warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
- See the GNU General Public License for more details.
-   
-
-   
- You should have received a copy of the GNU General Public
- License along with this program; if not, write to the Free
- Software Foundation, Inc., 59 Temple Place, Suite 330, Boston,
- MA 02111-1307 USA
-   
-
-   
- For more details see the file COPYING in the source
- distribution of Linux.
-   
-  
- 
-
-
-
-  
- The Linux VFS
- The Filesystem types
-!Iinclude/linux/fs.h
- 
- The Directory Cache
-!Efs/dcache.c
-!Iinclude/linux/dcache.h
- 
- Inode Handling
-!Efs/inode.c
-!Efs/bad_inode.c
- 
- Registration and 
Superblocks
-!Efs/super.c
- 
- File Locks
-!Efs/locks.c
-!Ifs/locks.c
- 
- Other Functions
-!Efs/mpage.c
-!Efs/namei.c
-!Efs/buffer.c
-!Eblock/bio.c
-!Efs/seq_file.c
-!Efs/filesystems.c
-!Efs/fs-writeback.c
-!Efs/block_dev.c
- 
-  
-
-  
- The proc filesystem
-
- sysctl interface
-!Ekernel/sysctl.c
- 
-
- proc filesystem 
interface
-!Ifs/proc/base.c
- 
-  
-
-  
- Events based on file descriptors
-!Efs/eventfd.c
-  
-
-  
- The Filesystem for Exporting Kernel Objects
-!Efs/sysfs/file.c
-!Efs/sysfs/symlink.c
-  
-
-  
- The debugfs filesystem
-
- debugfs interface
-!Efs/debugfs/inode.c
-!Efs/debugfs/file.c
- 
-  
-
-  
-  
-  The Linux Journalling API
-
-  
-  
- Roger
- Gammans
- 
- 
-  rgamm...@computer-surgery.co.uk
- 
-
- 
-  
-
-  
-   
-Stephen
-Tweedie
-
- 
-  s...@redhat.com
- 
-
-   
-  
-
-  
-   2002
-   Roger Gammans
-  
-  
-
-  The Linux Journalling API
-
-
- Overview
-
- Details
-
-The journalling layer is  easy to use. You need to
-first of all create a journal_t data structure. There are
-two calls to do this dependent on how you decide to allocate the physical
-media on which the journal resides. The jbd2_journal_init_inode() call
-is for journals stored in filesystem inodes, or the jbd2_journal_init_dev()
-call can be used for journal stored on a raw device (in a continuous range
-of blocks). A journal_t is a typedef for a struct pointer, so when
-you are finally finished make sure you call jbd2_journal_destroy() on it
-to free up any used kernel memory.
-
-
-
-Once you have got your journal_t object you need to 'mount' or load the journal
-file. The journalling layer expects the space for the journal was already
-allocated and initialized properly by the userspace tools.  When loading the
-journal you must call jbd2_journal_load() to process journal contents.  If the
-client file system detects the journal contents does not need to be processed
-(or even need not have valid contents), it may call jbd2_journal_wipe() to
-clear the journal contents before calling jbd2_journal_load().
-
-
-
-Note that jbd2_journal_wipe(..,0) calls jbd2_journal_skip_recovery() for you if
-it detects any outstanding transactions in the journal and similarly
-jbd2_journal_load() will call jbd2_jou

[PATCH v2 00/53] Get rid of Docbook

2017-05-16 Thread Mauro Carvalho Chehab

This patch series convert the remaining DocBooks to ReST.

The first version was originally
send as 3 patch series:

   [PATCH 00/36] Convert DocBook documents to ReST
   [PATCH 0/5] Convert more books to ReST
   [PATCH 00/13] Get rid of DocBook

The lsm book was added as if it were a text file under 
Documentation. The plan is to merge it with another file 
under Documentation/security, after both this series and
a security Documentation patch series gets merged.

It also adjusts some Sphinx-pedantic errors/warnings on
some kernel-doc markups.

I also added some patches here to add PDF output for all
existing ReST books.

I did my best to check if what's there is not too outdated, but
the best is if the subsystem maintainers could check it.

This patch series is based on docs tree (next branch):

   git://git.lwn.net/linux.git docs-next

The full patch series is on this tree:

   https://git.linuxtv.org//mchehab/experimental.git/log/?h=docbook3

And the HTML output at:

  http://www.infradead.org/~mchehab/kernel_docs/
  https://mchehab.fedorapeople.org/kernel_docs/  


--

v2: 
  - merged the 3 other patch series into just one
  - added a patch describing ``literal`` kernel-doc syntax
  - addressed the points taken during review process
  - removed two patches that will be merged via subsystem
trees:
[PATCH 10/13] sound: fix the comments that refers to kernel-doc
[PATCH 21/36] fs: locks: Fix some troubles at kernel-doc  comments

Mauro Carvalho Chehab (53):
  docs-rst: convert kernel-hacking to ReST
  kernel-hacking: update document
  docs-rst: convert kernel-locking to ReST
  mutex, futex: adjust kernel-doc markups to generate ReST
  locking.rst: reformat locking table
  locking.rst: add captions to two tables
  locking.rst: Update some ReST markups
  docs-rst: convert kgdb DocBook to ReST
  kgdb.rst: Adjust ReST markups
  conf.py: define a color for important markup on PDF output
  docs-rst: conf.py: sort LaTeX documents in alphabetical order
  docs-rst: conf.py: remove kernel-documentation from LaTeX
  docs-rst: add crypto API book to pdf output
  docs-rst: add dev-tools book to pdf output
  docs-rst: add sound book to pdf output
  docs-rst: add userspace API book to pdf output
  docs-rst: convert filesystems book to ReST
  docs-rst: filesystems: use c domain references where needed
  fs: jbd2: make jbd2_journal_start() kernel-doc parseable
  docs-rst: don't ignore internal functions for jbd2 docs
  fs: add a blank lines on some kernel-doc comments
  fs: eventfd: fix identation on kernel-doc
  fs: jbd2: escape a string with special chars on a kernel-doc
  docs-rst: convert libata book to ReST
  libata.rst: add c function and struct cross-references
  libata: fix identation on a kernel-doc markup
  docs-rst: convert s390-drivers DocBook to ReST
  docs-rst: convert networking book to ReST
  net: skbuff.h: properly escape a macro name on kernel-doc
  net: fix some identation issues at kernel-doc markups
  docs-rst: convert z8530book DocBook to ReST
  docs-rst: convert scsi DocBook to ReST
  scsi: fix some kernel-doc markups
  docs-rst: convert w1 book to ReST
  docs-rst: convert rapidio book to ReST
  docs-rst: convert librs book to ReST
  docs-rst: convert mtdnand book to ReST
  mtdnand.rst: group the "::" with previous line
  mtd: adjust kernel-docs to avoid Sphinx/kerneldoc warnings
  docs-rst: convert sh book to ReST
  docs-rst: convert lsm from DocBook to ReST
  docs: remove DocBook from the building system
  docs: update old references for DocBook from the documentation
  MAINTAINERS: update old references for DocBook directory
  ata: update references for libata documentation
  ia64, scsi: update references for the device-io book
  irq: update genericirq book location
  fs: update location of filesystems documentation
  lib: update location of kgdb documentation
  fs: fix the location of the kernel-api book
  usb: fix the comment with regards to DocBook
  docs-rst: get rid of Documentation/sphinx/tmplcvt script
  kernel-doc: describe the ``literal`` syntax

 Documentation/00-INDEX |6 +-
 Documentation/DocBook/.gitignore   |   17 -
 Documentation/DocBook/Makefile |  282 
 Documentation/DocBook/filesystems.tmpl |  381 -
 Documentation/DocBook/kernel-hacking.tmpl  | 1312 -
 Documentation/DocBook/kernel-locking.tmpl  | 2151 
 Documentation/DocBook/kgdb.tmpl|  918 
 Documentation/DocBook/libata.tmpl  | 1625 -
 Documentation/DocBook/librs.tmpl   |  289 
 Documentation/DocBook/lsm.tmpl |  265 
 Documentation/DocBook/mtdnand.tmpl | 1291 -
 Documentation/DocBook/networking.tmpl  |  111 --
 Documentation/DocBook/rapidio.tmpl |  155 --
 Documentation/DocBook/s390-drivers.tmpl|  161 ---
 Documentation/DocBook/scsi.tmpl|  409 --
 Documentation/DocBook/sh.

[PATCH v2 42/53] docs: remove DocBook from the building system

2017-05-16 Thread Mauro Carvalho Chehab
Now that we don't have any DocBook anymore, remove it from
the building system.

Signed-off-by: Mauro Carvalho Chehab 
---
 Documentation/00-INDEX   |   4 --
 Documentation/DocBook/.gitignore |  17 -
 Documentation/DocBook/Makefile   |   1 -
 Documentation/DocBook/stylesheet.xsl |  11 ---
 Documentation/Makefile   | 125 +
 Documentation/Makefile.sphinx| 130 ---
 Documentation/doc-guide/docbook.rst  |  90 
 Makefile |  11 ++-
 scripts/Makefile |   9 +--
 scripts/check-lc_ctype.c |  11 ---
 10 files changed, 132 insertions(+), 277 deletions(-)
 delete mode 100644 Documentation/DocBook/.gitignore
 delete mode 100644 Documentation/DocBook/Makefile
 delete mode 100644 Documentation/DocBook/stylesheet.xsl
 delete mode 100644 Documentation/Makefile.sphinx
 delete mode 100644 Documentation/doc-guide/docbook.rst
 delete mode 100644 scripts/check-lc_ctype.c

diff --git a/Documentation/00-INDEX b/Documentation/00-INDEX
index 8c2a66e176b9..d0165461b024 100644
--- a/Documentation/00-INDEX
+++ b/Documentation/00-INDEX
@@ -24,8 +24,6 @@ DMA-ISA-LPC.txt
- How to do DMA with ISA (and LPC) devices.
 DMA-attributes.txt
- listing of the various possible attributes a DMA region can have
-DocBook/
-   - directory with DocBook templates etc. for kernel documentation.
 EDID/
- directory with info on customizing EDID for broken gfx/displays.
 IPMI.txt
@@ -40,8 +38,6 @@ Intel-IOMMU.txt
- basic info on the Intel IOMMU virtualization support.
 Makefile
- It's not of interest for those who aren't touching the build system.
-Makefile.sphinx
-   - It's not of interest for those who aren't touching the build system.
 PCI/
- info related to PCI drivers.
 RCU/
diff --git a/Documentation/DocBook/.gitignore b/Documentation/DocBook/.gitignore
deleted file mode 100644
index e05da3f7aa21..
--- a/Documentation/DocBook/.gitignore
+++ /dev/null
@@ -1,17 +0,0 @@
-*.xml
-*.ps
-*.pdf
-*.html
-*.9.gz
-*.9
-*.aux
-*.dvi
-*.log
-*.out
-*.png
-*.gif
-*.svg
-*.proc
-*.db
-media-indices.tmpl
-media-entities.tmpl
diff --git a/Documentation/DocBook/Makefile b/Documentation/DocBook/Makefile
deleted file mode 100644
index 8b137891791f..
--- a/Documentation/DocBook/Makefile
+++ /dev/null
@@ -1 +0,0 @@
-
diff --git a/Documentation/DocBook/stylesheet.xsl 
b/Documentation/DocBook/stylesheet.xsl
deleted file mode 100644
index 3bf4ecf3d760..
--- a/Documentation/DocBook/stylesheet.xsl
+++ /dev/null
@@ -1,11 +0,0 @@
-
-http://www.w3.org/1999/XSL/Transform"; version="1.0">
-1
-ansi
-80
-0
-
-1
-2
-1
-
diff --git a/Documentation/Makefile b/Documentation/Makefile
index c2a469112c37..a42320385df3 100644
--- a/Documentation/Makefile
+++ b/Documentation/Makefile
@@ -1 +1,126 @@
+# -*- makefile -*-
+# Makefile for Sphinx documentation
+#
+
 subdir-y :=
+
+# You can set these variables from the command line.
+SPHINXBUILD   = sphinx-build
+SPHINXOPTS=
+SPHINXDIRS= .
+_SPHINXDIRS   = $(patsubst $(srctree)/Documentation/%/conf.py,%,$(wildcard 
$(srctree)/Documentation/*/conf.py))
+SPHINX_CONF   = conf.py
+PAPER =
+BUILDDIR  = $(obj)/output
+PDFLATEX  = xelatex
+LATEXOPTS = -interaction=batchmode
+
+# User-friendly check for sphinx-build
+HAVE_SPHINX := $(shell if which $(SPHINXBUILD) >/dev/null 2>&1; then echo 1; 
else echo 0; fi)
+
+ifeq ($(HAVE_SPHINX),0)
+
+.DEFAULT:
+   $(warning The '$(SPHINXBUILD)' command was not found. Make sure you 
have Sphinx installed and in PATH, or set the SPHINXBUILD make variable to 
point to the full path of the '$(SPHINXBUILD)' executable.)
+   @echo "  SKIPSphinx $@ target."
+
+else # HAVE_SPHINX
+
+# User-friendly check for pdflatex
+HAVE_PDFLATEX := $(shell if which $(PDFLATEX) >/dev/null 2>&1; then echo 1; 
else echo 0; fi)
+
+# Internal variables.
+PAPEROPT_a4 = -D latex_paper_size=a4
+PAPEROPT_letter = -D latex_paper_size=letter
+KERNELDOC   = $(srctree)/scripts/kernel-doc
+KERNELDOC_CONF  = -D kerneldoc_srctree=$(srctree) -D kerneldoc_bin=$(KERNELDOC)
+ALLSPHINXOPTS   =  $(KERNELDOC_CONF) $(PAPEROPT_$(PAPER)) $(SPHINXOPTS)
+# the i18n builder cannot share the environment and doctrees with the others
+I18NSPHINXOPTS  = $(PAPEROPT_$(PAPER)) $(SPHINXOPTS) .
+
+# commands; the 'cmd' from scripts/Kbuild.include is not *loopable*
+loop_cmd = $(echo-cmd) $(cmd_$(1)) || exit;
+
+# $2 sphinx builder e.g. "html"
+# $3 name of the build subfolder / e.g. "media", used as:
+#* dest folder relative to $(BUILDDIR) and
+#* cache folder relative to $(BUILDDIR)/.doctrees
+# $4 dest subfolder e.g. "man" for man pages at media/man
+# $5 reST source folder relative to $(srctree)/$(src),
+#e.g. "media" for the linux-tv book-set at ./Documentation/media
+
+quiet_cmd_sphinx = SPHINX  $@ --> file://$(abspath $(BUILDDIR)/$3/$

[PATCH v2 49/53] lib: update location of kgdb documentation

2017-05-16 Thread Mauro Carvalho Chehab
The documentation was moved from DocBook directory.
Update its location.

Signed-off-by: Mauro Carvalho Chehab 
---
 lib/Kconfig.kgdb | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/lib/Kconfig.kgdb b/lib/Kconfig.kgdb
index 533f912638ed..ab4ff0eea776 100644
--- a/lib/Kconfig.kgdb
+++ b/lib/Kconfig.kgdb
@@ -13,7 +13,7 @@ menuconfig KGDB
  CONFIG_FRAME_POINTER to aid in producing more reliable stack
  backtraces in the external debugger.  Documentation of
  kernel debugger is available at http://kgdb.sourceforge.net
- as well as in DocBook form in Documentation/DocBook/.  If
+ as well as in Documentation/dev-tools/kgdb.rst.  If
  unsure, say N.
 
 if KGDB
-- 
2.9.3

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


[PATCH v2 36/53] docs-rst: convert librs book to ReST

2017-05-16 Thread Mauro Carvalho Chehab
Use pandoc to convert documentation to ReST by calling
Documentation/sphinx/tmplcvt script.

Signed-off-by: Mauro Carvalho Chehab 
---
 Documentation/DocBook/Makefile   |   2 +-
 Documentation/DocBook/librs.tmpl | 289 ---
 Documentation/core-api/index.rst |   1 +
 Documentation/core-api/librs.rst | 212 
 4 files changed, 214 insertions(+), 290 deletions(-)
 delete mode 100644 Documentation/DocBook/librs.tmpl
 create mode 100644 Documentation/core-api/librs.rst

diff --git a/Documentation/DocBook/Makefile b/Documentation/DocBook/Makefile
index baedb14f3b40..0a82f6253682 100644
--- a/Documentation/DocBook/Makefile
+++ b/Documentation/DocBook/Makefile
@@ -8,7 +8,7 @@
 
 DOCBOOKS := \
lsm.xml \
-   mtdnand.xml librs.xml \
+   mtdnand.xml \
sh.xml
 
 ifeq ($(DOCBOOKS),)
diff --git a/Documentation/DocBook/librs.tmpl b/Documentation/DocBook/librs.tmpl
deleted file mode 100644
index 94f21361e0ed..
--- a/Documentation/DocBook/librs.tmpl
+++ /dev/null
@@ -1,289 +0,0 @@
-
-http://www.oasis-open.org/docbook/xml/4.1.2/docbookx.dtd"; []>
-
-
- 
-  Reed-Solomon Library Programming Interface
-  
-  
-   
-Thomas
-Gleixner
-
- 
-  t...@linutronix.de
- 
-
-   
-  
-
-  
-   2004
-   Thomas Gleixner
-  
-
-  
-   
- This documentation is free software; you can redistribute
- it and/or modify it under the terms of the GNU General Public
- License version 2 as published by the Free Software Foundation.
-   
-  
-   
- This program is distributed in the hope that it will be
- useful, but WITHOUT ANY WARRANTY; without even the implied
- warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
- See the GNU General Public License for more details.
-   
-  
-   
- You should have received a copy of the GNU General Public
- License along with this program; if not, write to the Free
- Software Foundation, Inc., 59 Temple Place, Suite 330, Boston,
- MA 02111-1307 USA
-   
-  
-   
- For more details see the file COPYING in the source
- distribution of Linux.
-   
-  
- 
-
-
-
-  
-  Introduction
-  
-   The generic Reed-Solomon Library provides encoding, decoding
-   and error correction functions.
-  
-  
-   Reed-Solomon codes are used in communication and storage
-   applications to ensure data integrity. 
-  
-  
-   This documentation is provided for developers who want to utilize
-   the functions provided by the library.
-  
-  
-  
-  
- Known Bugs And Assumptions
-  
-   None.   
-  
-  
-
-  
-   Usage
-   
-   This chapter provides examples of how to use the library.
-   
-   
-   Initializing
-   
-   The init function init_rs returns a pointer to an
-   rs decoder structure, which holds the necessary
-   information for encoding, decoding and error correction
-   with the given polynomial. It either uses an existing
-   matching decoder or creates a new one. On creation all
-   the lookup tables for fast en/decoding are created.
-   The function may take a while, so make sure not to 
-   call it in critical code paths.
-   
-   
-/* the Reed Solomon control structure */
-static struct rs_control *rs_decoder;
-
-/* Symbolsize is 10 (bits)
- * Primitive polynomial is x^10+x^3+1
- * first consecutive root is 0
- * primitive element to generate roots = 1
- * generator polynomial degree (number of roots) = 6
- */
-rs_decoder = init_rs (10, 0x409, 0, 1, 6);
-   
-   
-   
-   Encoding
-   
-   The encoder calculates the Reed-Solomon code over
-   the given data length and stores the result in 
-   the parity buffer. Note that the parity buffer must
-   be initialized before calling the encoder.
-   
-   
-   The expanded data can be inverted on the fly by
-   providing a non-zero inversion mask. The expanded data 
is
-   XOR'ed with the mask. This is used e.g. for FLASH
-   ECC, where the all 0xFF is inverted to an all 0x00.
-   The Reed-Solomon code for all 0x00 is all 0x00. The
-   code is inverted before storing to FLASH so it is 0xFF
-   too. This prevents that reading from an erased FLASH
-   results in ECC errors.
-   
-   
-   The databytes are expanded to the given symbol size
-   on the fly. There is no support for encoding continuous
-   bitstreams with 

[PATCH v2 14/53] docs-rst: add dev-tools book to pdf output

2017-05-16 Thread Mauro Carvalho Chehab
The dev-tools API book was added without the bits required to
generate PDF output at the main conf.py. Add them.

Signed-off-by: Mauro Carvalho Chehab 
---
 Documentation/conf.py | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/Documentation/conf.py b/Documentation/conf.py
index ce62723491d4..1d461f0c1cd0 100644
--- a/Documentation/conf.py
+++ b/Documentation/conf.py
@@ -353,6 +353,8 @@ latex_documents = [
  'The kernel development community', 'manual'),
 ('crypto/index', 'crypto-api.tex', 'Linux Kernel Crypto API manual',
  'The kernel development community', 'manual'),
+('dev-tools/index', 'dev-tools.tex', 'Development tools for the Kernel',
+ 'The kernel development community', 'manual'),
 ('doc-guide/index', 'kernel-doc-guide.tex', 'Linux Kernel Documentation 
Guide',
  'The kernel development community', 'manual'),
 ('driver-api/index', 'driver-api.tex', 'The kernel driver API manual',
-- 
2.9.3

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


[PATCH v2 31/53] docs-rst: convert z8530book DocBook to ReST

2017-05-16 Thread Mauro Carvalho Chehab
Use pandoc to convert documentation to ReST by calling
Documentation/sphinx/tmplcvt script.

Some manual adjustments were required due to some
conversion error on some literals.

Signed-off-by: Mauro Carvalho Chehab 
---
 Documentation/DocBook/Makefile |   2 +-
 Documentation/DocBook/z8530book.tmpl   | 371 -
 Documentation/networking/index.rst |   1 +
 Documentation/networking/z8530book.rst | 257 +++
 4 files changed, 259 insertions(+), 372 deletions(-)
 delete mode 100644 Documentation/DocBook/z8530book.tmpl
 create mode 100644 Documentation/networking/z8530book.rst

diff --git a/Documentation/DocBook/Makefile b/Documentation/DocBook/Makefile
index 8a90891c3712..00a61f4ffcff 100644
--- a/Documentation/DocBook/Makefile
+++ b/Documentation/DocBook/Makefile
@@ -6,7 +6,7 @@
 # To add a new book the only step required is to add the book to the
 # list of DOCBOOKS.
 
-DOCBOOKS := z8530book.xml  \
+DOCBOOKS := \
lsm.xml \
mtdnand.xml librs.xml rapidio.xml \
scsi.xml \
diff --git a/Documentation/DocBook/z8530book.tmpl 
b/Documentation/DocBook/z8530book.tmpl
deleted file mode 100644
index 6f3883be877e..
--- a/Documentation/DocBook/z8530book.tmpl
+++ /dev/null
@@ -1,371 +0,0 @@
-
-http://www.oasis-open.org/docbook/xml/4.1.2/docbookx.dtd"; []>
-
-
- 
-  Z8530 Programming Guide
-  
-  
-   
-Alan
-Cox
-
- 
-  a...@lxorguk.ukuu.org.uk
- 
-
-   
-  
-
-  
-   2000
-   Alan Cox
-  
-
-  
-   
- This documentation is free software; you can redistribute
- it and/or modify it under the terms of the GNU General Public
- License as published by the Free Software Foundation; either
- version 2 of the License, or (at your option) any later
- version.
-   
-  
-   
- This program is distributed in the hope that it will be
- useful, but WITHOUT ANY WARRANTY; without even the implied
- warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
- See the GNU General Public License for more details.
-   
-  
-   
- You should have received a copy of the GNU General Public
- License along with this program; if not, write to the Free
- Software Foundation, Inc., 59 Temple Place, Suite 330, Boston,
- MA 02111-1307 USA
-   
-  
-   
- For more details see the file COPYING in the source
- distribution of Linux.
-   
-  
- 
-
-
-
-  
-  Introduction
-  
-   The Z85x30 family synchronous/asynchronous controller chips are
-   used on a large number of cheap network interface cards. The
-   kernel provides a core interface layer that is designed to make
-   it easy to provide WAN services using this chip.
-  
-  
-   The current driver only support synchronous operation. Merging the
-   asynchronous driver support into this code to allow any Z85x30
-   device to be used as both a tty interface and as a synchronous 
-   controller is a project for Linux post the 2.4 release
-  
-  
-  
-  
-   Driver Modes
-  
-   The Z85230 driver layer can drive Z8530, Z85C30 and Z85230 devices
-   in three different modes. Each mode can be applied to an individual
-   channel on the chip (each chip has two channels).
-  
-  
-   The PIO synchronous mode supports the most common Z8530 wiring. Here
-   the chip is interface to the I/O and interrupt facilities of the
-   host machine but not to the DMA subsystem. When running PIO the
-   Z8530 has extremely tight timing requirements. Doing high speeds,
-   even with a Z85230 will be tricky. Typically you should expect to
-   achieve at best 9600 baud with a Z8C530 and 64Kbits with a Z85230.
-  
-  
-   The DMA mode supports the chip when it is configured to use dual DMA
-   channels on an ISA bus. The better cards tend to support this mode
-   of operation for a single channel. With DMA running the Z85230 tops
-   out when it starts to hit ISA DMA constraints at about 512Kbits. It
-   is worth noting here that many PC machines hang or crash when the
-   chip is driven fast enough to hold the ISA bus solid.
-  
-  
-   Transmit DMA mode uses a single DMA channel. The DMA channel is used
-   for transmission as the transmit FIFO is smaller than the receive
-   FIFO. it gives better performance than pure PIO mode but is nowhere
-   near as ideal as pure DMA mode. 
-  
-  
-
-  
-   Using the Z85230 driver
-  
-   The Z85230 driver provides the back end interface to your board. To
-   configure a Z8530 interface you need to detect the board and to 
-   identify its ports and interrupt resources. It is also your problem
-   to verify the resources are available.
-  
-  
-   Having identified the chip you need to fill in a struct z8530_dev,
-   which describes each chip. This object must exist until you finally
-   shutdown the board. Firstly zero the act

[PATCH v2 15/53] docs-rst: add sound book to pdf output

2017-05-16 Thread Mauro Carvalho Chehab
The sound subsystem book was added without the bits required to
generate PDF output. Add them.

Signed-off-by: Mauro Carvalho Chehab 
---
 Documentation/conf.py   |  2 ++
 Documentation/sound/conf.py | 10 ++
 2 files changed, 12 insertions(+)
 create mode 100644 Documentation/sound/conf.py

diff --git a/Documentation/conf.py b/Documentation/conf.py
index 1d461f0c1cd0..bca751960dec 100644
--- a/Documentation/conf.py
+++ b/Documentation/conf.py
@@ -371,6 +371,8 @@ latex_documents = [
  'The kernel development community', 'manual'),
 ('security/index', 'security.tex', 'The kernel security subsystem manual',
  'The kernel development community', 'manual'),
+('sound/index', 'sound.tex', 'Linux Sound Subsystem Documentation',
+ 'The kernel development community', 'manual'),
 ]
 
 # The name of an image file (relative to this directory) to place at the top of
diff --git a/Documentation/sound/conf.py b/Documentation/sound/conf.py
new file mode 100644
index ..3f1fc5e74e7b
--- /dev/null
+++ b/Documentation/sound/conf.py
@@ -0,0 +1,10 @@
+# -*- coding: utf-8; mode: python -*-
+
+project = "Linux Sound Subsystem Documentation"
+
+tags.add("subproject")
+
+latex_documents = [
+('index', 'sound.tex', project,
+ 'The kernel development community', 'manual'),
+]
-- 
2.9.3

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


[PATCH v2 32/53] docs-rst: convert scsi DocBook to ReST

2017-05-16 Thread Mauro Carvalho Chehab
Use pandoc to convert documentation to ReST by calling
Documentation/sphinx/tmplcvt script.

Signed-off-by: Mauro Carvalho Chehab 
---
 Documentation/DocBook/Makefile |   1 -
 Documentation/DocBook/scsi.tmpl| 409 -
 Documentation/driver-api/index.rst |   1 +
 Documentation/driver-api/scsi.rst  | 344 +++
 Documentation/networking/z8530book.rst |  15 +-
 5 files changed, 352 insertions(+), 418 deletions(-)
 delete mode 100644 Documentation/DocBook/scsi.tmpl
 create mode 100644 Documentation/driver-api/scsi.rst

diff --git a/Documentation/DocBook/Makefile b/Documentation/DocBook/Makefile
index 00a61f4ffcff..3bbda02d6aee 100644
--- a/Documentation/DocBook/Makefile
+++ b/Documentation/DocBook/Makefile
@@ -9,7 +9,6 @@
 DOCBOOKS := \
lsm.xml \
mtdnand.xml librs.xml rapidio.xml \
-   scsi.xml \
sh.xml w1.xml
 
 ifeq ($(DOCBOOKS),)
diff --git a/Documentation/DocBook/scsi.tmpl b/Documentation/DocBook/scsi.tmpl
deleted file mode 100644
index 4b9b9b286cea..
--- a/Documentation/DocBook/scsi.tmpl
+++ /dev/null
@@ -1,409 +0,0 @@
-
-http://www.oasis-open.org/docbook/xml/4.1.2/docbookx.dtd"; []>
-
-
-  
-SCSI Interfaces Guide
-
-
-  
-James
-Bottomley
-
-  
-james.bottom...@hansenpartnership.com
-  
-
-  
-
-  
-Rob
-Landley
-
-  
-r...@landley.net
-  
-
-  
-
-
-
-
-  2007
-  Linux Foundation
-
-
-
-  
-This documentation is free software; you can redistribute
-it and/or modify it under the terms of the GNU General Public
-License version 2.
-  
-
-  
-This program is distributed in the hope that it will be
-useful, but WITHOUT ANY WARRANTY; without even the implied
-warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
-For more details see the file COPYING in the source
-distribution of Linux.
-  
-
-  
-
-  
-
-  
-Introduction
-
-  Protocol vs bus
-  
-Once upon a time, the Small Computer Systems Interface defined both
-a parallel I/O bus and a data protocol to connect a wide variety of
-peripherals (disk drives, tape drives, modems, printers, scanners,
-optical drives, test equipment, and medical devices) to a host
-computer.
-  
-  
-Although the old parallel (fast/wide/ultra) SCSI bus has largely
-fallen out of use, the SCSI command set is more widely used than ever
-to communicate with devices over a number of different busses.
-  
-  
-The SCSI protocol
-is a big-endian peer-to-peer packet based protocol.  SCSI commands
-are 6, 10, 12, or 16 bytes long, often followed by an associated data
-payload.
-  
-  
-SCSI commands can be transported over just about any kind of bus, and
-are the default protocol for storage devices attached to USB, SATA,
-SAS, Fibre Channel, FireWire, and ATAPI devices.  SCSI packets are
-also commonly exchanged over Infiniband,
-I20, TCP/IP
-(iSCSI), even
-Parallel
-ports.
-  
-
-
-  Design of the Linux SCSI subsystem
-  
-The SCSI subsystem uses a three layer design, with upper, mid, and low
-layers.  Every operation involving the SCSI subsystem (such as reading
-a sector from a disk) uses one driver at each of the 3 levels: one
-upper layer driver, one lower layer driver, and the SCSI midlayer.
-  
-  
-The SCSI upper layer provides the interface between userspace and the
-kernel, in the form of block and char device nodes for I/O and
-ioctl().  The SCSI lower layer contains drivers for specific hardware
-devices.
-  
-  
-In between is the SCSI mid-layer, analogous to a network routing
-layer such as the IPv4 stack.  The SCSI mid-layer routes a packet
-based data protocol between the upper layer's /dev nodes and the
-corresponding devices in the lower layer.  It manages command queues,
-provides error handling and power management functions, and responds
-to ioctl() requests.
-  
-
-  
-
-  
-SCSI upper layer
-
-  The upper layer supports the user-kernel interface by providing
-  device nodes.
-
-
-  sd (SCSI Disk)
-  sd (sd_mod.o)
-
-
-
-  sr (SCSI CD-ROM)
-  sr (sr_mod.o)
-
-
-  st (SCSI Tape)
-  st (st.o)
-
-
-  sg (SCSI Generic)
-  sg (sg.o)
-
-
-  ch (SCSI Media Changer)
-  ch (ch.c)
-
-  
-
-  
-SCSI mid layer
-
-
-  SCSI midlayer implementation
-  
-include/scsi/scsi_device.h
-
-
-!Iinclude/scsi/scsi_

[PATCH v2 37/53] docs-rst: convert mtdnand book to ReST

2017-05-16 Thread Mauro Carvalho Chehab
Use pandoc to convert documentation to ReST by calling
Documentation/sphinx/tmplcvt script.

The tables were manually adjusted to fit into 80 columns.

Signed-off-by: Mauro Carvalho Chehab 
---
 Documentation/DocBook/Makefile   |1 -
 Documentation/DocBook/mtdnand.tmpl   | 1291 --
 Documentation/driver-api/index.rst   |1 +
 Documentation/driver-api/mtdnand.rst | 1020 +++
 4 files changed, 1021 insertions(+), 1292 deletions(-)
 delete mode 100644 Documentation/DocBook/mtdnand.tmpl
 create mode 100644 Documentation/driver-api/mtdnand.rst

diff --git a/Documentation/DocBook/Makefile b/Documentation/DocBook/Makefile
index 0a82f6253682..226e5e9fc801 100644
--- a/Documentation/DocBook/Makefile
+++ b/Documentation/DocBook/Makefile
@@ -8,7 +8,6 @@
 
 DOCBOOKS := \
lsm.xml \
-   mtdnand.xml \
sh.xml
 
 ifeq ($(DOCBOOKS),)
diff --git a/Documentation/DocBook/mtdnand.tmpl 
b/Documentation/DocBook/mtdnand.tmpl
deleted file mode 100644
index b442921bca54..
--- a/Documentation/DocBook/mtdnand.tmpl
+++ /dev/null
@@ -1,1291 +0,0 @@
-
-http://www.oasis-open.org/docbook/xml/4.1.2/docbookx.dtd"; []>
-
-
- 
-  MTD NAND Driver Programming Interface
-  
-  
-   
-Thomas
-Gleixner
-
- 
-  t...@linutronix.de
- 
-
-   
-  
-
-  
-   2004
-   Thomas Gleixner
-  
-
-  
-   
- This documentation is free software; you can redistribute
- it and/or modify it under the terms of the GNU General Public
- License version 2 as published by the Free Software Foundation.
-   
-  
-   
- This program is distributed in the hope that it will be
- useful, but WITHOUT ANY WARRANTY; without even the implied
- warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
- See the GNU General Public License for more details.
-   
-  
-   
- You should have received a copy of the GNU General Public
- License along with this program; if not, write to the Free
- Software Foundation, Inc., 59 Temple Place, Suite 330, Boston,
- MA 02111-1307 USA
-   
-  
-   
- For more details see the file COPYING in the source
- distribution of Linux.
-   
-  
- 
-
-
-
-  
-  Introduction
-  
-   The generic NAND driver supports almost all NAND and AG-AND based
-   chips and connects them to the Memory Technology Devices (MTD)
-   subsystem of the Linux Kernel.
-  
-  
-   This documentation is provided for developers who want to implement
-   board drivers or filesystem drivers suitable for NAND devices.
-  
-  
-  
-  
- Known Bugs And Assumptions
-  
-   None.   
-  
-  
-
-  
- Documentation hints
- 
- The function and structure docs are autogenerated. Each function and 
- struct member has a short description which is marked with an [XXX] 
identifier.
- The following chapters explain the meaning of those identifiers.
- 
- 
-   Function identifiers [XXX]
-   
-   The functions are marked with [XXX] identifiers in the short
-   comment. The identifiers explain the usage and scope of the
-   functions. Following identifiers are used:
-   
-   
-   
-   [MTD Interface]
-   These functions provide the interface to the MTD kernel API. 
-   They are not replaceable and provide functionality
-   which is complete hardware independent.
-   
-   
-   [NAND Interface]
-   These functions are exported and provide the interface to the 
NAND kernel API. 
-   
-   
-   [GENERIC]
-   Generic functions are not replaceable and provide functionality
-   which is complete hardware independent.
-   
-   
-   [DEFAULT]
-   Default functions provide hardware related functionality which 
is suitable
-   for most of the implementations. These functions can be 
replaced by the
-   board driver if necessary. Those functions are called via 
pointers in the
-   NAND chip description structure. The board driver can set the 
functions which
-   should be replaced by board dependent functions before calling 
nand_scan().
-   If the function pointer is NULL on entry to nand_scan() then 
the pointer
-   is set to the default function which is suitable for the 
detected chip type.
-   
-   
- 
- 
-   Struct member identifiers [XXX]
-   
-   The struct members are marked with [XXX] identifiers in the 
-   comment. The identifiers explain the usage and scope of the
-   members. Following identifiers are used:
-   
-   
-   
-   [INTERN]
-   These members are for NAND driver internal use only and must 
not be
-   modified. Most of the

[PATCH v2 01/53] docs-rst: convert kernel-hacking to ReST

2017-05-16 Thread Mauro Carvalho Chehab
Use pandoc to convert documentation to ReST by calling
Documentation/sphinx/tmplcvt script.

- Manually adjusted to use ..note and ..warning
- Minor fixes for it to be parsed without errors
- Use **bold** for emphasis.

Signed-off-by: Mauro Carvalho Chehab 
---
 Documentation/DocBook/Makefile|2 +-
 Documentation/DocBook/kernel-hacking.tmpl | 1312 -
 Documentation/conf.py |2 +
 Documentation/index.rst   |1 +
 Documentation/kernel-hacking/conf.py  |   10 +
 Documentation/kernel-hacking/hacking.rst  |  794 +
 Documentation/kernel-hacking/index.rst|8 +
 7 files changed, 816 insertions(+), 1313 deletions(-)
 delete mode 100644 Documentation/DocBook/kernel-hacking.tmpl
 create mode 100644 Documentation/kernel-hacking/conf.py
 create mode 100644 Documentation/kernel-hacking/hacking.rst
 create mode 100644 Documentation/kernel-hacking/index.rst

diff --git a/Documentation/DocBook/Makefile b/Documentation/DocBook/Makefile
index 85916f13d330..7d7482b5ad92 100644
--- a/Documentation/DocBook/Makefile
+++ b/Documentation/DocBook/Makefile
@@ -7,7 +7,7 @@
 # list of DOCBOOKS.
 
 DOCBOOKS := z8530book.xml  \
-   kernel-hacking.xml kernel-locking.xml \
+   kernel-locking.xml \
networking.xml \
filesystems.xml lsm.xml kgdb.xml \
libata.xml mtdnand.xml librs.xml rapidio.xml \
diff --git a/Documentation/DocBook/kernel-hacking.tmpl 
b/Documentation/DocBook/kernel-hacking.tmpl
deleted file mode 100644
index da5c087462b1..
--- a/Documentation/DocBook/kernel-hacking.tmpl
+++ /dev/null
@@ -1,1312 +0,0 @@
-
-http://www.oasis-open.org/docbook/xml/4.1.2/docbookx.dtd"; []>
-
-
- 
-  Unreliable Guide To Hacking The Linux Kernel
-  
-  
-   
-Rusty
-Russell
-
- 
-  ru...@rustcorp.com.au
- 
-
-   
-  
-
-  
-   2005
-   Rusty Russell
-  
-
-  
-   
-This documentation is free software; you can redistribute
-it and/or modify it under the terms of the GNU General Public
-License as published by the Free Software Foundation; either
-version 2 of the License, or (at your option) any later
-version.
-   
-   
-   
-This program is distributed in the hope that it will be
-useful, but WITHOUT ANY WARRANTY; without even the implied
-warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
-See the GNU General Public License for more details.
-   
-   
-   
-You should have received a copy of the GNU General Public
-License along with this program; if not, write to the Free
-Software Foundation, Inc., 59 Temple Place, Suite 330, Boston,
-MA 02111-1307 USA
-   
-   
-   
-For more details see the file COPYING in the source
-distribution of Linux.
-   
-  
-
-  
-   This is the first release of this document as part of the kernel tarball.
-  
-
- 
-
- 
-
- 
-  Introduction
-  
-   Welcome, gentle reader, to Rusty's Remarkably Unreliable Guide to Linux
-   Kernel Hacking.  This document describes the common routines and
-   general requirements for kernel code: its goal is to serve as a
-   primer for Linux kernel development for experienced C
-   programmers.  I avoid implementation details: that's what the
-   code is for, and I ignore whole tracts of useful routines.
-  
-  
-   Before you read this, please understand that I never wanted to
-   write this document, being grossly under-qualified, but I always
-   wanted to read it, and this was the only way.  I hope it will
-   grow into a compendium of best practice, common starting points
-   and random information.
-  
- 
-
- 
-  The Players
-
-  
-   At any time each of the CPUs in a system can be:
-  
-
-  
-   
-
- not associated with any process, serving a hardware interrupt;
-
-   
-
-   
-
- not associated with any process, serving a softirq or tasklet;
-
-   
-
-   
-
- running in kernel space, associated with a process (user context);
-
-   
-
-   
-
- running a process in user space.
-
-   
-  
-
-  
-   There is an ordering between these.  The bottom two can preempt
-   each other, but above that is a strict hierarchy: each can only be
-   preempted by the ones above it.  For example, while a softirq is
-   running on a CPU, no other softirq will preempt it, but a hardware
-   interrupt can.  However, any other CPUs in the system execute
-   independently.
-  
-
-  
-   We'll see a number of ways that the user context can block
-   interrupts, to become truly non-preemptable.
-  
-  
-  
-   User Context
-
-   
-User context is when you are coming in from a system call or other
-trap: like userspace, you can be preempted by more important tasks
-and by interrupts.  You can sleep, by calling
-schedule().
-   
-
-   
-
- You are always in user context on module load and unload,
- and on operations on the block device layer.
-
-   
-
-   

[PATCH v2 09/53] kgdb.rst: Adjust ReST markups

2017-05-16 Thread Mauro Carvalho Chehab
The automatic conversion didn't work too well for this file.
It added weird html blocks inside it, and did some weird
things for literals. Manually fix it, in order to present
a nice display at html/pdf outputs.

Signed-off-by: Mauro Carvalho Chehab 
---
 Documentation/dev-tools/kgdb.rst | 489 +++
 1 file changed, 233 insertions(+), 256 deletions(-)

diff --git a/Documentation/dev-tools/kgdb.rst b/Documentation/dev-tools/kgdb.rst
index ea01541806c8..75273203a35a 100644
--- a/Documentation/dev-tools/kgdb.rst
+++ b/Documentation/dev-tools/kgdb.rst
@@ -51,28 +51,29 @@ Compiling a kernel
 Kernel config options for kgdb
 --
 
-To enable ``CONFIG_KGDB`` you should look under "Kernel hacking" /
-"Kernel debugging" and select "KGDB: kernel debugger".
+To enable ``CONFIG_KGDB`` you should look under
+:menuselection:`Kernel hacking --> Kernel debugging` and select
+:menuselection:`KGDB: kernel debugger`.
 
 While it is not a hard requirement that you have symbols in your vmlinux
 file, gdb tends not to be very useful without the symbolic data, so you
-will want to turn on ``CONFIG_DEBUG_INFO`` which is called "Compile the
-kernel with debug info" in the config menu.
+will want to turn on ``CONFIG_DEBUG_INFO`` which is called
+:menuselection:`Compile the kernel with debug info` in the config menu.
 
 It is advised, but not required, that you turn on the
-``CONFIG_FRAME_POINTER`` kernel option which is called "Compile the
-kernel with frame pointers" in the config menu. This option inserts code
+``CONFIG_FRAME_POINTER`` kernel option which is called :menuselection:`Compile
+the kernel with frame pointers` in the config menu. This option inserts code
 to into the compiled executable which saves the frame information in
 registers or on the stack at different points which allows a debugger
 such as gdb to more accurately construct stack back traces while
 debugging the kernel.
 
 If the architecture that you are using supports the kernel option
-CONFIG_STRICT_KERNEL_RWX, you should consider turning it off. This
+``CONFIG_STRICT_KERNEL_RWX``, you should consider turning it off. This
 option will prevent the use of software breakpoints because it marks
 certain regions of the kernel's memory space as read-only. If kgdb
 supports it for the architecture you are using, you can use hardware
-breakpoints if you desire to run with the CONFIG_STRICT_KERNEL_RWX
+breakpoints if you desire to run with the ``CONFIG_STRICT_KERNEL_RWX``
 option turned on, else you need to turn off this option.
 
 Next you should choose one of more I/O drivers to interconnect debugging
@@ -80,17 +81,14 @@ host and debugged target. Early boot debugging requires a 
KGDB I/O
 driver that supports early debugging and the driver must be built into
 the kernel directly. Kgdb I/O driver configuration takes place via
 kernel or module parameters which you can learn more about in the in the
-section that describes the parameter "kgdboc".
+section that describes the parameter kgdboc.
 
-Here is an example set of .config symbols to enable or disable for kgdb:
+Here is an example set of ``.config`` symbols to enable or disable for kgdb::
 
--  # CONFIG_STRICT_KERNEL_RWX is not set
-
--  CONFIG_FRAME_POINTER=y
-
--  CONFIG_KGDB=y
-
--  CONFIG_KGDB_SERIAL_CONSOLE=y
+  # CONFIG_STRICT_KERNEL_RWX is not set
+  CONFIG_FRAME_POINTER=y
+  CONFIG_KGDB=y
+  CONFIG_KGDB_SERIAL_CONSOLE=y
 
 Kernel config options for kdb
 -
@@ -99,34 +97,29 @@ Kdb is quite a bit more complex than the simple gdbstub 
sitting on top
 of the kernel's debug core. Kdb must implement a shell, and also adds
 some helper functions in other parts of the kernel, responsible for
 printing out interesting data such as what you would see if you ran
-"lsmod", or "ps". In order to build kdb into the kernel you follow the
+``lsmod``, or ``ps``. In order to build kdb into the kernel you follow the
 same steps as you would for kgdb.
 
 The main config option for kdb is ``CONFIG_KGDB_KDB`` which is called
-"KGDB_KDB: include kdb frontend for kgdb" in the config menu. In theory
-you would have already also selected an I/O driver such as the
-CONFIG_KGDB_SERIAL_CONSOLE interface if you plan on using kdb on a
+:menuselection:`KGDB_KDB: include kdb frontend for kgdb` in the config menu.
+In theory you would have already also selected an I/O driver such as the
+``CONFIG_KGDB_SERIAL_CONSOLE`` interface if you plan on using kdb on a
 serial port, when you were configuring kgdb.
 
 If you want to use a PS/2-style keyboard with kdb, you would select
-CONFIG_KDB_KEYBOARD which is called "KGDB_KDB: keyboard as input
-device" in the config menu. The CONFIG_KDB_KEYBOARD option is not used
-for anything in the gdb interface to kgdb. The CONFIG_KDB_KEYBOARD
+``CONFIG_KDB_KEYBOARD`` which is called :menuselection:`KGDB_KDB: keyboard as
+input device` in the config menu. The ``CONFIG_KDB_KEYBOARD`` option is not
+used for anything in th

[PATCH v2 41/53] docs-rst: convert lsm from DocBook to ReST

2017-05-16 Thread Mauro Carvalho Chehab
This file is outdated. Still, as it is the only one left at
DocBook dir, convert it, and store it, with a .txt extension,
under Documentation/lsm.txt.

This way, we can get rid of DocBook from the building system,
without needing to wait for someone to take care of it.

Signed-off-by: Mauro Carvalho Chehab 
---
 Documentation/00-INDEX |   2 +
 Documentation/DocBook/Makefile | 275 -
 Documentation/DocBook/lsm.tmpl | 265 ---
 Documentation/lsm.txt  | 201 ++
 4 files changed, 203 insertions(+), 540 deletions(-)
 delete mode 100644 Documentation/DocBook/lsm.tmpl
 create mode 100644 Documentation/lsm.txt

diff --git a/Documentation/00-INDEX b/Documentation/00-INDEX
index 793acf999e9e..8c2a66e176b9 100644
--- a/Documentation/00-INDEX
+++ b/Documentation/00-INDEX
@@ -264,6 +264,8 @@ logo.gif
- full colour GIF image of Linux logo (penguin - Tux).
 logo.txt
- info on creator of above logo & site to get additional images from.
+lsm.txt
+   - Linux Security Modules: General Security Hooks for Linux
 lzo.txt
- kernel LZO decompressor input formats
 m68k/
diff --git a/Documentation/DocBook/Makefile b/Documentation/DocBook/Makefile
index efba7f980895..8b137891791f 100644
--- a/Documentation/DocBook/Makefile
+++ b/Documentation/DocBook/Makefile
@@ -1,276 +1 @@
-###
-# This makefile is used to generate the kernel documentation,
-# primarily based on in-line comments in various source files.
-# See Documentation/kernel-doc-nano-HOWTO.txt for instruction in how
-# to document the SRC - and how to read it.
-# To add a new book the only step required is to add the book to the
-# list of DOCBOOKS.
 
-DOCBOOKS := lsm.xml
-
-ifeq ($(DOCBOOKS),)
-
-# Skip DocBook build if the user explicitly requested no DOCBOOKS.
-.DEFAULT:
-   @echo "  SKIPDocBook $@ target (DOCBOOKS=\"\" specified)."
-else
-ifneq ($(SPHINXDIRS),)
-
-# Skip DocBook build if the user explicitly requested a sphinx dir
-.DEFAULT:
-   @echo "  SKIPDocBook $@ target (SPHINXDIRS specified)."
-else
-
-
-###
-# The build process is as follows (targets):
-#  (xmldocs) [by docproc]
-# file.tmpl --> file.xml +--> file.ps   (psdocs)   [by db2ps or xmlto]
-#+--> file.pdf  (pdfdocs)  [by db2pdf or xmlto]
-#+--> DIR=file  (htmldocs) [by xmlto]
-#+--> man/  (mandocs)  [by xmlto]
-
-
-# for PDF and PS output you can choose between xmlto and docbook-utils tools
-PDF_METHOD = $(prefer-db2x)
-PS_METHOD  = $(prefer-db2x)
-
-
-targets += $(DOCBOOKS)
-BOOKS := $(addprefix $(obj)/,$(DOCBOOKS))
-xmldocs: $(BOOKS)
-sgmldocs: xmldocs
-
-PS := $(patsubst %.xml, %.ps, $(BOOKS))
-psdocs: $(PS)
-
-PDF := $(patsubst %.xml, %.pdf, $(BOOKS))
-pdfdocs: $(PDF)
-
-HTML := $(sort $(patsubst %.xml, %.html, $(BOOKS)))
-htmldocs: $(HTML)
-   $(call cmd,build_main_index)
-
-MAN := $(patsubst %.xml, %.9, $(BOOKS))
-mandocs: $(MAN)
-   find $(obj)/man -name '*.9' | xargs gzip -nf
-
-# Default location for installed man pages
-export INSTALL_MAN_PATH = $(objtree)/usr
-
-installmandocs: mandocs
-   mkdir -p $(INSTALL_MAN_PATH)/man/man9/
-   find $(obj)/man -name '*.9.gz' -printf '%h %f\n' | \
-   sort -k 2 -k 1 | uniq -f 1 | sed -e 's: :/:' | \
-   xargs install -m 644 -t $(INSTALL_MAN_PATH)/man/man9/
-
-# no-op for the DocBook toolchain
-epubdocs:
-latexdocs:
-linkcheckdocs:
-
-###
-#External programs used
-KERNELDOCXMLREF = $(srctree)/scripts/kernel-doc-xml-ref
-KERNELDOC   = $(srctree)/scripts/kernel-doc
-DOCPROC = $(objtree)/scripts/docproc
-CHECK_LC_CTYPE = $(objtree)/scripts/check-lc_ctype
-
-# Use a fixed encoding - UTF-8 if the C library has support built-in
-# or ASCII if not
-LC_CTYPE := $(call try-run, LC_CTYPE=C.UTF-8 $(CHECK_LC_CTYPE),C.UTF-8,C)
-export LC_CTYPE
-
-XMLTOFLAGS = -m $(srctree)/$(src)/stylesheet.xsl
-XMLTOFLAGS += --skip-validation
-
-###
-# DOCPROC is used for two purposes:
-# 1) To generate a dependency list for a .tmpl file
-# 2) To preprocess a .tmpl file and call kernel-doc with
-# appropriate parameters.
-# The following rules are used to generate the .xml documentation
-# required to generate the final targets. (ps, pdf, html).
-quiet_cmd_docproc = DOCPROC $@
-  cmd_docproc = SRCTREE=$(srctree)/ $(DOCPROC) doc $< >$@
-define rule_docproc
-   set -e; \
-$(if $($(quiet)cmd_$(1)),echo '  $($(quiet)cmd_$(1))';)\
-$(cmd_$(1));   \
-(  \
-  echo 'cmd_$@ := $(cmd_$(1))';\
-  echo $@: `SRCTREE=$(srctree) $(DOCPROC) depend $<`;  \
-) > $(dir $@).$(notdir $@).cmd
-endef
-
-%.xml: %.tmpl $(KERNELDOC) $(DOCPROC)

[PATCH v2 43/53] docs: update old references for DocBook from the documentation

2017-05-16 Thread Mauro Carvalho Chehab
DocBook is mentioned several times at the documentation. Update
the obsolete references from it at the DocBook.

Acked-by: SeongJae Park 
Signed-off-by: Mauro Carvalho Chehab 
---
 Documentation/PCI/MSI-HOWTO.txt|  2 +-
 Documentation/admin-guide/README.rst   |  6 ---
 Documentation/doc-guide/index.rst  |  1 -
 Documentation/doc-guide/sphinx.rst |  5 ---
 Documentation/fb/api.txt   |  4 +-
 Documentation/gpu/todo.rst |  2 +-
 Documentation/kernel-doc-nano-HOWTO.txt| 65 +-
 Documentation/process/changes.rst  | 26 +++-
 Documentation/process/howto.rst|  8 
 Documentation/process/kernel-docs.rst  | 34 +---
 Documentation/translations/ja_JP/howto.rst |  7 
 Documentation/translations/ko_KR/howto.rst |  7 
 12 files changed, 21 insertions(+), 146 deletions(-)

diff --git a/Documentation/PCI/MSI-HOWTO.txt b/Documentation/PCI/MSI-HOWTO.txt
index 1e37138027a3..618e13d5e276 100644
--- a/Documentation/PCI/MSI-HOWTO.txt
+++ b/Documentation/PCI/MSI-HOWTO.txt
@@ -186,7 +186,7 @@ must disable interrupts while the lock is held.  If the 
device sends
 a different interrupt, the driver will deadlock trying to recursively
 acquire the spinlock.  Such deadlocks can be avoided by using
 spin_lock_irqsave() or spin_lock_irq() which disable local interrupts
-and acquire the lock (see Documentation/DocBook/kernel-locking).
+and acquire the lock (see Documentation/kernel-hacking/locking.rst).
 
 4.5 How to tell whether MSI/MSI-X is enabled on a device
 
diff --git a/Documentation/admin-guide/README.rst 
b/Documentation/admin-guide/README.rst
index b96e80f79e85..b5343c5aa224 100644
--- a/Documentation/admin-guide/README.rst
+++ b/Documentation/admin-guide/README.rst
@@ -55,12 +55,6 @@ Documentation
contains information about the problems, which may result by upgrading
your kernel.
 
- - The Documentation/DocBook/ subdirectory contains several guides for
-   kernel developers and users.  These guides can be rendered in a
-   number of formats:  PostScript (.ps), PDF, HTML, & man-pages, among others.
-   After installation, ``make psdocs``, ``make pdfdocs``, ``make htmldocs``,
-   or ``make mandocs`` will render the documentation in the requested format.
-
 Installing the kernel source
 
 
diff --git a/Documentation/doc-guide/index.rst 
b/Documentation/doc-guide/index.rst
index 6fff4024606e..a7f95d7d3a63 100644
--- a/Documentation/doc-guide/index.rst
+++ b/Documentation/doc-guide/index.rst
@@ -10,7 +10,6 @@ How to write kernel documentation
sphinx.rst
kernel-doc.rst
parse-headers.rst
-   docbook.rst
 
 .. only::  subproject and html
 
diff --git a/Documentation/doc-guide/sphinx.rst 
b/Documentation/doc-guide/sphinx.rst
index 731334de3efd..84e8e8a9cbdb 100644
--- a/Documentation/doc-guide/sphinx.rst
+++ b/Documentation/doc-guide/sphinx.rst
@@ -15,11 +15,6 @@ are used to describe the functions and types and design of 
the code. The
 kernel-doc comments have some special structure and formatting, but beyond that
 they are also treated as reStructuredText.
 
-There is also the deprecated DocBook toolchain to generate documentation from
-DocBook XML template files under ``Documentation/DocBook``. The DocBook files
-are to be converted to reStructuredText, and the toolchain is slated to be
-removed.
-
 Finally, there are thousands of plain text documentation files scattered around
 ``Documentation``. Some of these will likely be converted to reStructuredText
 over time, but the bulk of them will remain in plain text.
diff --git a/Documentation/fb/api.txt b/Documentation/fb/api.txt
index d4ff7de85700..d52cf1e3b975 100644
--- a/Documentation/fb/api.txt
+++ b/Documentation/fb/api.txt
@@ -289,12 +289,12 @@ the FB_CAP_FOURCC bit in the fb_fix_screeninfo 
capabilities field.
 FOURCC definitions are located in the linux/videodev2.h header. However, and
 despite starting with the V4L2_PIX_FMT_prefix, they are not restricted to V4L2
 and don't require usage of the V4L2 subsystem. FOURCC documentation is
-available in Documentation/DocBook/v4l/pixfmt.xml.
+available in Documentation/media/uapi/v4l/pixfmt.rst.
 
 To select a format, applications set the grayscale field to the desired FOURCC.
 For YUV formats, they should also select the appropriate colorspace by setting
 the colorspace field to one of the colorspaces listed in linux/videodev2.h and
-documented in Documentation/DocBook/v4l/colorspaces.xml.
+documented in Documentation/media/uapi/v4l/colorspaces.rst.
 
 The red, green, blue and transp fields are not used with the FOURCC-based API.
 For forward compatibility reasons applications must zero those fields, and
diff --git a/Documentation/gpu/todo.rst b/Documentation/gpu/todo.rst
index 1bdb7356a310..6162d0e9dc28 100644
--- a/Documentation/gpu/todo.rst
+++ b/Documentation/gpu/todo.rst
@@ -228,7 +228,7 @@ The DRM reference documentation is still l

[PATCH v2 25/53] libata.rst: add c function and struct cross-references

2017-05-16 Thread Mauro Carvalho Chehab
Instead of just using text for functions and structs, use
the C domain tags, in order to allow cross-referencing with
the kernel-doc markups.

Signed-off-by: Mauro Carvalho Chehab 
---
 Documentation/driver-api/libata.rst | 244 ++--
 1 file changed, 124 insertions(+), 120 deletions(-)

diff --git a/Documentation/driver-api/libata.rst 
b/Documentation/driver-api/libata.rst
index 774bf238ff79..4adc056f7635 100644
--- a/Documentation/driver-api/libata.rst
+++ b/Documentation/driver-api/libata.rst
@@ -18,18 +18,19 @@ internals, and a couple sample ATA low-level drivers.
 libata Driver API
 =
 
-struct ata_port_operations is defined for every low-level libata
+:c:type:`struct ata_port_operations `
+is defined for every low-level libata
 hardware driver, and it controls how the low-level driver interfaces
 with the ATA and SCSI layers.
 
-FIS-based drivers will hook into the system with ->qc_prep() and
-->qc_issue() high-level hooks. Hardware which behaves in a manner
+FIS-based drivers will hook into the system with ``->qc_prep()`` and
+``->qc_issue()`` high-level hooks. Hardware which behaves in a manner
 similar to PCI IDE hardware may utilize several generic helpers,
 defining at a bare minimum the bus I/O addresses of the ATA shadow
 register blocks.
 
-struct ata_port_operations
-
+:c:type:`struct ata_port_operations `
+--
 
 Disable ATA port
 
@@ -39,13 +40,13 @@ Disable ATA port
 void (*port_disable) (struct ata_port *);
 
 
-Called from ata_bus_probe() error path, as well as when unregistering
+Called from :c:func:`ata_bus_probe` error path, as well as when unregistering
 from the SCSI module (rmmod, hot unplug). This function should do
 whatever needs to be done to take the port out of use. In most cases,
-ata_port_disable() can be used as this hook.
+:c:func:`ata_port_disable` can be used as this hook.
 
-Called from ata_bus_probe() on a failed probe. Called from
-ata_scsi_release().
+Called from :c:func:`ata_bus_probe` on a failed probe. Called from
+:c:func:`ata_scsi_release`.
 
 Post-IDENTIFY device configuration
 ~~
@@ -73,22 +74,22 @@ Set PIO/DMA mode
 
 
 Hooks called prior to the issue of SET FEATURES - XFER MODE command. The
-optional ->mode_filter() hook is called when libata has built a mask of
-the possible modes. This is passed to the ->mode_filter() function
+optional ``->mode_filter()`` hook is called when libata has built a mask of
+the possible modes. This is passed to the ``->mode_filter()`` function
 which should return a mask of valid modes after filtering those
 unsuitable due to hardware limits. It is not valid to use this interface
 to add modes.
 
-dev->pio_mode and dev->dma_mode are guaranteed to be valid when
-->set_piomode() and when ->set_dmamode() is called. The timings for
+``dev->pio_mode`` and ``dev->dma_mode`` are guaranteed to be valid when
+``->set_piomode()`` and when ``->set_dmamode()`` is called. The timings for
 any other drive sharing the cable will also be valid at this point. That
 is the library records the decisions for the modes of each drive on a
 channel before it attempts to set any of them.
 
-->post_set_mode() is called unconditionally, after the SET FEATURES -
+``->post_set_mode()`` is called unconditionally, after the SET FEATURES -
 XFER MODE command completes successfully.
 
-->set_piomode() is always called (if present), but ->set_dma_mode()
+``->set_piomode()`` is always called (if present), but ``->set_dma_mode()``
 is only called if DMA is possible.
 
 Taskfile read/write
@@ -100,11 +101,11 @@ Taskfile read/write
 void (*sff_tf_read) (struct ata_port *ap, struct ata_taskfile *tf);
 
 
-->tf_load() is called to load the given taskfile into hardware
-registers / DMA buffers. ->tf_read() is called to read the hardware
+``->tf_load()`` is called to load the given taskfile into hardware
+registers / DMA buffers. ``->tf_read()`` is called to read the hardware
 registers / DMA buffers, to obtain the current set of taskfile register
 values. Most drivers for taskfile-based hardware (PIO or MMIO) use
-ata_sff_tf_load() and ata_sff_tf_read() for these hooks.
+:c:func:`ata_sff_tf_load` and :c:func:`ata_sff_tf_read` for these hooks.
 
 PIO data read/write
 ~~~
@@ -117,8 +118,8 @@ PIO data read/write
 All bmdma-style drivers must implement this hook. This is the low-level
 operation that actually copies the data bytes during a PIO data
 transfer. Typically the driver will choose one of
-ata_sff_data_xfer_noirq(), ata_sff_data_xfer(), or
-ata_sff_data_xfer32().
+:c:func:`ata_sff_data_xfer_noirq`, :c:func:`ata_sff_data_xfer`, or
+:c:func:`ata_sff_data_xfer32`.
 
 ATA command execute
 ~~~
@@ -128,9 +129,9 @@ ATA command execute
 void (*sff_exec_command)(struct ata_port *ap, struct ata_taskfile *tf);
 
 
-causes an ATA command, previously loa

[PATCH v2 48/53] fs: update location of filesystems documentation

2017-05-16 Thread Mauro Carvalho Chehab
The filesystem documentation was moved from DocBook to
Documentation/filesystems/. Update it at the sources.

Signed-off-by: Mauro Carvalho Chehab 
---
 fs/debugfs/file.c   | 2 +-
 include/linux/debugfs.h | 2 +-
 lib/Kconfig.debug   | 2 +-
 3 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/fs/debugfs/file.c b/fs/debugfs/file.c
index 354e2ab62031..6dabc4a10396 100644
--- a/fs/debugfs/file.c
+++ b/fs/debugfs/file.c
@@ -9,7 +9,7 @@
  * 2 as published by the Free Software Foundation.
  *
  *  debugfs is for people to use instead of /proc or /sys.
- *  See Documentation/DocBook/filesystems for more details.
+ *  See Documentation/filesystems/ for more details.
  *
  */
 
diff --git a/include/linux/debugfs.h b/include/linux/debugfs.h
index 9174b0d28582..aa86e6d8c1aa 100644
--- a/include/linux/debugfs.h
+++ b/include/linux/debugfs.h
@@ -9,7 +9,7 @@
  * 2 as published by the Free Software Foundation.
  *
  *  debugfs is for people to use instead of /proc or /sys.
- *  See Documentation/DocBook/filesystems for more details.
+ *  See Documentation/filesystems/ for more details.
  */
 
 #ifndef _DEBUGFS_H_
diff --git a/lib/Kconfig.debug b/lib/Kconfig.debug
index e4587ebe52c7..b7882d45f48e 100644
--- a/lib/Kconfig.debug
+++ b/lib/Kconfig.debug
@@ -286,7 +286,7 @@ config DEBUG_FS
  write to these files.
 
  For detailed documentation on the debugfs API, see
- Documentation/DocBook/filesystems.
+ Documentation/filesystems/.
 
  If unsure, say N.
 
-- 
2.9.3

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


[PATCH v2 02/53] kernel-hacking: update document

2017-05-16 Thread Mauro Carvalho Chehab
This document is fairly updated. Yet, some stuff moved to
other kernel headers. So, update to point to the right
places.

While here, adjust some minor ReST markups.

Signed-off-by: Mauro Carvalho Chehab 
---
 Documentation/kernel-hacking/hacking.rst | 179 +--
 1 file changed, 98 insertions(+), 81 deletions(-)

diff --git a/Documentation/kernel-hacking/hacking.rst 
b/Documentation/kernel-hacking/hacking.rst
index 75597e627791..1a456b60a7cf 100644
--- a/Documentation/kernel-hacking/hacking.rst
+++ b/Documentation/kernel-hacking/hacking.rst
@@ -56,7 +56,7 @@ interrupts. You can sleep, by calling :c:func:`schedule()`.
 
 In user context, the ``current`` pointer (indicating the task we are
 currently executing) is valid, and :c:func:`in_interrupt()`
-(``include/linux/interrupt.h``) is false.
+(``include/linux/preempt.h``) is false.
 
 .. warning::
 
@@ -114,12 +114,12 @@ time, although different tasklets can run simultaneously.
 Kuznetsov had at the time.
 
 You can tell you are in a softirq (or tasklet) using the
-:c:func:`in_softirq()` macro (``include/linux/interrupt.h``).
+:c:func:`in_softirq()` macro (``include/linux/preempt.h``).
 
 .. warning::
 
-Beware that this will return a false positive if a bh lock (see
-below) is held.
+Beware that this will return a false positive if a
+:ref:`botton half lock ` is held.
 
 Some Basic Rules
 
@@ -154,9 +154,7 @@ The Linux kernel is portable
 ioctls: Not writing a new system call
 =
 
-A system call generally looks like this
-
-::
+A system call generally looks like this::
 
 asmlinkage long sys_mycall(int arg)
 {
@@ -175,7 +173,9 @@ If all your routine does is read or write some parameter, 
consider
 implementing a :c:func:`sysfs()` interface instead.
 
 Inside the ioctl you're in user context to a process. When a error
-occurs you return a negated errno (see ``include/linux/errno.h``),
+occurs you return a negated errno (see
+``include/uapi/asm-generic/errno-base.h``,
+``include/uapi/asm-generic/errno.h`` and ``include/linux/errno.h``),
 otherwise you return 0.
 
 After you slept you should check if a signal occurred: the Unix/Linux
@@ -195,9 +195,7 @@ some data structure.
 If you're doing longer computations: first think userspace. If you
 **really** want to do it in kernel you should regularly check if you need
 to give up the CPU (remember there is cooperative multitasking per CPU).
-Idiom:
-
-::
+Idiom::
 
 cond_resched(); /* Will sleep */
 
@@ -231,26 +229,24 @@ Really.
 Common Routines
 ===
 
-:c:func:`printk()` ``include/linux/kernel.h``
--
+:c:func:`printk()`
+--
+
+Defined in ``include/linux/printk.h``
 
 :c:func:`printk()` feeds kernel messages to the console, dmesg, and
 the syslog daemon. It is useful for debugging and reporting errors, and
 can be used inside interrupt context, but use with caution: a machine
 which has its console flooded with printk messages is unusable. It uses
 a format string mostly compatible with ANSI C printf, and C string
-concatenation to give it a first "priority" argument:
-
-::
+concatenation to give it a first "priority" argument::
 
 printk(KERN_INFO "i = %u\n", i);
 
 
-See ``include/linux/kernel.h``; for other ``KERN_`` values; these are
+See ``include/linux/kern_levels.h``; for other ``KERN_`` values; these are
 interpreted by syslog as the level. Special case: for printing an IP
-address use
-
-::
+address use::
 
 __be32 ipaddress;
 printk(KERN_INFO "my ip: %pI4\n", &ipaddress);
@@ -270,8 +266,10 @@ overruns. Make sure that will be enough.
 on top of its printf function: "Printf should not be used for
 chit-chat". You should follow that advice.
 
-:c:func:`copy_[to/from]_user()` / :c:func:`get_user()` / :c:func:`put_user()` 
``include/linux/uaccess.h``
--
+:c:func:`copy_to_user()` / :c:func:`copy_from_user()` / :c:func:`get_user()` / 
:c:func:`put_user()`
+---
+
+Defined in ``include/linux/uaccess.h`` / ``asm/uaccess.h``
 
 **[SLEEPS]**
 
@@ -297,8 +295,10 @@ The functions may sleep implicitly. This should never be 
called outside
 user context (it makes no sense), with interrupts disabled, or a
 spinlock held.
 
-:c:func:`kmalloc()`/:c:func:`kfree()` ``include/linux/slab.h``
---
+:c:func:`kmalloc()`/:c:func:`kfree()`
+-
+
+Defined in ``include/linux/slab.h``
 
 **[MAY SLEEP: SEE BELOW]**
 
@@ -324,9 +324,9 @@ message, then maybe you called a sleeping allocation 
function from
 interrupt context without ``GFP_ATOMIC``. You should really fix that.
 Run, don't walk.
 
-If you are allocating at least ``PAGE_SIZE`` (``include

[PATCH v2 46/53] ia64, scsi: update references for the device-io book

2017-05-16 Thread Mauro Carvalho Chehab
The book is now at Documentation/driver-api/device-io.rst.
Update such references.

Signed-off-by: Mauro Carvalho Chehab 
---
 arch/ia64/include/asm/io.h | 2 +-
 arch/ia64/sn/kernel/iomv.c | 2 +-
 drivers/scsi/qla1280.c | 2 +-
 3 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/arch/ia64/include/asm/io.h b/arch/ia64/include/asm/io.h
index 5de673ac9cb1..a2540e21f919 100644
--- a/arch/ia64/include/asm/io.h
+++ b/arch/ia64/include/asm/io.h
@@ -117,7 +117,7 @@ extern int valid_mmap_phys_addr_range (unsigned long pfn, 
size_t count);
  * following the barrier will arrive after all previous writes.  For most
  * ia64 platforms, this is a simple 'mf.a' instruction.
  *
- * See Documentation/DocBook/deviceiobook.tmpl for more information.
+ * See Documentation/driver-api/device-io.rst for more information.
  */
 static inline void ___ia64_mmiowb(void)
 {
diff --git a/arch/ia64/sn/kernel/iomv.c b/arch/ia64/sn/kernel/iomv.c
index c77ebdf98119..2b22a71663c1 100644
--- a/arch/ia64/sn/kernel/iomv.c
+++ b/arch/ia64/sn/kernel/iomv.c
@@ -63,7 +63,7 @@ EXPORT_SYMBOL(sn_io_addr);
 /**
  * __sn_mmiowb - I/O space memory barrier
  *
- * See arch/ia64/include/asm/io.h and Documentation/DocBook/deviceiobook.tmpl
+ * See arch/ia64/include/asm/io.h and Documentation/driver-api/device-io.rst
  * for details.
  *
  * On SN2, we wait for the PIO_WRITE_STATUS SHub register to clear.
diff --git a/drivers/scsi/qla1280.c b/drivers/scsi/qla1280.c
index 634254a52301..8a29fb09db14 100644
--- a/drivers/scsi/qla1280.c
+++ b/drivers/scsi/qla1280.c
@@ -3390,7 +3390,7 @@ qla1280_isp_cmd(struct scsi_qla_host *ha)
 *On PCI bus, order reverses and write of 6 posts, then index 5,
 *   causing chip to issue full queue of stale commands
 * The mmiowb() prevents future writes from crossing the barrier.
-* See Documentation/DocBook/deviceiobook.tmpl for more information.
+* See Documentation/driver-api/device-io.rst for more information.
 */
WRT_REG_WORD(®->mailbox4, ha->req_ring_index);
mmiowb();
-- 
2.9.3

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


[PATCH v2 47/53] irq: update genericirq book location

2017-05-16 Thread Mauro Carvalho Chehab
This book got converted from DocBook. Update its references to
point to the current location.

Signed-off-by: Mauro Carvalho Chehab 
---
 kernel/irq/chip.c| 2 +-
 kernel/irq/handle.c  | 2 +-
 kernel/irq/irqdesc.c | 2 +-
 3 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/kernel/irq/chip.c b/kernel/irq/chip.c
index 686be4b73018..4188a0a7691f 100644
--- a/kernel/irq/chip.c
+++ b/kernel/irq/chip.c
@@ -7,7 +7,7 @@
  * This file contains the core interrupt handling code, for irq-chip
  * based architectures.
  *
- * Detailed information is available in Documentation/DocBook/genericirq
+ * Detailed information is available in Documentation/core-api/genericirq.rst
  */
 
 #include 
diff --git a/kernel/irq/handle.c b/kernel/irq/handle.c
index d3f24905852c..bbf9a7174283 100644
--- a/kernel/irq/handle.c
+++ b/kernel/irq/handle.c
@@ -6,7 +6,7 @@
  *
  * This file contains the core interrupt handling code.
  *
- * Detailed information is available in Documentation/DocBook/genericirq
+ * Detailed information is available in Documentation/core-api/genericirq.rst
  *
  */
 
diff --git a/kernel/irq/irqdesc.c b/kernel/irq/irqdesc.c
index 00bb0aeea1d0..22e443133987 100644
--- a/kernel/irq/irqdesc.c
+++ b/kernel/irq/irqdesc.c
@@ -4,7 +4,7 @@
  *
  * This file contains the interrupt descriptor management code
  *
- * Detailed information is available in Documentation/DocBook/genericirq
+ * Detailed information is available in Documentation/core-api/genericirq.rst
  *
  */
 #include 
-- 
2.9.3

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


[PATCH v2 44/53] MAINTAINERS: update old references for DocBook directory

2017-05-16 Thread Mauro Carvalho Chehab
As everything was converted, update the references to
point to the new places.

Signed-off-by: Mauro Carvalho Chehab 
---
 MAINTAINERS | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/MAINTAINERS b/MAINTAINERS
index f42daf74f541..8609dba03cbc 100644
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -3567,7 +3567,6 @@ T:git 
git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6.git
 S: Maintained
 F: Documentation/crypto/
 F: Documentation/devicetree/bindings/crypto/
-F: Documentation/DocBook/crypto-API.tmpl
 F: arch/*/crypto/
 F: crypto/
 F: drivers/crypto/
@@ -7364,7 +7363,7 @@ W:http://kgdb.wiki.kernel.org/
 L: kgdb-bugrep...@lists.sourceforge.net
 T: git git://git.kernel.org/pub/scm/linux/kernel/git/jwessel/kgdb.git
 S: Maintained
-F: Documentation/DocBook/kgdb.tmpl
+F: Documentation/dev-tools/kgdb.rst
 F: drivers/misc/kgdbts.c
 F: drivers/tty/serial/kgdboc.c
 F: include/linux/kdb.h
@@ -10971,7 +10970,7 @@ S:  Supported
 F: arch/s390/
 F: drivers/s390/
 F: Documentation/s390/
-F: Documentation/DocBook/s390*
+F: Documentation/driver-api/s390-drivers.rst
 
 S390 COMMON I/O LAYER
 M: Sebastian Ott 
-- 
2.9.3

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


[PATCH v2 39/53] mtd: adjust kernel-docs to avoid Sphinx/kerneldoc warnings

2017-05-16 Thread Mauro Carvalho Chehab
./drivers/mtd/nand/nand_bbt.c:1: warning: no structured comments found
./include/linux/mtd/nand.h:785: ERROR: Unexpected indentation.
./drivers/mtd/nand/nand_base.c:449: WARNING: Definition list ends without a 
blank line; unexpected unindent.
./drivers/mtd/nand/nand_base.c:1161: ERROR: Unexpected indentation.
./drivers/mtd/nand/nand_base.c:1162: WARNING: Block quote ends without a blank 
line; unexpected unindent.

Signed-off-by: Mauro Carvalho Chehab 
---
 Documentation/driver-api/mtdnand.rst | 3 ---
 drivers/mtd/nand/nand_base.c | 7 +--
 include/linux/mtd/nand.h | 2 +-
 3 files changed, 6 insertions(+), 6 deletions(-)

diff --git a/Documentation/driver-api/mtdnand.rst 
b/Documentation/driver-api/mtdnand.rst
index 7c19795ebb4a..e9afa586d15e 100644
--- a/Documentation/driver-api/mtdnand.rst
+++ b/Documentation/driver-api/mtdnand.rst
@@ -970,9 +970,6 @@ hints" for an explanation.
 .. kernel-doc:: drivers/mtd/nand/nand_base.c
:export:
 
-.. kernel-doc:: drivers/mtd/nand/nand_bbt.c
-   :export:
-
 .. kernel-doc:: drivers/mtd/nand/nand_ecc.c
:export:
 
diff --git a/drivers/mtd/nand/nand_base.c b/drivers/mtd/nand/nand_base.c
index b0524f8accb6..c8988c01e0d7 100644
--- a/drivers/mtd/nand/nand_base.c
+++ b/drivers/mtd/nand/nand_base.c
@@ -442,10 +442,12 @@ static int nand_default_block_markbad(struct mtd_info 
*mtd, loff_t ofs)
  * specify how to write bad block markers to OOB (chip->block_markbad).
  *
  * We try operations in the following order:
+ *
  *  (1) erase the affected block, to allow OOB marker to be written cleanly
  *  (2) write bad block marker to OOB area of affected block (unless flag
  *  NAND_BBT_NO_OOB_BBM is present)
  *  (3) update the BBT
+ *
  * Note that we retain the first error encountered in (2) or (3), finish the
  * procedures, and dump the error in the end.
 */
@@ -1155,9 +1157,10 @@ int nand_reset(struct nand_chip *chip, int chipnr)
  * @mtd: mtd info
  * @ofs: offset to start unlock from
  * @len: length to unlock
- * @invert: when = 0, unlock the range of blocks within the lower and
+ * @invert:
+ *- when = 0, unlock the range of blocks within the lower and
  *upper boundary address
- *  when = 1, unlock the range of blocks outside the boundaries
+ *- when = 1, unlock the range of blocks outside the boundaries
  *of the lower and upper boundary address
  *
  * Returs unlock status.
diff --git a/include/linux/mtd/nand.h b/include/linux/mtd/nand.h
index 9591e0fbe5bd..3d5b20379ba3 100644
--- a/include/linux/mtd/nand.h
+++ b/include/linux/mtd/nand.h
@@ -779,7 +779,7 @@ nand_get_sdr_timings(const struct nand_data_interface *conf)
  * Minimum amount of bit errors per @ecc_step_ds guaranteed
  * to be correctable. If unknown, set to zero.
  * @ecc_step_ds:   [INTERN] ECC step required by the @ecc_strength_ds,
- *  also from the datasheet. It is the recommended ECC step
+ * also from the datasheet. It is the recommended ECC step
  * size, if known; if unknown, set to zero.
  * @onfi_timing_mode_default: [INTERN] default ONFI timing mode. This field is
  *   set to the actually used ONFI mode if the chip is
-- 
2.9.3

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


[PATCH v2 12/53] docs-rst: conf.py: remove kernel-documentation from LaTeX

2017-05-16 Thread Mauro Carvalho Chehab
There's no kernel-documentation.rst file at Documentation/
anymore. So, remove it from the list of LaTeX-generated
documents.

Signed-off-by: Mauro Carvalho Chehab 
---
 Documentation/conf.py | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/Documentation/conf.py b/Documentation/conf.py
index 1bad6a4d6348..15f34d6863a7 100644
--- a/Documentation/conf.py
+++ b/Documentation/conf.py
@@ -359,9 +359,7 @@ latex_documents = [
  'The kernel development community', 'manual'),
 ('input/index', 'linux-input.tex', 'The Linux input driver subsystem',
  'The kernel development community', 'manual'),
-('kernel-documentation', 'kernel-documentation.tex', 'The Linux Kernel 
Documentation',
- 'The kernel development community', 'manual'),
-('kernel-hacking/index', 'kernel-hacking.tex', 'Kernel Hacking Guides',
+('kernel-hacking/index', 'kernel-hacking.tex', 'Unreliable Guide To 
Hacking The Linux Kernel',
  'The kernel development community', 'manual'),
 ('media/index', 'media.tex', 'Linux Media Subsystem Documentation',
  'The kernel development community', 'manual'),
-- 
2.9.3

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


[PATCH v2 11/53] docs-rst: conf.py: sort LaTeX documents in alphabetical order

2017-05-16 Thread Mauro Carvalho Chehab
As we add more documents, it makes more sense to sort the
entries there in alphabetical order, as it makes easier to
check if something is not there.

Signed-off-by: Mauro Carvalho Chehab 
---
 Documentation/conf.py | 13 +++--
 1 file changed, 7 insertions(+), 6 deletions(-)

diff --git a/Documentation/conf.py b/Documentation/conf.py
index 1774357150a3..1bad6a4d6348 100644
--- a/Documentation/conf.py
+++ b/Documentation/conf.py
@@ -345,27 +345,28 @@ if major == 1 and minor > 3:
 # Grouping the document tree into LaTeX files. List of tuples
 # (source start file, target name, title,
 #  author, documentclass [howto, manual, or own class]).
+# Sorted in alphabetical order
 latex_documents = [
-('doc-guide/index', 'kernel-doc-guide.tex', 'Linux Kernel Documentation 
Guide',
- 'The kernel development community', 'manual'),
 ('admin-guide/index', 'linux-user.tex', 'Linux Kernel User Documentation',
  'The kernel development community', 'manual'),
 ('core-api/index', 'core-api.tex', 'The kernel core API manual',
  'The kernel development community', 'manual'),
+('doc-guide/index', 'kernel-doc-guide.tex', 'Linux Kernel Documentation 
Guide',
+ 'The kernel development community', 'manual'),
 ('driver-api/index', 'driver-api.tex', 'The kernel driver API manual',
  'The kernel development community', 'manual'),
+('gpu/index', 'gpu.tex', 'Linux GPU Driver Developer\'s Guide',
+ 'The kernel development community', 'manual'),
 ('input/index', 'linux-input.tex', 'The Linux input driver subsystem',
  'The kernel development community', 'manual'),
 ('kernel-documentation', 'kernel-documentation.tex', 'The Linux Kernel 
Documentation',
  'The kernel development community', 'manual'),
 ('kernel-hacking/index', 'kernel-hacking.tex', 'Kernel Hacking Guides',
  'The kernel development community', 'manual'),
-('process/index', 'development-process.tex', 'Linux Kernel Development 
Documentation',
- 'The kernel development community', 'manual'),
-('gpu/index', 'gpu.tex', 'Linux GPU Driver Developer\'s Guide',
- 'The kernel development community', 'manual'),
 ('media/index', 'media.tex', 'Linux Media Subsystem Documentation',
  'The kernel development community', 'manual'),
+('process/index', 'development-process.tex', 'Linux Kernel Development 
Documentation',
+ 'The kernel development community', 'manual'),
 ('security/index', 'security.tex', 'The kernel security subsystem manual',
  'The kernel development community', 'manual'),
 ]
-- 
2.9.3

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


[PATCH v2 20/53] docs-rst: don't ignore internal functions for jbd2 docs

2017-05-16 Thread Mauro Carvalho Chehab
Those functions are currently ignored, causing references at
the documentation to be lost. Don't ignore it.

Signed-off-by: Mauro Carvalho Chehab 
---
 Documentation/filesystems/index.rst | 1 -
 1 file changed, 1 deletion(-)

diff --git a/Documentation/filesystems/index.rst 
b/Documentation/filesystems/index.rst
index 148becd91cba..256e10eedba4 100644
--- a/Documentation/filesystems/index.rst
+++ b/Documentation/filesystems/index.rst
@@ -287,7 +287,6 @@ Transasction Level
 ~~
 
 .. kernel-doc:: fs/jbd2/transaction.c
-   :export:
 
 See also
 
-- 
2.9.3

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


[PATCH v2 10/53] conf.py: define a color for important markup on PDF output

2017-05-16 Thread Mauro Carvalho Chehab
As kdbg.rst uses the ".. important::" annotation, let's define a
color for PDF output.

Signed-off-by: Mauro Carvalho Chehab 
---
 Documentation/conf.py | 8 +++-
 1 file changed, 7 insertions(+), 1 deletion(-)

diff --git a/Documentation/conf.py b/Documentation/conf.py
index 0ce8001a50b6..1774357150a3 100644
--- a/Documentation/conf.py
+++ b/Documentation/conf.py
@@ -281,6 +281,7 @@ latex_elements = {
\\definecolor{NoteColor}{RGB}{204,255,255}
\\definecolor{WarningColor}{RGB}{255,204,204}
\\definecolor{AttentionColor}{RGB}{255,255,204}
+   \\definecolor{ImportantColor}{RGB}{192,255,204}
\\definecolor{OtherColor}{RGB}{204,204,204}
 \\newlength{\\mynoticelength}
 \\makeatletter\\newenvironment{coloredbox}[1]{%
@@ -301,7 +302,12 @@ latex_elements = {
\\ifthenelse%
{\\equal{\\py@noticetype}{attention}}%
{\\colorbox{AttentionColor}{\\usebox{\\@tempboxa}}}%
-   {\\colorbox{OtherColor}{\\usebox{\\@tempboxa}}}%
+   {%
+  \\ifthenelse%
+  {\\equal{\\py@noticetype}{important}}%
+  {\\colorbox{ImportantColor}{\\usebox{\\@tempboxa}}}%
+  {\\colorbox{OtherColor}{\\usebox{\\@tempboxa}}}%
+   }%
 }%
  }%
 }\\makeatother
-- 
2.9.3

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


[PATCH v2 16/53] docs-rst: add userspace API book to pdf output

2017-05-16 Thread Mauro Carvalho Chehab
The userspace API book was added without the bits required to
generate PDF output. Add them.

Signed-off-by: Mauro Carvalho Chehab 
---
 Documentation/conf.py | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/Documentation/conf.py b/Documentation/conf.py
index bca751960dec..2e215477edf5 100644
--- a/Documentation/conf.py
+++ b/Documentation/conf.py
@@ -373,6 +373,8 @@ latex_documents = [
  'The kernel development community', 'manual'),
 ('sound/index', 'sound.tex', 'Linux Sound Subsystem Documentation',
  'The kernel development community', 'manual'),
+('userspace-api/index', 'userspace-api.tex', 'The Linux kernel user-space 
API guide',
+ 'The kernel development community', 'manual'),
 ]
 
 # The name of an image file (relative to this directory) to place at the top of
-- 
2.9.3

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


[PATCH v2 21/53] fs: add a blank lines on some kernel-doc comments

2017-05-16 Thread Mauro Carvalho Chehab
Sphinx gets confused when it finds identation without a
good reason for it and without a preceding blank line:

./fs/mpage.c:347: ERROR: Unexpected indentation.
./fs/namei.c:4303: ERROR: Unexpected indentation.
./fs/fs-writeback.c:2060: ERROR: Unexpected indentation.

No functional changes.

Signed-off-by: Mauro Carvalho Chehab 
---
 fs/fs-writeback.c | 12 +++-
 fs/mpage.c|  1 +
 fs/namei.c|  1 +
 3 files changed, 9 insertions(+), 5 deletions(-)

diff --git a/fs/fs-writeback.c b/fs/fs-writeback.c
index 63ee2940775c..8b426f83909f 100644
--- a/fs/fs-writeback.c
+++ b/fs/fs-writeback.c
@@ -2052,11 +2052,13 @@ static noinline void 
block_dump___mark_inode_dirty(struct inode *inode)
 }
 
 /**
- * __mark_inode_dirty -internal function
- * @inode: inode to mark
- * @flags: what kind of dirty (i.e. I_DIRTY_SYNC)
- * Mark an inode as dirty. Callers should use mark_inode_dirty or
- * mark_inode_dirty_sync.
+ * __mark_inode_dirty -internal function
+ *
+ * @inode: inode to mark
+ * @flags: what kind of dirty (i.e. I_DIRTY_SYNC)
+ *
+ * Mark an inode as dirty. Callers should use mark_inode_dirty or
+ * mark_inode_dirty_sync.
  *
  * Put the inode on the super block's dirty list.
  *
diff --git a/fs/mpage.c b/fs/mpage.c
index baff8f820c29..4760a0c09a4e 100644
--- a/fs/mpage.c
+++ b/fs/mpage.c
@@ -344,6 +344,7 @@ do_mpage_readpage(struct bio *bio, struct page *page, 
unsigned nr_pages,
  *
  * So an mpage read of the first 16 blocks of an ext2 file will cause I/O to be
  * submitted in the following order:
+ *
  * 12 0 1 2 3 4 5 6 7 8 9 10 11 13 14 15 16
  *
  * because the indirect block has to be read to get the mappings of blocks
diff --git a/fs/namei.c b/fs/namei.c
index 7286f87ce863..b5af8228e2d9 100644
--- a/fs/namei.c
+++ b/fs/namei.c
@@ -4300,6 +4300,7 @@ SYSCALL_DEFINE2(link, const char __user *, oldname, const 
char __user *, newname
  * The worst of all namespace operations - renaming directory. "Perverted"
  * doesn't even start to describe it. Somebody in UCB had a heck of a trip...
  * Problems:
+ *
  * a) we can get into loop creation.
  * b) race potential - two innocent renames can create a loop together.
  *That's where 4.4 screws up. Current fix: serialization on
-- 
2.9.3

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


[PATCH v2 29/53] net: skbuff.h: properly escape a macro name on kernel-doc

2017-05-16 Thread Mauro Carvalho Chehab
The "%" escape code of kernel-doc only handle letters. It
doesn't handle special chars. So, use the ``literal``
notation. That fixes this warning:

./include/linux/skbuff.h:2695: WARNING: Inline literal start-string without 
end-string.

No functional changes.

Signed-off-by: Mauro Carvalho Chehab 
---
 include/linux/skbuff.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/include/linux/skbuff.h b/include/linux/skbuff.h
index a098d95b3d84..25b1659c832a 100644
--- a/include/linux/skbuff.h
+++ b/include/linux/skbuff.h
@@ -2691,7 +2691,7 @@ bool skb_page_frag_refill(unsigned int sz, struct 
page_frag *pfrag, gfp_t prio);
  * @offset: the offset within the fragment (starting at the
  *  fragment's own offset)
  * @size: the number of bytes to map
- * @dir: the direction of the mapping (%PCI_DMA_*)
+ * @dir: the direction of the mapping (``PCI_DMA_*``)
  *
  * Maps the page associated with @frag to @device.
  */
-- 
2.9.3

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


[PATCH v2 05/53] locking.rst: reformat locking table

2017-05-16 Thread Mauro Carvalho Chehab
Use a different markup for this table, in order to make it
smaller when seeing in text mode.

Signed-off-by: Mauro Carvalho Chehab 
---
 Documentation/kernel-hacking/locking.rst | 37 
 1 file changed, 14 insertions(+), 23 deletions(-)

diff --git a/Documentation/kernel-hacking/locking.rst 
b/Documentation/kernel-hacking/locking.rst
index 976b2703df75..17774b1f7587 100644
--- a/Documentation/kernel-hacking/locking.rst
+++ b/Documentation/kernel-hacking/locking.rst
@@ -319,29 +319,20 @@ Remember the advice above: you can always use
 :c:func:`spin_lock_irqsave()`, which is a superset of all other
 spinlock primitives.
 
-+--+-+-+-+-+-+-+---+---+--+--+
-|  | IRQ Handler A   | IRQ Handler B   | Softirq A   | Softirq 
B   | Tasklet A   | Tasklet B   | Timer A   | Timer B   | User Context A   | 
User Context B   |
-+--+-+-+-+-+-+-+---+---+--+--+
-| IRQ Handler A| None| | | 
| | |   |   |  |
  |
-+--+-+-+-+-+-+-+---+---+--+--+
-| IRQ Handler B| SLIS| None| | 
| | |   |   |  |
  |
-+--+-+-+-+-+-+-+---+---+--+--+
-| Softirq A| SLI | SLI | SL  | 
| | |   |   |  |
  |
-+--+-+-+-+-+-+-+---+---+--+--+
-| Softirq B| SLI | SLI | SL  | SL  
| | |   |   |  |
  |
-+--+-+-+-+-+-+-+---+---+--+--+
-| Tasklet A| SLI | SLI | SL  | SL  
| None| |   |   |  |
  |
-+--+-+-+-+-+-+-+---+---+--+--+
-| Tasklet B| SLI | SLI | SL  | SL  
| SL  | None|   |   |  |
  |
-+--+-+-+-+-+-+-+---+---+--+--+
-| Timer A  | SLI | SLI | SL  | SL  
| SL  | SL  | None  |   |  |
  |
-+--+-+-+-+-+-+-+---+---+--+--+
-| Timer B  | SLI | SLI | SL  | SL  
| SL  | SL  | SL| None  |  |
  |
-+--+-+-+-+-+-+-+---+---+--+--+
-| User Context A   | SLI | SLI | SLBH| SLBH
| SLBH| SLBH| SLBH  | SLBH  | None |
  |
-+--+-+-+-+-+-+-+---+---+--+--+
-| User Context B   | SLI | SLI | SLBH| SLBH
| SLBH| SLBH| SLBH  | SLBH  | MLI  | 
None |
-+--+-+-+-+-+-+-+---+---+--+--+
+== = = = = = 
= === === == ==
+.  IRQ Handler A IRQ Handler B Softirq A Softirq B Tasklet A 
Tasklet B Timer A Timer B User Context A User Context B
+=

[PATCH v2 30/53] net: fix some identation issues at kernel-doc markups

2017-05-16 Thread Mauro Carvalho Chehab
Sphinx is very pedantic with regards to identation and
escape sequences:

  ./include/net/sock.h:1967: ERROR: Unexpected indentation.
  ./include/net/sock.h:1969: ERROR: Unexpected indentation.
  ./include/net/sock.h:1970: WARNING: Block quote ends without a blank line; 
unexpected unindent.
  ./include/net/sock.h:1971: WARNING: Block quote ends without a blank line; 
unexpected unindent.
  ./include/net/sock.h:2268: WARNING: Inline emphasis start-string without 
end-string.
  ./net/core/sock.c:2686: ERROR: Unexpected indentation.
  ./net/core/sock.c:2687: WARNING: Block quote ends without a blank line; 
unexpected unindent.
  ./net/core/datagram.c:182: WARNING: Inline emphasis start-string without 
end-string.
  ./include/linux/netdevice.h:1444: ERROR: Unexpected indentation.
  ./drivers/net/phy/phy.c:381: ERROR: Unexpected indentation.
  ./drivers/net/phy/phy.c:382: WARNING: Block quote ends without a blank line; 
unexpected unindent.

- Fix spacing where needed;
- Properly escape constants;
- Use a literal block for a race description.

No functional changes.

Signed-off-by: Mauro Carvalho Chehab 
---
 drivers/net/phy/phy.c | 1 +
 include/linux/netdevice.h | 9 +
 include/net/sock.h| 9 -
 net/core/datagram.c   | 2 +-
 net/core/sock.c   | 7 +--
 5 files changed, 16 insertions(+), 12 deletions(-)

diff --git a/drivers/net/phy/phy.c b/drivers/net/phy/phy.c
index 82ab8fb82587..709b8be53443 100644
--- a/drivers/net/phy/phy.c
+++ b/drivers/net/phy/phy.c
@@ -377,6 +377,7 @@ static void phy_sanitize_settings(struct phy_device *phydev)
  * @cmd: ethtool_cmd
  *
  * A few notes about parameter checking:
+ *
  * - We don't set port or transceiver, so we don't care what they
  *   were set to.
  * - phy_start_aneg() will make sure forced settings are sane, and
diff --git a/include/linux/netdevice.h b/include/linux/netdevice.h
index 9c23bd2efb56..56d54b6fac45 100644
--- a/include/linux/netdevice.h
+++ b/include/linux/netdevice.h
@@ -1433,13 +1433,14 @@ enum netdev_priv_flags {
 
 /**
  * struct net_device - The DEVICE structure.
- * Actually, this whole structure is a big mistake.  It mixes I/O
- * data with strictly "high-level" data, and it has to know about
- * almost every data structure used in the INET module.
+ *
+ * Actually, this whole structure is a big mistake.  It mixes I/O
+ * data with strictly "high-level" data, and it has to know about
+ * almost every data structure used in the INET module.
  *
  * @name:  This is the first field of the "visible" part of this structure
  * (i.e. as seen by users in the "Space.c" file).  It is the name
- * of the interface.
+ * of the interface.
  *
  * @name_hlist:Device name hash chain, please keep it close to name[]
  * @ifalias:   SNMP alias
diff --git a/include/net/sock.h b/include/net/sock.h
index 66349e49d468..9ca99b5c1328 100644
--- a/include/net/sock.h
+++ b/include/net/sock.h
@@ -1953,11 +1953,10 @@ static inline bool sk_has_allocations(const struct sock 
*sk)
  * The purpose of the skwq_has_sleeper and sock_poll_wait is to wrap the memory
  * barrier call. They were added due to the race found within the tcp code.
  *
- * Consider following tcp code paths:
+ * Consider following tcp code paths::
  *
- * CPU1  CPU2
- *
- * sys_selectreceive packet
+ *   CPU1CPU2
+ *   sys_select  receive packet
  *   ... ...
  *   __add_wait_queueupdate tp->rcv_nxt
  *   ... ...
@@ -2264,7 +2263,7 @@ void __sock_tx_timestamp(__u16 tsflags, __u8 *tx_flags);
  * @tsflags:   timestamping flags to use
  * @tx_flags:  completed with instructions for time stamping
  *
- * Note : callers should take care of initial *tx_flags value (usually 0)
+ * Note: callers should take care of initial ``*tx_flags`` value (usually 0)
  */
 static inline void sock_tx_timestamp(const struct sock *sk, __u16 tsflags,
 __u8 *tx_flags)
diff --git a/net/core/datagram.c b/net/core/datagram.c
index db1866f2ffcf..4dd594741b6d 100644
--- a/net/core/datagram.c
+++ b/net/core/datagram.c
@@ -181,7 +181,7 @@ static struct sk_buff *skb_set_peeked(struct sk_buff *skb)
  *
  * This function will lock the socket if a skb is returned, so
  * the caller needs to unlock the socket in that case (usually by
- * calling skb_free_datagram). Returns NULL with *err set to
+ * calling skb_free_datagram). Returns NULL with @err set to
  * -EAGAIN if no data was available or to some other value if an
  * error was detected.
  *
diff --git a/net/core/sock.c b/net/core/sock.c
index 79c6aee6af9b..6adc69edfdd6 100644
--- a/net/core/sock.c
+++ b/net/core/sock.c
@@ -2682,9 +2682,12 @@ EXPORT_SYMBOL(release_sock);
  * @sk: socket
  *
  * This version should be used for very small section, where process wont block
- * return false if fast p

[PATCH v2 28/53] docs-rst: convert networking book to ReST

2017-05-16 Thread Mauro Carvalho Chehab
Use pandoc to convert documentation to ReST by calling
Documentation/sphinx/tmplcvt script.

Signed-off-by: Mauro Carvalho Chehab 
---
 Documentation/DocBook/Makefile|   1 -
 Documentation/DocBook/networking.tmpl | 111 -
 Documentation/conf.py |   2 +
 Documentation/index.rst   |   1 +
 Documentation/networking/conf.py  |  10 +++
 Documentation/networking/index.rst|  17 
 Documentation/networking/kapi.rst | 147 ++
 7 files changed, 177 insertions(+), 112 deletions(-)
 delete mode 100644 Documentation/DocBook/networking.tmpl
 create mode 100644 Documentation/networking/conf.py
 create mode 100644 Documentation/networking/index.rst
 create mode 100644 Documentation/networking/kapi.rst

diff --git a/Documentation/DocBook/Makefile b/Documentation/DocBook/Makefile
index a25bf10384e1..8a90891c3712 100644
--- a/Documentation/DocBook/Makefile
+++ b/Documentation/DocBook/Makefile
@@ -7,7 +7,6 @@
 # list of DOCBOOKS.
 
 DOCBOOKS := z8530book.xml  \
-   networking.xml \
lsm.xml \
mtdnand.xml librs.xml rapidio.xml \
scsi.xml \
diff --git a/Documentation/DocBook/networking.tmpl 
b/Documentation/DocBook/networking.tmpl
deleted file mode 100644
index 29df25016c7c..
--- a/Documentation/DocBook/networking.tmpl
+++ /dev/null
@@ -1,111 +0,0 @@
-
-http://www.oasis-open.org/docbook/xml/4.1.2/docbookx.dtd"; []>
-
-
- 
-  Linux Networking and Network Devices APIs
-
-  
-   
- This documentation is free software; you can redistribute
- it and/or modify it under the terms of the GNU General Public
- License as published by the Free Software Foundation; either
- version 2 of the License, or (at your option) any later
- version.
-   
-
-   
- This program is distributed in the hope that it will be
- useful, but WITHOUT ANY WARRANTY; without even the implied
- warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
- See the GNU General Public License for more details.
-   
-
-   
- You should have received a copy of the GNU General Public
- License along with this program; if not, write to the Free
- Software Foundation, Inc., 59 Temple Place, Suite 330, Boston,
- MA 02111-1307 USA
-   
-
-   
- For more details see the file COPYING in the source
- distribution of Linux.
-   
-  
- 
-
-
-
-  
- Linux Networking
- Networking Base Types
-!Iinclude/linux/net.h
- 
- Socket Buffer Functions
-!Iinclude/linux/skbuff.h
-!Iinclude/net/sock.h
-!Enet/socket.c
-!Enet/core/skbuff.c
-!Enet/core/sock.c
-!Enet/core/datagram.c
-!Enet/core/stream.c
- 
- Socket Filter
-!Enet/core/filter.c
- 
- Generic Network Statistics
-!Iinclude/uapi/linux/gen_stats.h
-!Enet/core/gen_stats.c
-!Enet/core/gen_estimator.c
- 
- SUN RPC subsystem
-
-!Enet/sunrpc/xdr.c
-!Enet/sunrpc/svc_xprt.c
-!Enet/sunrpc/xprt.c
-!Enet/sunrpc/sched.c
-!Enet/sunrpc/socklib.c
-!Enet/sunrpc/stats.c
-!Enet/sunrpc/rpc_pipe.c
-!Enet/sunrpc/rpcb_clnt.c
-!Enet/sunrpc/clnt.c
- 
- WiMAX
-!Enet/wimax/op-msg.c
-!Enet/wimax/op-reset.c
-!Enet/wimax/op-rfkill.c
-!Enet/wimax/stack.c
-!Iinclude/net/wimax.h
-!Iinclude/uapi/linux/wimax.h
- 
-  
-
-  
- Network device support
- Driver Support
-!Enet/core/dev.c
-!Enet/ethernet/eth.c
-!Enet/sched/sch_generic.c
-!Iinclude/linux/etherdevice.h
-!Iinclude/linux/netdevice.h
- 
- PHY Support
-!Edrivers/net/phy/phy.c
-!Idrivers/net/phy/phy.c
-!Edrivers/net/phy/phy_device.c
-!Idrivers/net/phy/phy_device.c
-!Edrivers/net/phy/mdio_bus.c
-!Idrivers/net/phy/mdio_bus.c
- 
-
-  
-
-
diff --git a/Documentation/conf.py b/Documentation/conf.py
index ad9a4781b330..dfe14f7525d0 100644
--- a/Documentation/conf.py
+++ b/Documentation/conf.py
@@ -369,6 +369,8 @@ latex_documents = [
  'The kernel development community', 'manual'),
 ('media/index', 'media.tex', 'Linux Media Subsystem Documentation',
  'The kernel development community', 'manual'),
+('networking/index', 'networking.tex', 'Linux Networking Documentation',
+ 'The kernel development community', 'manual'),
 ('process/index', 'development-process.tex', 'Linux Kernel Development 
Documentation',
  'The kernel development community', 'manual'),
 ('security/index', 'security.tex', 'The kernel security subsystem manual',
diff --git a/Documentation/index.rst b/Documentation/index.rst
index dae365f3820e..25c4da41da6b 100644
--- a/Documentation/index.rst
+++ b/Documentation/index.rst
@@ -68,6 +68,7 @@ needed).
driver-api/index
core-api/index
media/index
+   networking/index
input/index
gpu/index
security/index
diff --git a/Documentation/networking/conf.py b/Documentation/networking/conf.py
new file mode 100644
index ..40f69e67a883
--- /dev/null
+++ b/Documentation/networking/conf.py
@@ -0,0 +1,10 @@
+# -*- coding: utf-8; mode: python -*-
+
+project = "Linux Netw

[PATCH v2 04/53] mutex, futex: adjust kernel-doc markups to generate ReST

2017-05-16 Thread Mauro Carvalho Chehab
There are a few issues on some kernel-doc markups that was
causing troubles with kernel-doc output on ReST format:

./kernel/futex.c:492: WARNING: Inline emphasis start-string without end-string.
./kernel/futex.c:1264: WARNING: Block quote ends without a blank line; 
unexpected unindent.
./kernel/futex.c:1721: WARNING: Block quote ends without a blank line; 
unexpected unindent.
./kernel/futex.c:2338: WARNING: Block quote ends without a blank line; 
unexpected unindent.
./kernel/futex.c:2426: WARNING: Block quote ends without a blank line; 
unexpected unindent.
./kernel/futex.c:2899: WARNING: Block quote ends without a blank line; 
unexpected unindent.
./kernel/futex.c:2972: WARNING: Block quote ends without a blank line; 
unexpected unindent.

Fix them.

No functional changes.

Acked-by: Darren Hart (VMware) 
Signed-off-by: Mauro Carvalho Chehab 
---
 include/linux/mutex.h  |  6 +++---
 kernel/futex.c | 40 
 kernel/locking/mutex.c |  6 +++---
 3 files changed, 26 insertions(+), 26 deletions(-)

diff --git a/include/linux/mutex.h b/include/linux/mutex.h
index 1127fe31645d..ffcba1f337da 100644
--- a/include/linux/mutex.h
+++ b/include/linux/mutex.h
@@ -214,9 +214,9 @@ enum mutex_trylock_recursive_enum {
  * raisins, and once those are gone this will be removed.
  *
  * Returns:
- *  MUTEX_TRYLOCK_FAILED- trylock failed,
- *  MUTEX_TRYLOCK_SUCCESS   - lock acquired,
- *  MUTEX_TRYLOCK_RECURSIVE - we already owned the lock.
+ *  - MUTEX_TRYLOCK_FAILED- trylock failed,
+ *  - MUTEX_TRYLOCK_SUCCESS   - lock acquired,
+ *  - MUTEX_TRYLOCK_RECURSIVE - we already owned the lock.
  */
 static inline /* __deprecated */ __must_check enum mutex_trylock_recursive_enum
 mutex_trylock_recursive(struct mutex *lock)
diff --git a/kernel/futex.c b/kernel/futex.c
index 357348a6cf6b..b8ae87d227da 100644
--- a/kernel/futex.c
+++ b/kernel/futex.c
@@ -488,7 +488,7 @@ static void drop_futex_key_refs(union futex_key *key)
  *
  * Return: a negative error code or 0
  *
- * The key words are stored in *key on success.
+ * The key words are stored in @key on success.
  *
  * For shared mappings, it's (page->index, file_inode(vma->vm_file),
  * offset_within_page).  For private mappings, it's (uaddr, current->mm).
@@ -1259,9 +1259,9 @@ static int lock_pi_update_atomic(u32 __user *uaddr, u32 
uval, u32 newval)
  * @set_waiters:   force setting the FUTEX_WAITERS bit (1) or not (0)
  *
  * Return:
- *  0 - ready to wait;
- *  1 - acquired the lock;
- * <0 - error
+ *  -  0 - ready to wait;
+ *  -  1 - acquired the lock;
+ *  - <0 - error
  *
  * The hb->lock and futex_key refs shall be held by the caller.
  */
@@ -1717,9 +1717,9 @@ void requeue_pi_wake_futex(struct futex_q *q, union 
futex_key *key,
  * hb1 and hb2 must be held by the caller.
  *
  * Return:
- *  0 - failed to acquire the lock atomically;
- * >0 - acquired the lock, return value is vpid of the top_waiter
- * <0 - error
+ *  -  0 - failed to acquire the lock atomically;
+ *  - >0 - acquired the lock, return value is vpid of the top_waiter
+ *  - <0 - error
  */
 static int futex_proxy_trylock_atomic(u32 __user *pifutex,
 struct futex_hash_bucket *hb1,
@@ -1785,8 +1785,8 @@ static int futex_proxy_trylock_atomic(u32 __user *pifutex,
  * uaddr2 atomically on behalf of the top waiter.
  *
  * Return:
- * >=0 - on success, the number of tasks requeued or woken;
- *  <0 - on error
+ *  - >=0 - on success, the number of tasks requeued or woken;
+ *  -  <0 - on error
  */
 static int futex_requeue(u32 __user *uaddr1, unsigned int flags,
 u32 __user *uaddr2, int nr_wake, int nr_requeue,
@@ -2142,8 +2142,8 @@ static inline void queue_me(struct futex_q *q, struct 
futex_hash_bucket *hb)
  * be paired with exactly one earlier call to queue_me().
  *
  * Return:
- *   1 - if the futex_q was still queued (and we removed unqueued it);
- *   0 - if the futex_q was already removed by the waking thread
+ *  - 1 - if the futex_q was still queued (and we removed unqueued it);
+ *  - 0 - if the futex_q was already removed by the waking thread
  */
 static int unqueue_me(struct futex_q *q)
 {
@@ -2333,9 +2333,9 @@ static long futex_wait_restart(struct restart_block 
*restart);
  * acquire the lock. Must be called with the hb lock held.
  *
  * Return:
- *  1 - success, lock taken;
- *  0 - success, lock not taken;
- * <0 - on error (-EFAULT)
+ *  -  1 - success, lock taken;
+ *  -  0 - success, lock not taken;
+ *  - <0 - on error (-EFAULT)
  */
 static int fixup_owner(u32 __user *uaddr, struct futex_q *q, int locked)
 {
@@ -2422,8 +2422,8 @@ static void futex_wait_queue_me(struct futex_hash_bucket 
*hb, struct futex_q *q,
  * with no q.key reference on failure.
  *
  * Return:
- *  0 - uaddr contains val and hb has been locked;
- * <1 - -EFAULT or -EWOULDBLOCK (uaddr does not contain val) and hb is unlocked
+ *  -  0 - uaddr contains val and hb has been locked;
+ *  - <1 - -EFAUL

[PATCH v2 34/53] docs-rst: convert w1 book to ReST

2017-05-16 Thread Mauro Carvalho Chehab
Use pandoc to convert documentation to ReST by calling
Documentation/sphinx/tmplcvt script.

Signed-off-by: Mauro Carvalho Chehab 
---
 Documentation/DocBook/w1.tmpl  | 101 -
 Documentation/driver-api/index.rst |   1 +
 Documentation/driver-api/w1.rst|  70 +
 3 files changed, 71 insertions(+), 101 deletions(-)
 delete mode 100644 Documentation/DocBook/w1.tmpl
 create mode 100644 Documentation/driver-api/w1.rst

diff --git a/Documentation/DocBook/w1.tmpl b/Documentation/DocBook/w1.tmpl
deleted file mode 100644
index b0228d4c81bb..
--- a/Documentation/DocBook/w1.tmpl
+++ /dev/null
@@ -1,101 +0,0 @@
-
-http://www.oasis-open.org/docbook/xml/4.1.2/docbookx.dtd"; []>
-
-
-  
-W1: Dallas' 1-wire bus
-
-
-  
-David
-Fries
-
-  
-da...@fries.net
-  
-
-  
-
-
-
-
-  2013
-  
-
-
-
-  
-This documentation is free software; you can redistribute
-it and/or modify it under the terms of the GNU General Public
-License version 2.
-  
-
-  
-This program is distributed in the hope that it will be
-useful, but WITHOUT ANY WARRANTY; without even the implied
-warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
-For more details see the file COPYING in the source
-distribution of Linux.
-  
-
-  
-
-  
-
-  
-W1 API internal to the kernel
-
-
-  W1 API internal to the kernel
-  
-drivers/w1/w1.h
-W1 core functions.
-!Idrivers/w1/w1.h
-  
-
-  
-drivers/w1/w1.c
-W1 core functions.
-!Idrivers/w1/w1.c
-  
-
-  
-drivers/w1/w1_family.h
-Allows registering device family operations.
-!Idrivers/w1/w1_family.h
-  
-
-  
-drivers/w1/w1_family.c
-Allows registering device family operations.
-!Edrivers/w1/w1_family.c
-  
-
-  
-drivers/w1/w1_int.c
-W1 internal initialization for master devices.
-!Edrivers/w1/w1_int.c
-  
-
-  
-drivers/w1/w1_netlink.h
-W1 external netlink API structures and commands.
-!Idrivers/w1/w1_netlink.h
-  
-
-  
-drivers/w1/w1_io.c
-W1 input/output.
-!Edrivers/w1/w1_io.c
-!Idrivers/w1/w1_io.c
-  
-
-
-
-
-  
-
-
diff --git a/Documentation/driver-api/index.rst 
b/Documentation/driver-api/index.rst
index 9589b06e374e..8610aab8f342 100644
--- a/Documentation/driver-api/index.rst
+++ b/Documentation/driver-api/index.rst
@@ -35,6 +35,7 @@ available subsections can be seen below.
scsi
libata
miscellaneous
+   w1
s390-drivers
vme
80211/index
diff --git a/Documentation/driver-api/w1.rst b/Documentation/driver-api/w1.rst
new file mode 100644
index ..c1da8f0cb476
--- /dev/null
+++ b/Documentation/driver-api/w1.rst
@@ -0,0 +1,70 @@
+==
+W1: Dallas' 1-wire bus
+==
+
+:Author: David Fries
+
+W1 API internal to the kernel
+=
+
+W1 API internal to the kernel
+-
+
+drivers/w1/w1.h
+~~~
+
+W1 core functions.
+
+.. kernel-doc:: drivers/w1/w1.h
+   :internal:
+
+drivers/w1/w1.c
+~~~
+
+W1 core functions.
+
+.. kernel-doc:: drivers/w1/w1.c
+   :internal:
+
+drivers/w1/w1_family.h
+~~~
+
+Allows registering device family operations.
+
+.. kernel-doc:: drivers/w1/w1_family.h
+   :internal:
+
+drivers/w1/w1_family.c
+~~~
+
+Allows registering device family operations.
+
+.. kernel-doc:: drivers/w1/w1_family.c
+   :export:
+
+drivers/w1/w1_int.c
+
+
+W1 internal initialization for master devices.
+
+.. kernel-doc:: drivers/w1/w1_int.c
+   :export:
+
+drivers/w1/w1_netlink.h
+
+
+W1 external netlink API structures and commands.
+
+.. kernel-doc:: drivers/w1/w1_netlink.h
+   :internal:
+
+drivers/w1/w1_io.c
+~~~
+
+W1 input/output.
+
+.. kernel-doc:: drivers/w1/w1_io.c
+   :export:
+
+.. kernel-doc:: drivers/w1/w1_io.c
+   :internal:
-- 
2.9.3

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


[PATCH v2 33/53] scsi: fix some kernel-doc markups

2017-05-16 Thread Mauro Carvalho Chehab
Sphinx is very pedantic with regards to ident/spacing.
Fix some kernel-doc markups in order to solve those
errors/warnings:

./drivers/scsi/scsicam.c:121: WARNING: Inline emphasis start-string without 
end-string.
./drivers/scsi/scsicam.c:121: WARNING: Inline emphasis start-string without 
end-string.
./drivers/scsi/scsicam.c:121: WARNING: Inline emphasis start-string without 
end-string.
./drivers/scsi/scsi_scan.c:1056: ERROR: Unexpected indentation.
./drivers/scsi/scsi_scan.c:1057: WARNING: Block quote ends without a blank 
line; unexpected unindent.
./drivers/scsi/scsi_transport_fc.c:2918: ERROR: Unexpected indentation.
./drivers/scsi/scsi_transport_fc.c:2921: WARNING: Block quote ends without a 
blank line; unexpected unindent.
./drivers/scsi/scsi_transport_fc.c:2922: WARNING: Enumerated list ends without 
a blank line; unexpected unindent.

No functional changes.

Signed-off-by: Mauro Carvalho Chehab 
---
 drivers/scsi/scsi_scan.c |  7 ---
 drivers/scsi/scsi_transport_fc.c | 18 ++
 drivers/scsi/scsicam.c   |  4 ++--
 3 files changed, 16 insertions(+), 13 deletions(-)

diff --git a/drivers/scsi/scsi_scan.c b/drivers/scsi/scsi_scan.c
index 6f7128f49c30..69979574004f 100644
--- a/drivers/scsi/scsi_scan.c
+++ b/drivers/scsi/scsi_scan.c
@@ -1051,10 +1051,11 @@ static unsigned char *scsi_inq_str(unsigned char *buf, 
unsigned char *inq,
  * allocate and set it up by calling scsi_add_lun.
  *
  * Return:
- * SCSI_SCAN_NO_RESPONSE: could not allocate or setup a scsi_device
- * SCSI_SCAN_TARGET_PRESENT: target responded, but no device is
+ *
+ *   - SCSI_SCAN_NO_RESPONSE: could not allocate or setup a scsi_device
+ *   - SCSI_SCAN_TARGET_PRESENT: target responded, but no device is
  * attached at the LUN
- * SCSI_SCAN_LUN_PRESENT: a new scsi_device was allocated and initialized
+ *   - SCSI_SCAN_LUN_PRESENT: a new scsi_device was allocated and initialized
  **/
 static int scsi_probe_and_add_lun(struct scsi_target *starget,
  u64 lun, int *bflagsp,
diff --git a/drivers/scsi/scsi_transport_fc.c b/drivers/scsi/scsi_transport_fc.c
index d4cf32d55546..1df77453f6b6 100644
--- a/drivers/scsi/scsi_transport_fc.c
+++ b/drivers/scsi/scsi_transport_fc.c
@@ -2914,16 +2914,18 @@ EXPORT_SYMBOL(fc_remote_port_add);
  * port is no longer part of the topology. Note: Although a port
  * may no longer be part of the topology, it may persist in the remote
  * ports displayed by the fc_host. We do this under 2 conditions:
+ *
  * 1) If the port was a scsi target, we delay its deletion by "blocking" it.
- *   This allows the port to temporarily disappear, then reappear without
- *   disrupting the SCSI device tree attached to it. During the "blocked"
- *   period the port will still exist.
+ *This allows the port to temporarily disappear, then reappear without
+ *disrupting the SCSI device tree attached to it. During the "blocked"
+ *period the port will still exist.
+ *
  * 2) If the port was a scsi target and disappears for longer than we
- *   expect, we'll delete the port and the tear down the SCSI device tree
- *   attached to it. However, we want to semi-persist the target id assigned
- *   to that port if it eventually does exist. The port structure will
- *   remain (although with minimal information) so that the target id
- *   bindings remails.
+ *expect, we'll delete the port and the tear down the SCSI device tree
+ *attached to it. However, we want to semi-persist the target id assigned
+ *to that port if it eventually does exist. The port structure will
+ *remain (although with minimal information) so that the target id
+ *bindings remails.
  *
  * If the remote port is not an FCP Target, it will be fully torn down
  * and deallocated, including the fc_remote_port class device.
diff --git a/drivers/scsi/scsicam.c b/drivers/scsi/scsicam.c
index 910f4a7a3924..31273468589c 100644
--- a/drivers/scsi/scsicam.c
+++ b/drivers/scsi/scsicam.c
@@ -116,8 +116,8 @@ EXPORT_SYMBOL(scsicam_bios_param);
  * @hds: put heads here
  * @secs: put sectors here
  *
- * Description: determine the BIOS mapping/geometry used to create the 
partition
- *  table, storing the results in *cyls, *hds, and *secs 
+ * Determine the BIOS mapping/geometry used to create the partition
+ * table, storing the results in @cyls, @hds, and @secs
  *
  * Returns: -1 on failure, 0 on success.
  */
-- 
2.9.3

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


[PATCH v2 27/53] docs-rst: convert s390-drivers DocBook to ReST

2017-05-16 Thread Mauro Carvalho Chehab
Use pandoc to convert documentation to ReST by calling
Documentation/sphinx/tmplcvt script.

Acked-by: Cornelia Huck 
Signed-off-by: Mauro Carvalho Chehab 
---
 Documentation/DocBook/Makefile|   2 +-
 Documentation/DocBook/s390-drivers.tmpl   | 161 --
 Documentation/driver-api/index.rst|   1 +
 Documentation/driver-api/s390-drivers.rst | 111 
 4 files changed, 113 insertions(+), 162 deletions(-)
 delete mode 100644 Documentation/DocBook/s390-drivers.tmpl
 create mode 100644 Documentation/driver-api/s390-drivers.rst

diff --git a/Documentation/DocBook/Makefile b/Documentation/DocBook/Makefile
index abe71345160b..a25bf10384e1 100644
--- a/Documentation/DocBook/Makefile
+++ b/Documentation/DocBook/Makefile
@@ -10,7 +10,7 @@ DOCBOOKS := z8530book.xml  \
networking.xml \
lsm.xml \
mtdnand.xml librs.xml rapidio.xml \
-   s390-drivers.xml scsi.xml \
+   scsi.xml \
sh.xml w1.xml
 
 ifeq ($(DOCBOOKS),)
diff --git a/Documentation/DocBook/s390-drivers.tmpl 
b/Documentation/DocBook/s390-drivers.tmpl
deleted file mode 100644
index 95bfc12e5439..
--- a/Documentation/DocBook/s390-drivers.tmpl
+++ /dev/null
@@ -1,161 +0,0 @@
-
-http://www.oasis-open.org/docbook/xml/4.1.2/docbookx.dtd"; []>
-
-
- 
-  Writing s390 channel device drivers
-
-  
-   
-Cornelia
-Huck
-
- 
-   cornelia.h...@de.ibm.com
- 
-
-   
-  
-
-  
-   2007
-   IBM Corp.
-  
-
-  
-   
- This documentation is free software; you can redistribute
- it and/or modify it under the terms of the GNU General Public
- License as published by the Free Software Foundation; either
- version 2 of the License, or (at your option) any later
- version.
-   
-
-   
- This program is distributed in the hope that it will be
- useful, but WITHOUT ANY WARRANTY; without even the implied
- warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
- See the GNU General Public License for more details.
-   
-
-   
- You should have received a copy of the GNU General Public
- License along with this program; if not, write to the Free
- Software Foundation, Inc., 59 Temple Place, Suite 330, Boston,
- MA 02111-1307 USA
-   
-
-   
- For more details see the file COPYING in the source
- distribution of Linux.
-   
-  
- 
-
-
-
-  
-   Introduction
-  
-This document describes the interfaces available for device drivers that
-drive s390 based channel attached I/O devices. This includes interfaces for
-interaction with the hardware and interfaces for interacting with the
-common driver core. Those interfaces are provided by the s390 common I/O
-layer.
-  
-  
-The document assumes a familarity with the technical terms associated
-with the s390 channel I/O architecture. For a description of this
-architecture, please refer to the "z/Architecture: Principles of
-Operation", IBM publication no. SA22-7832.
-  
-  
-While most I/O devices on a s390 system are typically driven through the
-channel I/O mechanism described here, there are various other methods
-(like the diag interface). These are out of the scope of this document.
-  
-  
-Some additional information can also be found in the kernel source
-under Documentation/s390/driver-model.txt.
-  
-  
-  
-   The ccw bus
-  
-   The ccw bus typically contains the majority of devices available to
-   a s390 system. Named after the channel command word (ccw), the basic
-   command structure used to address its devices, the ccw bus contains
-   so-called channel attached devices. They are addressed via I/O
-   subchannels, visible on the css bus. A device driver for
-   channel-attached devices, however, will never interact  with the
-   subchannel directly, but only via the I/O device on the ccw bus,
-   the ccw device.
-  
-
- I/O functions for channel-attached devices
-
-  Some hardware structures have been translated into C structures for use
-  by the common I/O layer and device drivers. For more information on
-  the hardware structures represented here, please consult the Principles
-  of Operation.
-
-!Iarch/s390/include/asm/cio.h
-
-
- ccw devices
-
-  Devices that want to initiate channel I/O need to attach to the ccw bus.
-  Interaction with the driver core is done via the common I/O layer, which
-  provides the abstractions of ccw devices and ccw device drivers.
-
-
-  The functions that initiate or terminate channel I/O all act upon a
-  ccw device structure. Device drivers must not bypass those functions
-  or strange side effects may happen.
-
-!Iarch/s390/include/asm/ccwdev.h
-!Edrivers/s390/cio/device.c
-!Edrivers/s390/cio/device_ops.c
-
-
- The channel-measurement facility
-  
-   The channel-measurement 

[PATCH v2 22/53] fs: eventfd: fix identation on kernel-doc

2017-05-16 Thread Mauro Carvalho Chehab
Sphinx require explicit tags in order to use a list of possible
values, otherwise it produces this error:

./fs/eventfd.c:219: WARNING: Option list ends without a blank line; 
unexpected unindent.

Signed-off-by: Mauro Carvalho Chehab 
---
 fs/eventfd.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/fs/eventfd.c b/fs/eventfd.c
index 68b9fffcb2c8..beac8175de19 100644
--- a/fs/eventfd.c
+++ b/fs/eventfd.c
@@ -215,8 +215,8 @@ EXPORT_SYMBOL_GPL(eventfd_ctx_remove_wait_queue);
  *
  * Returns %0 if successful, or the following error codes:
  *
- * -EAGAIN  : The operation would have blocked but @no_wait was non-zero.
- * -ERESTARTSYS : A signal interrupted the wait operation.
+ *  - -EAGAIN  : The operation would have blocked but @no_wait was 
non-zero.
+ *  - -ERESTARTSYS : A signal interrupted the wait operation.
  *
  * If @no_wait is zero, the function might sleep until the eventfd internal
  * counter becomes greater than zero.
-- 
2.9.3

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


[PATCH v2 35/53] docs-rst: convert rapidio book to ReST

2017-05-16 Thread Mauro Carvalho Chehab
Use pandoc to convert documentation to ReST by calling
Documentation/sphinx/tmplcvt script.

Signed-off-by: Mauro Carvalho Chehab 
---
 Documentation/DocBook/Makefile   |   4 +-
 Documentation/DocBook/rapidio.tmpl   | 155 ---
 Documentation/driver-api/index.rst   |   1 +
 Documentation/driver-api/rapidio.rst | 107 
 4 files changed, 110 insertions(+), 157 deletions(-)
 delete mode 100644 Documentation/DocBook/rapidio.tmpl
 create mode 100644 Documentation/driver-api/rapidio.rst

diff --git a/Documentation/DocBook/Makefile b/Documentation/DocBook/Makefile
index 3bbda02d6aee..baedb14f3b40 100644
--- a/Documentation/DocBook/Makefile
+++ b/Documentation/DocBook/Makefile
@@ -8,8 +8,8 @@
 
 DOCBOOKS := \
lsm.xml \
-   mtdnand.xml librs.xml rapidio.xml \
-   sh.xml w1.xml
+   mtdnand.xml librs.xml \
+   sh.xml
 
 ifeq ($(DOCBOOKS),)
 
diff --git a/Documentation/DocBook/rapidio.tmpl 
b/Documentation/DocBook/rapidio.tmpl
deleted file mode 100644
index ac3cca3399a1..
--- a/Documentation/DocBook/rapidio.tmpl
+++ /dev/null
@@ -1,155 +0,0 @@
-
-http://www.oasis-open.org/docbook/xml/4.1.2/docbookx.dtd"; [
-   
-   ]>
-
-
- 
-  RapidIO Subsystem Guide
-
-  
-   
-Matt
-Porter
-
- 
-  mpor...@kernel.crashing.org
-  mpor...@mvista.com
- 
-
-   
-  
-
-  
-   2005
-   MontaVista Software, Inc.
-  
-
-  
-   
- This documentation is free software; you can redistribute
- it and/or modify it under the terms of the GNU General Public
- License version 2 as published by the Free Software Foundation.
-   
-
-   
- This program is distributed in the hope that it will be
- useful, but WITHOUT ANY WARRANTY; without even the implied
- warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
- See the GNU General Public License for more details.
-   
-
-   
- You should have received a copy of the GNU General Public
- License along with this program; if not, write to the Free
- Software Foundation, Inc., 59 Temple Place, Suite 330, Boston,
- MA 02111-1307 USA
-   
-
-   
- For more details see the file COPYING in the source
- distribution of Linux.
-   
-  
- 
-
-
-
-  
-  Introduction
-  
-   RapidIO is a high speed switched fabric interconnect with
-   features aimed at the embedded market.  RapidIO provides
-   support for memory-mapped I/O as well as message-based
-   transactions over the switched fabric network. RapidIO has
-   a standardized discovery mechanism not unlike the PCI bus
-   standard that allows simple detection of devices in a
-   network.
-  
-  
-   This documentation is provided for developers intending
-   to support RapidIO on new architectures, write new drivers,
-   or to understand the subsystem internals.
-  
-  
-
-  
- Known Bugs and Limitations
-
- 
-   Bugs
- None. ;)
- 
- 
-   Limitations
- 
-   
- Access/management of RapidIO memory regions is 
not supported
- Multiple host enumeration is not 
supported
-   
-
- 
-  
-
-  
-   RapidIO driver interface
-   
-   Drivers are provided a set of calls in order
-   to interface with the subsystem to gather info
-   on devices, request/map memory region resources,
-   and manage mailboxes/doorbells.
-   
-   
-   Functions
-!Iinclude/linux/rio_drv.h
-!Edrivers/rapidio/rio-driver.c
-!Edrivers/rapidio/rio.c
-   
-  
-
-  
- Internals
-
- 
- This chapter contains the autogenerated documentation of the RapidIO
- subsystem.
- 
-
- Structures
-!Iinclude/linux/rio.h
- 
- Enumeration and 
Discovery
-!Idrivers/rapidio/rio-scan.c
- 
- Driver functionality
-!Idrivers/rapidio/rio.c
-!Idrivers/rapidio/rio-access.c
- 
- Device model support
-!Idrivers/rapidio/rio-driver.c
- 
- PPC32 support
-!Iarch/powerpc/sysdev/fsl_rio.c
- 
-  
-
-  
- Credits
-   
-   The following people have contributed to the RapidIO
-   subsystem directly or indirectly:
-   
-   Matt 
Portermpor...@kernel.crashing.org
-   Randy 
Vinsonrvin...@mvista.com
-   Dan 
Malekd...@embeddedalley.com
-   
-   
-   
-   The following people have contributed to this document:
-   
-   Matt 
Portermpor...@kernel.crashing.org
-   
-   
-  
-
diff --git a/Documentation/driver-api/index.rst 
b/Documentation/driver-api/index.rst
index 8610aab8f342..1f8517db39c7 100644
--- a/Documentation/driver-api/index.rst
+++ b/Documentation/driver-api/index.rst
@@ -36,6 +36,7 @@ available subsections can be seen below.
libata
miscellaneous
w1
+   rapidi

[PATCH v2 26/53] libata: fix identation on a kernel-doc markup

2017-05-16 Thread Mauro Carvalho Chehab
Sphinx got confused with the markup identation:
./drivers/ata/libata-scsi.c:3402: ERROR: Unexpected indentation.

No functional changes.

Signed-off-by: Mauro Carvalho Chehab 
---
 drivers/ata/libata-scsi.c | 7 ---
 1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/drivers/ata/libata-scsi.c b/drivers/ata/libata-scsi.c
index 49ba9834c715..dcd38d9e9804 100644
--- a/drivers/ata/libata-scsi.c
+++ b/drivers/ata/libata-scsi.c
@@ -3398,9 +3398,10 @@ static size_t ata_format_dsm_trim_descr(struct scsi_cmnd 
*cmd, u32 trmax,
  *
  * Translate a SCSI WRITE SAME command to be either a DSM TRIM command or
  * an SCT Write Same command.
- * Based on WRITE SAME has the UNMAP flag
- *   When set translate to DSM TRIM
- *   When clear translate to SCT Write Same
+ * Based on WRITE SAME has the UNMAP flag:
+ *
+ *   - When set translate to DSM TRIM
+ *   - When clear translate to SCT Write Same
  */
 static unsigned int ata_scsi_write_same_xlat(struct ata_queued_cmd *qc)
 {
-- 
2.9.3

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


[PATCH v2 06/53] locking.rst: add captions to two tables

2017-05-16 Thread Mauro Carvalho Chehab
Those tables have a "caption" at the end, but ReST
actually expects it on a different way.

Signed-off-by: Mauro Carvalho Chehab 
---
 Documentation/kernel-hacking/locking.rst | 66 
 1 file changed, 34 insertions(+), 32 deletions(-)

diff --git a/Documentation/kernel-hacking/locking.rst 
b/Documentation/kernel-hacking/locking.rst
index 17774b1f7587..b70c2c4eb147 100644
--- a/Documentation/kernel-hacking/locking.rst
+++ b/Documentation/kernel-hacking/locking.rst
@@ -29,43 +29,45 @@ In a normal program, you can increment a counter like so:
 
 This is what they would expect to happen:
 
-+++
-| Instance 1 | Instance 2 |
-+++
-| read very_important_count (5)  ||
-+++
-| add 1 (6)  ||
-+++
-| write very_important_count (6) ||
-+++
-|| read very_important_count (6)  |
-+++
-|| add 1 (7)  |
-+++
-|| write very_important_count (7) |
-+++
 
-Table: Expected Results
+.. table:: Expected Results
+
+  +++
+  | Instance 1 | Instance 2 |
+  +++
+  | read very_important_count (5)  ||
+  +++
+  | add 1 (6)  ||
+  +++
+  | write very_important_count (6) ||
+  +++
+  || read very_important_count (6)  |
+  +++
+  || add 1 (7)  |
+  +++
+  || write very_important_count (7) |
+  +++
 
 This is what might happen:
 
-+++
-| Instance 1 | Instance 2 |
-+++
-| read very_important_count (5)  ||
-+++
-|| read very_important_count (5)  |
-+++
-| add 1 (6)  ||
-+++
-|| add 1 (6)  |
-+++
-| write very_important_count (6) ||
-+++
-|| write very_important_count (6) |
-+++
+.. table:: Possible Results
+
+  +++
+  | Instance 1 | Instance 2 |
+  +++
+  | read very_important_count (5)  ||
+  +++
+  || read very_important_count (5)  |
+  +++
+  | add 1 (6)  ||
+  +++
+  || add 1 (

[PATCH v2 40/53] docs-rst: convert sh book to ReST

2017-05-16 Thread Mauro Carvalho Chehab
Use pandoc to convert documentation to ReST by calling
Documentation/sphinx/tmplcvt script.

Signed-off-by: Mauro Carvalho Chehab 
---
 Documentation/DocBook/Makefile |   4 +-
 Documentation/DocBook/sh.tmpl  | 105 -
 Documentation/conf.py  |   2 +
 Documentation/index.rst|  11 +
 Documentation/sh/conf.py   |  10 
 Documentation/sh/index.rst |  59 +++
 6 files changed, 83 insertions(+), 108 deletions(-)
 delete mode 100644 Documentation/DocBook/sh.tmpl
 create mode 100644 Documentation/sh/conf.py
 create mode 100644 Documentation/sh/index.rst

diff --git a/Documentation/DocBook/Makefile b/Documentation/DocBook/Makefile
index 226e5e9fc801..efba7f980895 100644
--- a/Documentation/DocBook/Makefile
+++ b/Documentation/DocBook/Makefile
@@ -6,9 +6,7 @@
 # To add a new book the only step required is to add the book to the
 # list of DOCBOOKS.
 
-DOCBOOKS := \
-   lsm.xml \
-   sh.xml
+DOCBOOKS := lsm.xml
 
 ifeq ($(DOCBOOKS),)
 
diff --git a/Documentation/DocBook/sh.tmpl b/Documentation/DocBook/sh.tmpl
deleted file mode 100644
index 4a38f604fa66..
--- a/Documentation/DocBook/sh.tmpl
+++ /dev/null
@@ -1,105 +0,0 @@
-
-http://www.oasis-open.org/docbook/xml/4.1.2/docbookx.dtd"; []>
-
-
- 
-  SuperH Interfaces Guide
-  
-  
-   
-Paul
-Mundt
-
- 
-  let...@linux-sh.org
- 
-
-   
-  
-
-  
-   2008-2010
-   Paul Mundt
-  
-  
-   2008-2010
-   Renesas Technology Corp.
-  
-  
-   2010
-   Renesas Electronics Corp.
-  
-
-  
-   
- This documentation is free software; you can redistribute
- it and/or modify it under the terms of the GNU General Public
- License version 2 as published by the Free Software Foundation.
-   
-  
-   
- This program is distributed in the hope that it will be
- useful, but WITHOUT ANY WARRANTY; without even the implied
- warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
- See the GNU General Public License for more details.
-   
-  
-   
- You should have received a copy of the GNU General Public
- License along with this program; if not, write to the Free
- Software Foundation, Inc., 59 Temple Place, Suite 330, Boston,
- MA 02111-1307 USA
-   
-  
-   
- For more details see the file COPYING in the source
- distribution of Linux.
-   
-  
- 
-
-
-
-  
-Memory Management
-
-SH-4
-  
-Store Queue API
-!Earch/sh/kernel/cpu/sh4/sq.c
-  
-
-
-  SH-5
-  
-   TLB Interfaces
-!Iarch/sh/mm/tlb-sh5.c
-!Iarch/sh/include/asm/tlb_64.h
-  
-
-  
-  
-Machine Specific Interfaces
-
-  mach-dreamcast
-!Iarch/sh/boards/mach-dreamcast/rtc.c
-
-
-  mach-x3proto
-!Earch/sh/boards/mach-x3proto/ilsel.c
-
-  
-  
-Busses
-
-  SuperHyway
-!Edrivers/sh/superhyway/superhyway.c
-
-
-
-  Maple
-!Edrivers/sh/maple/maple.c
-
-  
-
diff --git a/Documentation/conf.py b/Documentation/conf.py
index dfe14f7525d0..77d47bb1df1d 100644
--- a/Documentation/conf.py
+++ b/Documentation/conf.py
@@ -375,6 +375,8 @@ latex_documents = [
  'The kernel development community', 'manual'),
 ('security/index', 'security.tex', 'The kernel security subsystem manual',
  'The kernel development community', 'manual'),
+('sh/index', 'sh.tex', 'SuperH architecture implementation manual',
+ 'The kernel development community', 'manual'),
 ('sound/index', 'sound.tex', 'Linux Sound Subsystem Documentation',
  'The kernel development community', 'manual'),
 ('userspace-api/index', 'userspace-api.tex', 'The Linux kernel user-space 
API guide',
diff --git a/Documentation/index.rst b/Documentation/index.rst
index 25c4da41da6b..e9017bb3a6ce 100644
--- a/Documentation/index.rst
+++ b/Documentation/index.rst
@@ -76,6 +76,17 @@ needed).
crypto/index
filesystems/index
 
+Architecture-specific documentation
+---
+
+These books provide programming details about architecture-specific
+implementation.
+
+.. toctree::
+   :maxdepth: 2
+
+   sh/index
+
 Korean translations
 ---
 
diff --git a/Documentation/sh/conf.py b/Documentation/sh/conf.py
new file mode 100644
index ..1eb684a13ac8
--- /dev/null
+++ b/Documentation/sh/conf.py
@@ -0,0 +1,10 @@
+# -*- coding: utf-8; mode: python -*-
+
+project = "SuperH architecture implementation manual"
+
+tags.add("subproject")
+
+latex_documents = [
+('index', 'sh.tex', project,
+ 'The kernel development community', 'manual'),
+]
diff --git a/Documentation/sh/index.rst b/Documentation/sh/index.rst
new file mode 100644
index ..bc8db7ba894a
--- /dev/null
+++ b/Documentation/sh/index.rst
@@ -0,0 +1,59 @@
+===
+SuperH Interfaces Guide
+===
+
+:Author: Paul Mundt
+
+Memory Management
+=
+
+SH-4
+
+
+Store Queue API
+~

[PATCH v2 38/53] mtdnand.rst: group the "::" with previous line

2017-05-16 Thread Mauro Carvalho Chehab
Group the :: with the previous paragraph, in order to make it
visually better when reading as a text file.

While here, replace:
ored (with means "Covered or adorned with ore or metal")
by:
OR-ed

To reflect its true meaning.

Signed-off-by: Mauro Carvalho Chehab 
---
 Documentation/driver-api/mtdnand.rst | 24 +++-
 1 file changed, 7 insertions(+), 17 deletions(-)

diff --git a/Documentation/driver-api/mtdnand.rst 
b/Documentation/driver-api/mtdnand.rst
index 8723175f955e..7c19795ebb4a 100644
--- a/Documentation/driver-api/mtdnand.rst
+++ b/Documentation/driver-api/mtdnand.rst
@@ -843,10 +843,8 @@ Chip option constants
 Constants for chip id table
 ~~~
 
-These constants are defined in nand.h. They are ored together to
-describe the chip functionality.
-
-::
+These constants are defined in nand.h. They are OR-ed together to
+describe the chip functionality::
 
 /* Buswitdh is 16 bit */
 #define NAND_BUSWIDTH_160x0002
@@ -867,10 +865,8 @@ describe the chip functionality.
 Constants for runtime options
 ~
 
-These constants are defined in nand.h. They are ored together to
-describe the functionality.
-
-::
+These constants are defined in nand.h. They are OR-ed together to
+describe the functionality::
 
 /* The hw ecc generator provides a syndrome instead a ecc value on read
  * This can only work if we have the ecc bytes directly behind the
@@ -881,9 +877,7 @@ describe the functionality.
 ECC selection constants
 ---
 
-Use these constants to select the ECC algorithm.
-
-::
+Use these constants to select the ECC algorithm::
 
 /* No ECC. Usage is not recommended ! */
 #define NAND_ECC_NONE   0
@@ -903,9 +897,7 @@ Hardware control related constants
 --
 
 These constants describe the requested hardware access function when the
-boardspecific hardware control function is called
-
-::
+boardspecific hardware control function is called::
 
 /* Select the chip by setting nCE to low */
 #define NAND_CTL_SETNCE 1
@@ -929,9 +921,7 @@ Bad block table related constants
 -
 
 These constants describe the options used for bad block table
-descriptors.
-
-::
+descriptors::
 
 /* Options for the bad block table descriptors */
 
-- 
2.9.3

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


[PATCH v2 13/53] docs-rst: add crypto API book to pdf output

2017-05-16 Thread Mauro Carvalho Chehab
The crypto API book was added without the bits required to
generate PDF output. Add them.

Signed-off-by: Mauro Carvalho Chehab 
---
 Documentation/conf.py|  2 ++
 Documentation/crypto/conf.py | 10 ++
 2 files changed, 12 insertions(+)
 create mode 100644 Documentation/crypto/conf.py

diff --git a/Documentation/conf.py b/Documentation/conf.py
index 15f34d6863a7..ce62723491d4 100644
--- a/Documentation/conf.py
+++ b/Documentation/conf.py
@@ -351,6 +351,8 @@ latex_documents = [
  'The kernel development community', 'manual'),
 ('core-api/index', 'core-api.tex', 'The kernel core API manual',
  'The kernel development community', 'manual'),
+('crypto/index', 'crypto-api.tex', 'Linux Kernel Crypto API manual',
+ 'The kernel development community', 'manual'),
 ('doc-guide/index', 'kernel-doc-guide.tex', 'Linux Kernel Documentation 
Guide',
  'The kernel development community', 'manual'),
 ('driver-api/index', 'driver-api.tex', 'The kernel driver API manual',
diff --git a/Documentation/crypto/conf.py b/Documentation/crypto/conf.py
new file mode 100644
index ..4335d251ddf3
--- /dev/null
+++ b/Documentation/crypto/conf.py
@@ -0,0 +1,10 @@
+# -*- coding: utf-8; mode: python -*-
+
+project = 'Linux Kernel Crypto API'
+
+tags.add("subproject")
+
+latex_documents = [
+('index', 'crypto-api.tex', 'Linux Kernel Crypto API manual',
+ 'The kernel development community', 'manual'),
+]
-- 
2.9.3

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


Re: [PATCH v2 30/53] net: fix some identation issues at kernel-doc markups

2017-05-16 Thread David Howells
Mauro Carvalho Chehab  wrote:

> - *   calling skb_free_datagram). Returns NULL with *err set to
> + *   calling skb_free_datagram). Returns NULL with @err set to

I think this should be *@err or @*err.  err is not itself changed.

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


Re: [PATCH v2 43/53] docs: update old references for DocBook from the documentation

2017-05-16 Thread Bartlomiej Zolnierkiewicz
On Tuesday, May 16, 2017 09:16:35 AM Mauro Carvalho Chehab wrote:
> DocBook is mentioned several times at the documentation. Update
> the obsolete references from it at the DocBook.
> 
> Acked-by: SeongJae Park 
> Signed-off-by: Mauro Carvalho Chehab 

For fbdev part:

Acked-by: Bartlomiej Zolnierkiewicz 

Best regards,
--
Bartlomiej Zolnierkiewicz
Samsung R&D Institute Poland
Samsung Electronics

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


Re: [PATCH v2 45/53] ata: update references for libata documentation

2017-05-16 Thread Bartlomiej Zolnierkiewicz
On Tuesday, May 16, 2017 09:16:37 AM Mauro Carvalho Chehab wrote:
> The libata documentation is now using ReST. Update references
> to it to point to the new place.
> 
> Signed-off-by: Mauro Carvalho Chehab 

For PATA parts:

Acked-by: Bartlomiej Zolnierkiewicz 

Best regards,
--
Bartlomiej Zolnierkiewicz
Samsung R&D Institute Poland
Samsung Electronics

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


Re: [PATCH v2 37/53] docs-rst: convert mtdnand book to ReST

2017-05-16 Thread Boris Brezillon
On Tue, 16 May 2017 09:16:29 -0300
Mauro Carvalho Chehab  wrote:

> Use pandoc to convert documentation to ReST by calling
> Documentation/sphinx/tmplcvt script.
> 
> The tables were manually adjusted to fit into 80 columns.
> 
> Signed-off-by: Mauro Carvalho Chehab 

Acked-by: Boris Brezillon 

> ---
>  Documentation/DocBook/Makefile   |1 -
>  Documentation/DocBook/mtdnand.tmpl   | 1291 
> --
>  Documentation/driver-api/index.rst   |1 +
>  Documentation/driver-api/mtdnand.rst | 1020 +++
>  4 files changed, 1021 insertions(+), 1292 deletions(-)
>  delete mode 100644 Documentation/DocBook/mtdnand.tmpl
>  create mode 100644 Documentation/driver-api/mtdnand.rst
> 
> diff --git a/Documentation/DocBook/Makefile b/Documentation/DocBook/Makefile
> index 0a82f6253682..226e5e9fc801 100644
> --- a/Documentation/DocBook/Makefile
> +++ b/Documentation/DocBook/Makefile
> @@ -8,7 +8,6 @@
>  
>  DOCBOOKS := \
>   lsm.xml \
> - mtdnand.xml \
>   sh.xml
>  
>  ifeq ($(DOCBOOKS),)
> diff --git a/Documentation/DocBook/mtdnand.tmpl 
> b/Documentation/DocBook/mtdnand.tmpl
> deleted file mode 100644
> index b442921bca54..
> --- a/Documentation/DocBook/mtdnand.tmpl
> +++ /dev/null
> @@ -1,1291 +0,0 @@
> -
> - - "http://www.oasis-open.org/docbook/xml/4.1.2/docbookx.dtd"; []>
> -
> -
> - 
> -  MTD NAND Driver Programming Interface
> -  
> -  
> -   
> -Thomas
> -Gleixner
> -
> - 
> -  t...@linutronix.de
> - 
> -
> -   
> -  
> -
> -  
> -   2004
> -   Thomas Gleixner
> -  
> -
> -  
> -   
> - This documentation is free software; you can redistribute
> - it and/or modify it under the terms of the GNU General Public
> - License version 2 as published by the Free Software Foundation.
> -   
> -  
> -   
> - This program is distributed in the hope that it will be
> - useful, but WITHOUT ANY WARRANTY; without even the implied
> - warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
> - See the GNU General Public License for more details.
> -   
> -  
> -   
> - You should have received a copy of the GNU General Public
> - License along with this program; if not, write to the Free
> - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston,
> - MA 02111-1307 USA
> -   
> -  
> -   
> - For more details see the file COPYING in the source
> - distribution of Linux.
> -   
> -  
> - 
> -
> -
> -
> -  
> -  Introduction
> -  
> - The generic NAND driver supports almost all NAND and AG-AND based
> - chips and connects them to the Memory Technology Devices (MTD)
> - subsystem of the Linux Kernel.
> -  
> -  
> - This documentation is provided for developers who want to implement
> - board drivers or filesystem drivers suitable for NAND devices.
> -  
> -  
> -  
> -  
> - Known Bugs And Assumptions
> -  
> - None.   
> -  
> -  
> -
> -  
> - Documentation hints
> - 
> - The function and structure docs are autogenerated. Each function and 
> - struct member has a short description which is marked with an [XXX] 
> identifier.
> - The following chapters explain the meaning of those identifiers.
> - 
> - 
> - Function identifiers [XXX]
> - 
> - The functions are marked with [XXX] identifiers in the short
> - comment. The identifiers explain the usage and scope of the
> - functions. Following identifiers are used:
> - 
> - 
> - 
> - [MTD Interface]
> - These functions provide the interface to the MTD kernel API. 
> - They are not replaceable and provide functionality
> - which is complete hardware independent.
> - 
> - 
> - [NAND Interface]
> - These functions are exported and provide the interface to the 
> NAND kernel API. 
> - 
> - 
> - [GENERIC]
> - Generic functions are not replaceable and provide functionality
> - which is complete hardware independent.
> - 
> - 
> - [DEFAULT]
> - Default functions provide hardware related functionality which 
> is suitable
> - for most of the implementations. These functions can be 
> replaced by the
> - board driver if necessary. Those functions are called via 
> pointers in the
> - NAND chip description structure. The board driver can set the 
> functions which
> - should be replaced by board dependent functions before calling 
> nand_scan().
> - If the function pointer is NULL on entry to nand_scan() then 
> the pointer
> - is set to the default function which is suitable for the 
> detected chip type.
> - 
> - 
> - 
> - 
> - Struct member identifiers [XXX]
> - 
> 

Re: [PATCH v2 38/53] mtdnand.rst: group the "::" with previous line

2017-05-16 Thread Boris Brezillon
On Tue, 16 May 2017 09:16:30 -0300
Mauro Carvalho Chehab  wrote:

> Group the :: with the previous paragraph, in order to make it
> visually better when reading as a text file.
> 
> While here, replace:
>   ored (with means "Covered or adorned with ore or metal")
> by:
>   OR-ed
> 
> To reflect its true meaning.
> 
> Signed-off-by: Mauro Carvalho Chehab 

Acked-by: Boris Brezillon 

> ---
>  Documentation/driver-api/mtdnand.rst | 24 +++-
>  1 file changed, 7 insertions(+), 17 deletions(-)
> 
> diff --git a/Documentation/driver-api/mtdnand.rst 
> b/Documentation/driver-api/mtdnand.rst
> index 8723175f955e..7c19795ebb4a 100644
> --- a/Documentation/driver-api/mtdnand.rst
> +++ b/Documentation/driver-api/mtdnand.rst
> @@ -843,10 +843,8 @@ Chip option constants
>  Constants for chip id table
>  ~~~
>  
> -These constants are defined in nand.h. They are ored together to
> -describe the chip functionality.
> -
> -::
> +These constants are defined in nand.h. They are OR-ed together to
> +describe the chip functionality::
>  
>  /* Buswitdh is 16 bit */
>  #define NAND_BUSWIDTH_160x0002
> @@ -867,10 +865,8 @@ describe the chip functionality.
>  Constants for runtime options
>  ~
>  
> -These constants are defined in nand.h. They are ored together to
> -describe the functionality.
> -
> -::
> +These constants are defined in nand.h. They are OR-ed together to
> +describe the functionality::
>  
>  /* The hw ecc generator provides a syndrome instead a ecc value on read
>   * This can only work if we have the ecc bytes directly behind the
> @@ -881,9 +877,7 @@ describe the functionality.
>  ECC selection constants
>  ---
>  
> -Use these constants to select the ECC algorithm.
> -
> -::
> +Use these constants to select the ECC algorithm::
>  
>  /* No ECC. Usage is not recommended ! */
>  #define NAND_ECC_NONE   0
> @@ -903,9 +897,7 @@ Hardware control related constants
>  --
>  
>  These constants describe the requested hardware access function when the
> -boardspecific hardware control function is called
> -
> -::
> +boardspecific hardware control function is called::
>  
>  /* Select the chip by setting nCE to low */
>  #define NAND_CTL_SETNCE 1
> @@ -929,9 +921,7 @@ Bad block table related constants
>  -
>  
>  These constants describe the options used for bad block table
> -descriptors.
> -
> -::
> +descriptors::
>  
>  /* Options for the bad block table descriptors */
>  

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


Re: [PATCH v2 39/53] mtd: adjust kernel-docs to avoid Sphinx/kerneldoc warnings

2017-05-16 Thread Boris Brezillon
On Tue, 16 May 2017 09:16:31 -0300
Mauro Carvalho Chehab  wrote:

> ./drivers/mtd/nand/nand_bbt.c:1: warning: no structured comments found
> ./include/linux/mtd/nand.h:785: ERROR: Unexpected indentation.
> ./drivers/mtd/nand/nand_base.c:449: WARNING: Definition list ends without a 
> blank line; unexpected unindent.
> ./drivers/mtd/nand/nand_base.c:1161: ERROR: Unexpected indentation.
> ./drivers/mtd/nand/nand_base.c:1162: WARNING: Block quote ends without a 
> blank line; unexpected unindent.
> 
> Signed-off-by: Mauro Carvalho Chehab 

Acked-by: Boris Brezillon 

> ---
>  Documentation/driver-api/mtdnand.rst | 3 ---
>  drivers/mtd/nand/nand_base.c | 7 +--
>  include/linux/mtd/nand.h | 2 +-
>  3 files changed, 6 insertions(+), 6 deletions(-)
> 
> diff --git a/Documentation/driver-api/mtdnand.rst 
> b/Documentation/driver-api/mtdnand.rst
> index 7c19795ebb4a..e9afa586d15e 100644
> --- a/Documentation/driver-api/mtdnand.rst
> +++ b/Documentation/driver-api/mtdnand.rst
> @@ -970,9 +970,6 @@ hints" for an explanation.
>  .. kernel-doc:: drivers/mtd/nand/nand_base.c
> :export:
>  
> -.. kernel-doc:: drivers/mtd/nand/nand_bbt.c
> -   :export:
> -
>  .. kernel-doc:: drivers/mtd/nand/nand_ecc.c
> :export:
>  
> diff --git a/drivers/mtd/nand/nand_base.c b/drivers/mtd/nand/nand_base.c
> index b0524f8accb6..c8988c01e0d7 100644
> --- a/drivers/mtd/nand/nand_base.c
> +++ b/drivers/mtd/nand/nand_base.c
> @@ -442,10 +442,12 @@ static int nand_default_block_markbad(struct mtd_info 
> *mtd, loff_t ofs)
>   * specify how to write bad block markers to OOB (chip->block_markbad).
>   *
>   * We try operations in the following order:
> + *
>   *  (1) erase the affected block, to allow OOB marker to be written cleanly
>   *  (2) write bad block marker to OOB area of affected block (unless flag
>   *  NAND_BBT_NO_OOB_BBM is present)
>   *  (3) update the BBT
> + *
>   * Note that we retain the first error encountered in (2) or (3), finish the
>   * procedures, and dump the error in the end.
>  */
> @@ -1155,9 +1157,10 @@ int nand_reset(struct nand_chip *chip, int chipnr)
>   * @mtd: mtd info
>   * @ofs: offset to start unlock from
>   * @len: length to unlock
> - * @invert: when = 0, unlock the range of blocks within the lower and
> + * @invert:
> + *- when = 0, unlock the range of blocks within the lower and
>   *upper boundary address
> - *  when = 1, unlock the range of blocks outside the boundaries
> + *- when = 1, unlock the range of blocks outside the boundaries
>   *of the lower and upper boundary address
>   *
>   * Returs unlock status.
> diff --git a/include/linux/mtd/nand.h b/include/linux/mtd/nand.h
> index 9591e0fbe5bd..3d5b20379ba3 100644
> --- a/include/linux/mtd/nand.h
> +++ b/include/linux/mtd/nand.h
> @@ -779,7 +779,7 @@ nand_get_sdr_timings(const struct nand_data_interface 
> *conf)
>   *   Minimum amount of bit errors per @ecc_step_ds guaranteed
>   *   to be correctable. If unknown, set to zero.
>   * @ecc_step_ds: [INTERN] ECC step required by the @ecc_strength_ds,
> - *  also from the datasheet. It is the recommended ECC 
> step
> + *   also from the datasheet. It is the recommended ECC step
>   *   size, if known; if unknown, set to zero.
>   * @onfi_timing_mode_default: [INTERN] default ONFI timing mode. This field 
> is
>   * set to the actually used ONFI mode if the chip is

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


Re: [PATCH] mm: per-cgroup memory reclaim stats

2017-05-16 Thread Roman Gushchin
Hi Michal!

On Tue, May 16, 2017 at 11:29:56AM +0200, Michal Hocko wrote:
> On Thu 11-05-17 20:16:23, Roman Gushchin wrote:
> > Track the following reclaim counters for every memory cgroup:
> > PGREFILL, PGSCAN, PGSTEAL, PGACTIVATE, PGDEACTIVATE, PGLAZYFREE and
> > PGLAZYFREED.
> 
> yes, those are definitely useful. I have an old patch to add them as
> well but never managed to clean it up and post...
> 
> > These values are exposed using the memory.stats interface of cgroup v2.
> 
> Is there any reason to not add them to v1?

Not really, I'm just not sure, if it worth it to change v1 interface here.
If you want, I can add them.

> This should be rather trivial after recent changes from Johannes.

If you're about memcg1_events[]/memcg1_event_names[], they can't be reused,
because the pgscan and pgsteal values are both sums of direct and kswapd values:
e.g. events[PGSTEAL_KSWAPD] + events[PGSTEAL_DIRECT].

> 
> > The meaning of each value is the same as for global counters,
> > available using /proc/vmstat.
> > 
> > Also, for consistency, rename mem_cgroup_count_vm_event() to
> > count_memcg_event_mm().
> > 
> > Signed-off-by: Roman Gushchin 
> > Suggested-by: Johannes Weiner 
> > Cc: Johannes Weiner 
> > Cc: Tejun Heo 
> > Cc: Li Zefan 
> > Cc: Michal Hocko 
> > Cc: Vladimir Davydov 
> > Cc: cgro...@vger.kernel.org
> > Cc: linux-doc@vger.kernel.org
> > Cc: linux-ker...@vger.kernel.org
> > Cc: linux...@kvack.org
> 
> the patch itself looks good to me. I will have to double check it after
> I am done with what I am doing currently and then will add my Acked-by

Thank you!
--
To unsubscribe from this list: send the line "unsubscribe linux-doc" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH v5 19/32] x86/mm: Add support to access persistent memory in the clear

2017-05-16 Thread Borislav Petkov
On Tue, Apr 18, 2017 at 04:19:42PM -0500, Tom Lendacky wrote:
> Persistent memory is expected to persist across reboots. The encryption
> key used by SME will change across reboots which will result in corrupted
> persistent memory.  Persistent memory is handed out by block devices
> through memory remapping functions, so be sure not to map this memory as
> encrypted.
> 
> Signed-off-by: Tom Lendacky 
> ---
>  arch/x86/mm/ioremap.c |   31 ++-
>  1 file changed, 30 insertions(+), 1 deletion(-)
> 
> diff --git a/arch/x86/mm/ioremap.c b/arch/x86/mm/ioremap.c
> index bce0604..55317ba 100644
> --- a/arch/x86/mm/ioremap.c
> +++ b/arch/x86/mm/ioremap.c
> @@ -425,17 +425,46 @@ void unxlate_dev_mem_ptr(phys_addr_t phys, void *addr)
>   * Examine the physical address to determine if it is an area of memory
>   * that should be mapped decrypted.  If the memory is not part of the
>   * kernel usable area it was accessed and created decrypted, so these
> - * areas should be mapped decrypted.
> + * areas should be mapped decrypted. And since the encryption key can
> + * change across reboots, persistent memory should also be mapped
> + * decrypted.
>   */
>  static bool memremap_should_map_decrypted(resource_size_t phys_addr,
> unsigned long size)
>  {
> + int is_pmem;
> +
> + /*
> +  * Check if the address is part of a persistent memory region.
> +  * This check covers areas added by E820, EFI and ACPI.
> +  */
> + is_pmem = region_intersects(phys_addr, size, IORESOURCE_MEM,
> + IORES_DESC_PERSISTENT_MEMORY);
> + if (is_pmem != REGION_DISJOINT)
> + return true;
> +
> + /*
> +  * Check if the non-volatile attribute is set for an EFI
> +  * reserved area.
> +  */
> + if (efi_enabled(EFI_BOOT)) {
> + switch (efi_mem_type(phys_addr)) {
> + case EFI_RESERVED_TYPE:
> + if (efi_mem_attributes(phys_addr) & EFI_MEMORY_NV)
> + return true;
> + break;
> + default:
> + break;
> + }
> + }
> +
>   /* Check if the address is outside kernel usable area */
>   switch (e820__get_entry_type(phys_addr, phys_addr + size - 1)) {
>   case E820_TYPE_RESERVED:
>   case E820_TYPE_ACPI:
>   case E820_TYPE_NVS:
>   case E820_TYPE_UNUSABLE:
> + case E820_TYPE_PRAM:

Can't you simply add:

case E820_TYPE_PMEM:

here too and thus get rid of the region_intersects() thing above?

Because, for example, e820_type_to_iores_desc() maps E820_TYPE_PMEM to
IORES_DESC_PERSISTENT_MEMORY so those should be equivalent...

-- 
Regards/Gruss,
Boris.

Good mailing practices for 400: avoid top-posting and trim the reply.
--
To unsubscribe from this list: send the line "unsubscribe linux-doc" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH v5 22/32] x86, swiotlb: DMA support for memory encryption

2017-05-16 Thread Borislav Petkov
On Tue, Apr 18, 2017 at 04:20:10PM -0500, Tom Lendacky wrote:
> Since DMA addresses will effectively look like 48-bit addresses when the
> memory encryption mask is set, SWIOTLB is needed if the DMA mask of the
> device performing the DMA does not support 48-bits. SWIOTLB will be
> initialized to create decrypted bounce buffers for use by these devices.

Use a verb in the subject:

Subject: x86, swiotlb: Add memory encryption support

or similar.

-- 
Regards/Gruss,
Boris.

Good mailing practices for 400: avoid top-posting and trim the reply.
--
To unsubscribe from this list: send the line "unsubscribe linux-doc" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH v5 23/32] swiotlb: Add warnings for use of bounce buffers with SME

2017-05-16 Thread Borislav Petkov
On Tue, Apr 18, 2017 at 04:20:19PM -0500, Tom Lendacky wrote:
> Add warnings to let the user know when bounce buffers are being used for
> DMA when SME is active.  Since the bounce buffers are not in encrypted
> memory, these notifications are to allow the user to determine some
> appropriate action - if necessary.
> 
> Signed-off-by: Tom Lendacky 
> ---
>  arch/x86/include/asm/mem_encrypt.h |   11 +++
>  include/linux/dma-mapping.h|   11 +++
>  include/linux/mem_encrypt.h|6 ++
>  lib/swiotlb.c  |3 +++
>  4 files changed, 31 insertions(+)
> 
> diff --git a/arch/x86/include/asm/mem_encrypt.h 
> b/arch/x86/include/asm/mem_encrypt.h
> index 0637b4b..b406df2 100644
> --- a/arch/x86/include/asm/mem_encrypt.h
> +++ b/arch/x86/include/asm/mem_encrypt.h
> @@ -26,6 +26,11 @@ static inline bool sme_active(void)
>   return !!sme_me_mask;
>  }
>  
> +static inline u64 sme_dma_mask(void)
> +{
> + return ((u64)sme_me_mask << 1) - 1;
> +}
> +
>  void __init sme_early_encrypt(resource_size_t paddr,
> unsigned long size);
>  void __init sme_early_decrypt(resource_size_t paddr,
> @@ -50,6 +55,12 @@ static inline bool sme_active(void)
>  {
>   return false;
>  }
> +
> +static inline u64 sme_dma_mask(void)
> +{
> + return 0ULL;
> +}
> +
>  #endif
>  
>  static inline void __init sme_early_encrypt(resource_size_t paddr,
> diff --git a/include/linux/dma-mapping.h b/include/linux/dma-mapping.h
> index 0977317..f825870 100644
> --- a/include/linux/dma-mapping.h
> +++ b/include/linux/dma-mapping.h
> @@ -10,6 +10,7 @@
>  #include 
>  #include 
>  #include 
> +#include 
>  
>  /**
>   * List of possible attributes associated with a DMA mapping. The semantics
> @@ -577,6 +578,11 @@ static inline int dma_set_mask(struct device *dev, u64 
> mask)
>  
>   if (!dev->dma_mask || !dma_supported(dev, mask))
>   return -EIO;
> +
> + if (sme_active() && (mask < sme_dma_mask()))
> + dev_warn_ratelimited(dev,
> +  "SME is active, device will require DMA 
> bounce buffers\n");

Bah, no need to break that line - just let it stick out. Ditto for the
others.

-- 
Regards/Gruss,
Boris.

Good mailing practices for 400: avoid top-posting and trim the reply.
--
To unsubscribe from this list: send the line "unsubscribe linux-doc" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH v2 04/53] mutex, futex: adjust kernel-doc markups to generate ReST

2017-05-16 Thread Darren Hart
On Tue, May 16, 2017 at 09:15:56AM -0300, Mauro Carvalho Chehab wrote:
> There are a few issues on some kernel-doc markups that was
> causing troubles with kernel-doc output on ReST format:
> 
> ./kernel/futex.c:492: WARNING: Inline emphasis start-string without 
> end-string.
> ./kernel/futex.c:1264: WARNING: Block quote ends without a blank line; 
> unexpected unindent.
> ./kernel/futex.c:1721: WARNING: Block quote ends without a blank line; 
> unexpected unindent.
> ./kernel/futex.c:2338: WARNING: Block quote ends without a blank line; 
> unexpected unindent.
> ./kernel/futex.c:2426: WARNING: Block quote ends without a blank line; 
> unexpected unindent.
> ./kernel/futex.c:2899: WARNING: Block quote ends without a blank line; 
> unexpected unindent.
> ./kernel/futex.c:2972: WARNING: Block quote ends without a blank line; 
> unexpected unindent.
> 
> Fix them.
> 
> No functional changes.
> 
> Acked-by: Darren Hart (VMware) 
> Signed-off-by: Mauro Carvalho Chehab 
> ---


What was the difference from v1? Quick scan didn't reveal anything obvious to
me... (context left intact in case you want to point it out inline), but just a
"Changes since v1" below the --- is always appreciated - even it it's "no
changes, new commit log".


>  include/linux/mutex.h  |  6 +++---
>  kernel/futex.c | 40 
>  kernel/locking/mutex.c |  6 +++---
>  3 files changed, 26 insertions(+), 26 deletions(-)
> 
> diff --git a/include/linux/mutex.h b/include/linux/mutex.h
> index 1127fe31645d..ffcba1f337da 100644
> --- a/include/linux/mutex.h
> +++ b/include/linux/mutex.h
> @@ -214,9 +214,9 @@ enum mutex_trylock_recursive_enum {
>   * raisins, and once those are gone this will be removed.
>   *
>   * Returns:
> - *  MUTEX_TRYLOCK_FAILED- trylock failed,
> - *  MUTEX_TRYLOCK_SUCCESS   - lock acquired,
> - *  MUTEX_TRYLOCK_RECURSIVE - we already owned the lock.
> + *  - MUTEX_TRYLOCK_FAILED- trylock failed,
> + *  - MUTEX_TRYLOCK_SUCCESS   - lock acquired,
> + *  - MUTEX_TRYLOCK_RECURSIVE - we already owned the lock.
>   */
>  static inline /* __deprecated */ __must_check enum 
> mutex_trylock_recursive_enum
>  mutex_trylock_recursive(struct mutex *lock)
> diff --git a/kernel/futex.c b/kernel/futex.c
> index 357348a6cf6b..b8ae87d227da 100644
> --- a/kernel/futex.c
> +++ b/kernel/futex.c
> @@ -488,7 +488,7 @@ static void drop_futex_key_refs(union futex_key *key)
>   *
>   * Return: a negative error code or 0
>   *
> - * The key words are stored in *key on success.
> + * The key words are stored in @key on success.
>   *
>   * For shared mappings, it's (page->index, file_inode(vma->vm_file),
>   * offset_within_page).  For private mappings, it's (uaddr, current->mm).
> @@ -1259,9 +1259,9 @@ static int lock_pi_update_atomic(u32 __user *uaddr, u32 
> uval, u32 newval)
>   * @set_waiters: force setting the FUTEX_WAITERS bit (1) or not (0)
>   *
>   * Return:
> - *  0 - ready to wait;
> - *  1 - acquired the lock;
> - * <0 - error
> + *  -  0 - ready to wait;
> + *  -  1 - acquired the lock;
> + *  - <0 - error
>   *
>   * The hb->lock and futex_key refs shall be held by the caller.
>   */
> @@ -1717,9 +1717,9 @@ void requeue_pi_wake_futex(struct futex_q *q, union 
> futex_key *key,
>   * hb1 and hb2 must be held by the caller.
>   *
>   * Return:
> - *  0 - failed to acquire the lock atomically;
> - * >0 - acquired the lock, return value is vpid of the top_waiter
> - * <0 - error
> + *  -  0 - failed to acquire the lock atomically;
> + *  - >0 - acquired the lock, return value is vpid of the top_waiter
> + *  - <0 - error
>   */
>  static int futex_proxy_trylock_atomic(u32 __user *pifutex,
>struct futex_hash_bucket *hb1,
> @@ -1785,8 +1785,8 @@ static int futex_proxy_trylock_atomic(u32 __user 
> *pifutex,
>   * uaddr2 atomically on behalf of the top waiter.
>   *
>   * Return:
> - * >=0 - on success, the number of tasks requeued or woken;
> - *  <0 - on error
> + *  - >=0 - on success, the number of tasks requeued or woken;
> + *  -  <0 - on error
>   */
>  static int futex_requeue(u32 __user *uaddr1, unsigned int flags,
>u32 __user *uaddr2, int nr_wake, int nr_requeue,
> @@ -2142,8 +2142,8 @@ static inline void queue_me(struct futex_q *q, struct 
> futex_hash_bucket *hb)
>   * be paired with exactly one earlier call to queue_me().
>   *
>   * Return:
> - *   1 - if the futex_q was still queued (and we removed unqueued it);
> - *   0 - if the futex_q was already removed by the waking thread
> + *  - 1 - if the futex_q was still queued (and we removed unqueued it);
> + *  - 0 - if the futex_q was already removed by the waking thread
>   */
>  static int unqueue_me(struct futex_q *q)
>  {
> @@ -2333,9 +2333,9 @@ static long futex_wait_restart(struct restart_block 
> *restart);
>   * acquire the lock. Must be called with the hb lock held.
>   *
>   * Return:
> - *  1 - success, lock taken;
> - *  0 - success, lock not taken;
> - * <

Re: [PATCH v5 26/32] x86, drm, fbdev: Do not specify encrypted memory for video mappings

2017-05-16 Thread Borislav Petkov
On Tue, Apr 18, 2017 at 04:20:56PM -0500, Tom Lendacky wrote:
> Since video memory needs to be accessed decrypted, be sure that the
> memory encryption mask is not set for the video ranges.
> 
> Signed-off-by: Tom Lendacky 
> ---
>  arch/x86/include/asm/vga.h   |   13 +
>  arch/x86/mm/pageattr.c   |2 ++
>  drivers/gpu/drm/drm_gem.c|2 ++
>  drivers/gpu/drm/drm_vm.c |4 
>  drivers/gpu/drm/ttm/ttm_bo_vm.c  |7 +--
>  drivers/gpu/drm/udl/udl_fb.c |4 
>  drivers/video/fbdev/core/fbmem.c |   12 
>  7 files changed, 42 insertions(+), 2 deletions(-)
> 
> diff --git a/arch/x86/include/asm/vga.h b/arch/x86/include/asm/vga.h
> index c4b9dc2..5c7567a 100644
> --- a/arch/x86/include/asm/vga.h
> +++ b/arch/x86/include/asm/vga.h
> @@ -7,12 +7,25 @@
>  #ifndef _ASM_X86_VGA_H
>  #define _ASM_X86_VGA_H
>  
> +#include 
> +
>  /*
>   *   On the PC, we can just recalculate addresses and then
>   *   access the videoram directly without any black magic.
> + *   To support memory encryption however, we need to access
> + *   the videoram as decrypted memory.
>   */
>  
> +#ifdef CONFIG_AMD_MEM_ENCRYPT
> +#define VGA_MAP_MEM(x, s)\
> +({   \
> + unsigned long start = (unsigned long)phys_to_virt(x);   \
> + set_memory_decrypted(start, (s) >> PAGE_SHIFT); \
> + start;  \
> +})
> +#else
>  #define VGA_MAP_MEM(x, s) (unsigned long)phys_to_virt(x)
> +#endif

Can we push the check in and save us the ifdeffery?

#define VGA_MAP_MEM(x, s)   \
({  \
unsigned long start = (unsigned long)phys_to_virt(x);   \
\
if (IS_ENABLED(CONFIG_AMD_MEM_ENCRYPT)) \
set_memory_decrypted(start, (s) >> PAGE_SHIFT); \
\
start;  \
})

It does build here. :)

-- 
Regards/Gruss,
Boris.

Good mailing practices for 400: avoid top-posting and trim the reply.
--
To unsubscribe from this list: send the line "unsubscribe linux-doc" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [RFC 04/10] kmod: provide wrappers for kmod_concurrent inc/dec

2017-05-16 Thread Luis R. Rodriguez
On Wed, Jan 11, 2017 at 09:08:57PM +0100, Luis R. Rodriguez wrote:
> On Tue, Jan 10, 2017 at 07:57:10PM +0100, Luis R. Rodriguez wrote:
> > On Fri, Dec 16, 2016 at 09:05:00AM +0100, Luis R. Rodriguez wrote:
> > > On Thu, Dec 15, 2016 at 01:46:25PM +0100, Petr Mladek wrote:
> > > > On Thu 2016-12-08 22:08:59, Luis R. Rodriguez wrote:
> > > > > On Thu, Dec 08, 2016 at 12:29:42PM -0800, Kees Cook wrote:
> > > > > > On Thu, Dec 8, 2016 at 11:48 AM, Luis R. Rodriguez 
> > > > > >  wrote:
> > > > > > > +   if (atomic_read(&kmod_concurrent) < max_modprobes)
> > > > > > > +   return 0;
> > > > > > > +   atomic_dec(&kmod_concurrent);
> > > > > > > +   return -ENOMEM;
> > > > > > > +}
> > > > > > > +
> > > > > > > +static void kmod_umh_threads_put(void)
> > > > > > > +{
> > > > > > > +   atomic_dec(&kmod_concurrent);
> > > > > > > +}
> > > > > > 
> > > > > > Can you use a kref here instead? We're trying to kill raw use of
> > > > > > atomic_t for reference counting...
> > > > > 
> > > > > That's a much broader functional change than I was looking for, but I 
> > > > > am up for
> > > > > it. Can you describe the benefit of using kref you expect or why this 
> > > > > is an
> > > > > ongoing crusade? Since its a larger functional change how about doing 
> > > > > this
> > > > > change later, and we can test impact with the tress test driver. In 
> > > > > theory if
> > > > > there are benefits can't we add a test case to prove the gains?
> > > > 
> > > > Kees probably refers to the kref improvements that Peter Zijlstra
> > > > is working on, see
> > > > https://lkml.kernel.org/r/20161114174446.832175...@infradead.org
> > > > 
> > > > The advantage is that the new refcount API handles over and
> > > > underflow.
> > > > 
> > > > Another advantage is that it increments/decrements the value
> > > > only when it is safe. It uses cmpxchg to make sure that
> > > > the checks are valid.
> > > 
> > > Great thanks, will look into that.
> > 
> > OK I've done the conversion now, the only thing is linux-next as of today 
> > lacks
> > KREF_INIT() so I've open coded it for now. Once Peter's changes get merged 
> > the
> > only thing we'dneed is to change the open code line to KREF_INIT().
> > 
> > I'll annotate this as Suggested-by Kees and Petr, I did this as a separate 
> > atomic
> > step after this to make it easier for review.
> 
> Spoke too soon, kref_read() is not upstream yet either, so I can hold 
> conversion
> over until Peter's work is merged. Peter please Cc me on those patches if 
> possible
> :D

All the needed kref stuff is upstream now, however, kref is overkill for
kmod_concurrent given this is just a counter, it is not used to release
any object, and kref_put() requires such mechanism. The lightweight
refcount_t is much more appropriate here so will use that and respin
this series, finally.

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


[PATCH v2 50/53] fs: fix the location of the kernel-api book

2017-05-16 Thread Mauro Carvalho Chehab
The kernel-api book is now part of the core-api. Update its
location.

Signed-off-by: Mauro Carvalho Chehab 
---
 fs/debugfs/inode.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/fs/debugfs/inode.c b/fs/debugfs/inode.c
index e892ae7d89f8..77440e4aa9d4 100644
--- a/fs/debugfs/inode.c
+++ b/fs/debugfs/inode.c
@@ -9,7 +9,7 @@
  * 2 as published by the Free Software Foundation.
  *
  *  debugfs is for people to use instead of /proc or /sys.
- *  See Documentation/DocBook/kernel-api for more details.
+ *  See ./Documentation/core-api/kernel-api.rst for more details.
  *
  */
 
-- 
2.9.3

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


[PATCH v2 52/53] docs-rst: get rid of Documentation/sphinx/tmplcvt script

2017-05-16 Thread Mauro Carvalho Chehab
As everything was converted to ReST, we don't need this
script anymore.

Signed-off-by: Mauro Carvalho Chehab 
---
 Documentation/sphinx/tmplcvt | 28 
 1 file changed, 28 deletions(-)
 delete mode 100755 Documentation/sphinx/tmplcvt

diff --git a/Documentation/sphinx/tmplcvt b/Documentation/sphinx/tmplcvt
deleted file mode 100755
index 6848f0a26fa5..
--- a/Documentation/sphinx/tmplcvt
+++ /dev/null
@@ -1,28 +0,0 @@
-#!/bin/bash
-#
-# Convert a template file into something like RST
-#
-# fix 
-# feed to pandoc
-# fix \_
-# title line?
-#
-set -eu
-
-if [ "$#" != "2" ]; then
-   echo "$0  "
-   exit
-fi
-
-DIR=$(dirname $0)
-
-in=$1
-rst=$2
-tmp=$rst.tmp
-
-cp $in $tmp
-sed --in-place -f $DIR/convert_template.sed $tmp
-pandoc -s -S -f docbook -t rst -o $rst $tmp
-sed --in-place -f $DIR/post_convert.sed $rst
-rm $tmp
-echo "book writen to $rst"
-- 
2.9.3

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


[PATCH v2 51/53] usb: fix the comment with regards to DocBook

2017-05-16 Thread Mauro Carvalho Chehab
The USB gadget documentation is not at DocBook anymore.
The main file was converted to ReST, and stored at
Documentation/driver-api/usb/gadget.rst, but there are
still several plain text files related to gadget under
Documentation/usb.

So, be generic and just mention documentation
without specifying where it is.

Signed-off-by: Mauro Carvalho Chehab 
---
 drivers/usb/gadget/Kconfig | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/usb/gadget/Kconfig b/drivers/usb/gadget/Kconfig
index c164d6b788c3..b3c879b75a39 100644
--- a/drivers/usb/gadget/Kconfig
+++ b/drivers/usb/gadget/Kconfig
@@ -41,7 +41,7 @@ menuconfig USB_GADGET
   don't have this kind of hardware (except maybe inside Linux PDAs).
 
   For more information, see  and
-  the kernel DocBook documentation for this API.
+  the kernel documentation for this API.
 
 if USB_GADGET
 
-- 
2.9.3

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


[PATCH v2 53/53] kernel-doc: describe the ``literal`` syntax

2017-05-16 Thread Mauro Carvalho Chehab
changeset b97f193abf83 ("scripts/kernel-doc: fix parser
for apostrophes") added support for ``literal`` inside
kernel-doc, in order to allow using the "%" symbol inside
a literal block, as this is used at printk() description.

Document it.

Fixes: b97f193abf83 ("scripts/kernel-doc: fix parser for apostrophes")
Signed-off-by: Mauro Carvalho Chehab 
---
 Documentation/doc-guide/kernel-doc.rst | 10 ++
 1 file changed, 10 insertions(+)

diff --git a/Documentation/doc-guide/kernel-doc.rst 
b/Documentation/doc-guide/kernel-doc.rst
index b32e4813ff6f..b24854b5d6be 100644
--- a/Documentation/doc-guide/kernel-doc.rst
+++ b/Documentation/doc-guide/kernel-doc.rst
@@ -149,6 +149,16 @@ Domain`_ references.
 ``%CONST``
   Name of a constant. (No cross-referencing, just formatting.)
 
+literal
+  A literal block that should be handled as-is. The output will use a
+  ``monospaced font``.
+
+  Useful if you need to use special characters that would otherwise have some
+  meaning either by kernel-doc script of by reStructuredText.
+
+  This is particularly useful if you need to use things like ``%ph`` inside
+  a function description.
+
 ``$ENVVAR``
   Name of an environment variable. (No cross-referencing, just formatting.)
 
-- 
2.9.3

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


[PATCH 1/1] Documentation: networking: bonding.txt: /etc/modrobe.d/ path typo (modprobe.d)

2017-05-16 Thread Julien Fortin
From: Julien Fortin 

Signed-off-by: Julien Fortin 
---
 Documentation/networking/bonding.txt | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/Documentation/networking/bonding.txt 
b/Documentation/networking/bonding.txt
index 57f52cdce32e..9d6404100617 100644
--- a/Documentation/networking/bonding.txt
+++ b/Documentation/networking/bonding.txt
@@ -140,7 +140,7 @@ bonding module at load time, or are specified via sysfs.
 
Module options may be given as command line arguments to the
 insmod or modprobe command, but are usually specified in either the
-/etc/modrobe.d/*.conf configuration files, or in a distro-specific
+/etc/modprobe.d/*.conf configuration files, or in a distro-specific
 configuration file (some of which are detailed in the next section).
 
Details on bonding support for sysfs is provided in the
-- 
2.13.0

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


Re: [PATCH v2 04/53] mutex, futex: adjust kernel-doc markups to generate ReST

2017-05-16 Thread Mauro Carvalho Chehab
Em Tue, 16 May 2017 10:35:40 -0700
Darren Hart  escreveu:

> On Tue, May 16, 2017 at 09:15:56AM -0300, Mauro Carvalho Chehab wrote:
> > There are a few issues on some kernel-doc markups that was
> > causing troubles with kernel-doc output on ReST format:
> > 
> > ./kernel/futex.c:492: WARNING: Inline emphasis start-string without 
> > end-string.
> > ./kernel/futex.c:1264: WARNING: Block quote ends without a blank line; 
> > unexpected unindent.
> > ./kernel/futex.c:1721: WARNING: Block quote ends without a blank line; 
> > unexpected unindent.
> > ./kernel/futex.c:2338: WARNING: Block quote ends without a blank line; 
> > unexpected unindent.
> > ./kernel/futex.c:2426: WARNING: Block quote ends without a blank line; 
> > unexpected unindent.
> > ./kernel/futex.c:2899: WARNING: Block quote ends without a blank line; 
> > unexpected unindent.
> > ./kernel/futex.c:2972: WARNING: Block quote ends without a blank line; 
> > unexpected unindent.
> > 
> > Fix them.
> > 
> > No functional changes.
> > 
> > Acked-by: Darren Hart (VMware) 
> > Signed-off-by: Mauro Carvalho Chehab 
> > ---  
> 
> 
> What was the difference from v1? Quick scan didn't reveal anything obvious to
> me... (context left intact in case you want to point it out inline), but just 
> a
> "Changes since v1" below the --- is always appreciated - even it it's "no
> changes, new commit log".

>From v1, the .. note:: got removed. That's pretty much the same version
found on one of my replies + the addition of the warnings it produces
without the patch.

Regards,
Mauro

> 
> 
> >  include/linux/mutex.h  |  6 +++---
> >  kernel/futex.c | 40 
> >  kernel/locking/mutex.c |  6 +++---
> >  3 files changed, 26 insertions(+), 26 deletions(-)
> > 
> > diff --git a/include/linux/mutex.h b/include/linux/mutex.h
> > index 1127fe31645d..ffcba1f337da 100644
> > --- a/include/linux/mutex.h
> > +++ b/include/linux/mutex.h
> > @@ -214,9 +214,9 @@ enum mutex_trylock_recursive_enum {
> >   * raisins, and once those are gone this will be removed.
> >   *
> >   * Returns:
> > - *  MUTEX_TRYLOCK_FAILED- trylock failed,
> > - *  MUTEX_TRYLOCK_SUCCESS   - lock acquired,
> > - *  MUTEX_TRYLOCK_RECURSIVE - we already owned the lock.
> > + *  - MUTEX_TRYLOCK_FAILED- trylock failed,
> > + *  - MUTEX_TRYLOCK_SUCCESS   - lock acquired,
> > + *  - MUTEX_TRYLOCK_RECURSIVE - we already owned the lock.
> >   */
> >  static inline /* __deprecated */ __must_check enum 
> > mutex_trylock_recursive_enum
> >  mutex_trylock_recursive(struct mutex *lock)
> > diff --git a/kernel/futex.c b/kernel/futex.c
> > index 357348a6cf6b..b8ae87d227da 100644
> > --- a/kernel/futex.c
> > +++ b/kernel/futex.c
> > @@ -488,7 +488,7 @@ static void drop_futex_key_refs(union futex_key *key)
> >   *
> >   * Return: a negative error code or 0
> >   *
> > - * The key words are stored in *key on success.
> > + * The key words are stored in @key on success.
> >   *
> >   * For shared mappings, it's (page->index, file_inode(vma->vm_file),
> >   * offset_within_page).  For private mappings, it's (uaddr, current->mm).
> > @@ -1259,9 +1259,9 @@ static int lock_pi_update_atomic(u32 __user *uaddr, 
> > u32 uval, u32 newval)
> >   * @set_waiters:   force setting the FUTEX_WAITERS bit (1) or not (0)
> >   *
> >   * Return:
> > - *  0 - ready to wait;
> > - *  1 - acquired the lock;
> > - * <0 - error
> > + *  -  0 - ready to wait;
> > + *  -  1 - acquired the lock;
> > + *  - <0 - error
> >   *
> >   * The hb->lock and futex_key refs shall be held by the caller.
> >   */
> > @@ -1717,9 +1717,9 @@ void requeue_pi_wake_futex(struct futex_q *q, union 
> > futex_key *key,
> >   * hb1 and hb2 must be held by the caller.
> >   *
> >   * Return:
> > - *  0 - failed to acquire the lock atomically;
> > - * >0 - acquired the lock, return value is vpid of the top_waiter
> > - * <0 - error
> > + *  -  0 - failed to acquire the lock atomically;
> > + *  - >0 - acquired the lock, return value is vpid of the top_waiter
> > + *  - <0 - error
> >   */
> >  static int futex_proxy_trylock_atomic(u32 __user *pifutex,
> >  struct futex_hash_bucket *hb1,
> > @@ -1785,8 +1785,8 @@ static int futex_proxy_trylock_atomic(u32 __user 
> > *pifutex,
> >   * uaddr2 atomically on behalf of the top waiter.
> >   *
> >   * Return:
> > - * >=0 - on success, the number of tasks requeued or woken;
> > - *  <0 - on error
> > + *  - >=0 - on success, the number of tasks requeued or woken;
> > + *  -  <0 - on error
> >   */
> >  static int futex_requeue(u32 __user *uaddr1, unsigned int flags,
> >  u32 __user *uaddr2, int nr_wake, int nr_requeue,
> > @@ -2142,8 +2142,8 @@ static inline void queue_me(struct futex_q *q, struct 
> > futex_hash_bucket *hb)
> >   * be paired with exactly one earlier call to queue_me().
> >   *
> >   * Return:
> > - *   1 - if the futex_q was still queued (and we removed unqueued it);
> > - *   0 - if the futex_q was already remo

Re: [PATCH v2 04/53] mutex, futex: adjust kernel-doc markups to generate ReST

2017-05-16 Thread Darren Hart
On Tue, May 16, 2017 at 03:24:18PM -0300, Mauro Carvalho Chehab wrote:
> Em Tue, 16 May 2017 10:35:40 -0700
> Darren Hart  escreveu:
> 
> > On Tue, May 16, 2017 at 09:15:56AM -0300, Mauro Carvalho Chehab wrote:
> > > There are a few issues on some kernel-doc markups that was
> > > causing troubles with kernel-doc output on ReST format:
> > > 
> > > ./kernel/futex.c:492: WARNING: Inline emphasis start-string without 
> > > end-string.
> > > ./kernel/futex.c:1264: WARNING: Block quote ends without a blank line; 
> > > unexpected unindent.
> > > ./kernel/futex.c:1721: WARNING: Block quote ends without a blank line; 
> > > unexpected unindent.
> > > ./kernel/futex.c:2338: WARNING: Block quote ends without a blank line; 
> > > unexpected unindent.
> > > ./kernel/futex.c:2426: WARNING: Block quote ends without a blank line; 
> > > unexpected unindent.
> > > ./kernel/futex.c:2899: WARNING: Block quote ends without a blank line; 
> > > unexpected unindent.
> > > ./kernel/futex.c:2972: WARNING: Block quote ends without a blank line; 
> > > unexpected unindent.
> > > 
> > > Fix them.
> > > 
> > > No functional changes.
> > > 
> > > Acked-by: Darren Hart (VMware) 
> > > Signed-off-by: Mauro Carvalho Chehab 
> > > ---  
> > 
> > 
> > What was the difference from v1? Quick scan didn't reveal anything obvious 
> > to
> > me... (context left intact in case you want to point it out inline), but 
> > just a
> > "Changes since v1" below the --- is always appreciated - even it it's "no
> > changes, new commit log".
> 
> From v1, the .. note:: got removed. That's pretty much the same version
> found on one of my replies + the addition of the warnings it produces
> without the patch.

Thanks Mauro. This still seems reasonable to me.

-- 
Darren Hart
VMware Open Source Technology Center
--
To unsubscribe from this list: send the line "unsubscribe linux-doc" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH v2 15/53] docs-rst: add sound book to pdf output

2017-05-16 Thread Takashi Iwai
On Tue, 16 May 2017 14:16:07 +0200,
Mauro Carvalho Chehab wrote:
> 
> The sound subsystem book was added without the bits required to
> generate PDF output. Add them.
> 
> Signed-off-by: Mauro Carvalho Chehab 

Looks good to me.
  Reviewed-by: Takashi Iwai 


thanks,

Takashi

> ---
>  Documentation/conf.py   |  2 ++
>  Documentation/sound/conf.py | 10 ++
>  2 files changed, 12 insertions(+)
>  create mode 100644 Documentation/sound/conf.py
> 
> diff --git a/Documentation/conf.py b/Documentation/conf.py
> index 1d461f0c1cd0..bca751960dec 100644
> --- a/Documentation/conf.py
> +++ b/Documentation/conf.py
> @@ -371,6 +371,8 @@ latex_documents = [
>   'The kernel development community', 'manual'),
>  ('security/index', 'security.tex', 'The kernel security subsystem 
> manual',
>   'The kernel development community', 'manual'),
> +('sound/index', 'sound.tex', 'Linux Sound Subsystem Documentation',
> + 'The kernel development community', 'manual'),
>  ]
>  
>  # The name of an image file (relative to this directory) to place at the top 
> of
> diff --git a/Documentation/sound/conf.py b/Documentation/sound/conf.py
> new file mode 100644
> index ..3f1fc5e74e7b
> --- /dev/null
> +++ b/Documentation/sound/conf.py
> @@ -0,0 +1,10 @@
> +# -*- coding: utf-8; mode: python -*-
> +
> +project = "Linux Sound Subsystem Documentation"
> +
> +tags.add("subproject")
> +
> +latex_documents = [
> +('index', 'sound.tex', project,
> + 'The kernel development community', 'manual'),
> +]
> -- 
> 2.9.3
> 
> 
--
To unsubscribe from this list: send the line "unsubscribe linux-doc" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH v5 06/32] x86/mm: Add Secure Memory Encryption (SME) support

2017-05-16 Thread Tom Lendacky

On 5/4/2017 9:36 AM, Borislav Petkov wrote:

On Thu, May 04, 2017 at 09:24:11AM -0500, Tom Lendacky wrote:

I did this so that an the include order wouldn't cause issues (including
asm/mem_encrypt.h followed by later by a linux/mem_encrypt.h include).
I can make this a bit clearer by having separate #defines for each
thing, e.g.:

#ifndef sme_me_mask
#define sme_me_mask 0UL
#endif

#ifndef sme_active
#define sme_active sme_active
static inline ...
#endif

Is that better/clearer?


I guess but where do we have to include both the asm/ and the linux/
version?


It's more of the sequence of various includes.  For example,
init/do_mounts.c includes  that eventually gets down
to  and then .  However, a
bit further down  is included which eventually gets
down to  and then .



IOW, can we avoid these issues altogether by partitioning symbol
declarations differently among the headers?


It's most problematic when CONFIG_AMD_MEM_ENCRYPT is not defined since
we never include an asm/ version from the linux/ path.  I could create
a mem_encrypt.h in include/asm-generic/ that contains the info that
is in the !CONFIG_AMD_MEM_ENCRYPT path of the linux/ version. Let me
look into that.

Thanks,
Tom




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


Re: [PATCH v3 0/6] Add kselftest_harness.h

2017-05-16 Thread Mickaël Salaün

On 04/05/2017 15:58, Shuah Khan wrote:
> On 05/03/2017 04:26 PM, Mickaël Salaün wrote:
>> Hi,
>>
>> This third patch series make the seccomp/test_harness.h more generally
>> available [1] and update the kselftest documentation with the Sphinx format. 
>> It
>> also improve the Makefile of seccomp tests to take into account any
>> kselftest_harness.h update.
> 
> Thanks for the test harness as well as updating kselftest documentation
> to rst format. Awesome. I will merge these into linux-kselftest after
> the 4.12-rc1 comes out.
> 
> I will have to defer to Jon Corbet for Documentation related changes
> and patches. Jon! Could you please review and give me an Ack.

Jonathan, what do you think about this patches?

> 
>>
>> [1] 
>> https://lkml.kernel.org/r/CAGXu5j+8CVz8vL51DRYXqOY=xc3zuKFf=ptene88xyhzfyi...@mail.gmail.com
>>
>> Regards,
>>
>> Mickaël Salaün (6):
>>   selftests: Make test_harness.h more generally available
>>   selftests: Cosmetic renames in kselftest_harness.h
>>   selftests/seccomp: Force rebuild according to dependencies
>>   Documentation/dev-tools: Add kselftest
>>   Documentation/dev-tools: Use reStructuredText markups for kselftest
>>   Documentation/dev-tools: Add kselftest_harness documentation
>>
>>  Documentation/00-INDEX |   2 -
>>  Documentation/dev-tools/index.rst  |   1 +
>>  .../{kselftest.txt => dev-tools/kselftest.rst} | 125 +++---
>>  MAINTAINERS|   1 +
>>  .../test_harness.h => kselftest_harness.h} | 270 
>> +++--
>>  tools/testing/selftests/seccomp/Makefile   |   2 +
>>  tools/testing/selftests/seccomp/seccomp_bpf.c  |   2 +-
>>  7 files changed, 296 insertions(+), 107 deletions(-)
>>  rename Documentation/{kselftest.txt => dev-tools/kselftest.rst} (50%)
>>  rename tools/testing/selftests/{seccomp/test_harness.h => 
>> kselftest_harness.h} (80%)
>>
> 
> thanks,
> -- Shuah
> 



signature.asc
Description: OpenPGP digital signature


Re: [PATCH v3 0/6] Add kselftest_harness.h

2017-05-16 Thread Jonathan Corbet
On Tue, 16 May 2017 22:12:39 +0200
Mickaël Salaün  wrote:

> > I will have to defer to Jon Corbet for Documentation related changes
> > and patches. Jon! Could you please review and give me an Ack.  
> 
> Jonathan, what do you think about this patches?

Sorry, I missed that completely, looking now...

> Add metadata to kselftest_harness.h to be able to include the comments
> in the Sphinx documentation.
> 
> Changes since v2:
> * add reference to the full documentation in the header file (suggested
>   by Kees Cook)
> 
> Signed-off-by: Mickaël Salaün 
> Acked-by: Kees Cook 
> Cc: Andy Lutomirski 
> Cc: Jonathan Corbet 
> Cc: Shuah Khan 
> Cc: Will Drewry 
> ---
>  Documentation/dev-tools/kselftest.rst   |  58 +++
>  tools/testing/selftests/kselftest_harness.h | 259 
> 
>  2 files changed, 245 insertions(+), 72 deletions(-)
> 
> diff --git a/Documentation/dev-tools/kselftest.rst 
> b/Documentation/dev-tools/kselftest.rst
> index 9232ce94612c..92fc7cc3094b 100644
> --- a/Documentation/dev-tools/kselftest.rst
> +++ b/Documentation/dev-tools/kselftest.rst
> @@ -120,3 +120,61 @@ Contributing new tests (details)
> executable which is not tested by default.
> TEST_FILES, TEST_GEN_FILES mean it is the file which is used by
> test.
> +
> +Test Harness
> +
> +
> +The *kselftest_harness.h* file contains useful helpers to build tests. The
> +tests from *tools/testing/selftests/seccomp/seccomp_bpf.c* can be used as
> +examples.

Minor quibble: in the spirit of minimizing markup, I'd probably not mark up
the file names in this way.

> +
> +Example
> +---
> +
> +.. code-block:: c
> +
> +#include "../kselftest_harness.h"
> +
> +TEST(standalone_test) {
> +  do_some_stuff;
> +  EXPECT_GT(10, stuff) {
> + stuff_state_t state;
> + enumerate_stuff_state(&state);
> + TH_LOG("expectation failed with state: %s", state.msg);
> +  }
> +  more_stuff;
> +  ASSERT_NE(some_stuff, NULL) TH_LOG("how did it happen?!");
> +  last_stuff;
> +  EXPECT_EQ(0, last_stuff);
> +}
> +
> +FIXTURE(my_fixture) {
> +  mytype_t *data;
> +  int awesomeness_level;
> +};
> +FIXTURE_SETUP(my_fixture) {
> +  self->data = mytype_new();
> +  ASSERT_NE(NULL, self->data);
> +}
> +FIXTURE_TEARDOWN(my_fixture) {
> +  mytype_free(self->data);
> +}
> +TEST_F(my_fixture, data_is_good) {
> +  EXPECT_EQ(1, is_my_data_good(self->data));
> +}
> +
> +TEST_HARNESS_MAIN

So this was moved from the .h file.  That's fine if you want to do it that
way, but you could have also left it in place and included it with a :doc:
directive.  Up to you.

> +
> +Helpers
> +---
> +
> +.. kernel-doc:: tools/testing/selftests/kselftest_harness.h
> +:doc: helpers
> +
> +
> +Operators
> +-
> +
> +.. kernel-doc:: tools/testing/selftests/kselftest_harness.h
> +:doc: operators
> diff --git a/tools/testing/selftests/kselftest_harness.h 
> b/tools/testing/selftests/kselftest_harness.h
> index 8ba227db46aa..b55be9807af4 100644
> --- a/tools/testing/selftests/kselftest_harness.h
> +++ b/tools/testing/selftests/kselftest_harness.h
> @@ -4,37 +4,7 @@
>   *
>   * kselftest_harness.h: simple C unit test helper.
>   *
> - * Usage:
> - *   #include "../kselftest_harness.h"
> - *   TEST(standalone_test) {
> - * do_some_stuff;
> - * EXPECT_GT(10, stuff) {
> - *stuff_state_t state;
> - *enumerate_stuff_state(&state);
> - *TH_LOG("expectation failed with state: %s", state.msg);
> - * }
> - * more_stuff;
> - * ASSERT_NE(some_stuff, NULL) TH_LOG("how did it happen?!");
> - * last_stuff;
> - * EXPECT_EQ(0, last_stuff);
> - *   }
> - *
> - *   FIXTURE(my_fixture) {
> - * mytype_t *data;
> - * int awesomeness_level;
> - *   };
> - *   FIXTURE_SETUP(my_fixture) {
> - * self->data = mytype_new();
> - * ASSERT_NE(NULL, self->data);
> - *   }
> - *   FIXTURE_TEARDOWN(my_fixture) {
> - * mytype_free(self->data);
> - *   }
> - *   TEST_F(my_fixture, data_is_good) {
> - * EXPECT_EQ(1, is_my_data_good(self->data));
> - *   }
> - *
> - *   TEST_HARNESS_MAIN
> + * See documentation in Documentation/dev-tools/kselftest.rst
>   *
>   * API inspired by code.google.com/p/googletest
>   */
> @@ -58,7 +28,13 @@
>   * Exported APIs
>   */
>  
> -/* TEST(name) { implementation }
> +/**
> + * DOC: helpers
> + *
> + * .. code-block:: c
> + *
> + * TEST(name) { implementation }
> + *
>   * Defines a test by name.
>   * Names must be unique and tests must not be run in parallel.  The
>   * implementation containing block is a function and scoping should be 
> treated

It would be nicer to document these as actual functions, rather than using
DOC: blocks.  It gives you all the standard formatting, index entries,
cross-references, etc.  A normal kerneldoc header will work with a macro
like this.

I guess that's my most substantive comment.  If you really 

Re: [PATCH v4 2/3] hwmon: (adt7475) temperature smoothing

2017-05-16 Thread Chris Packham
On 16/05/17 20:23, kbuild test robot wrote:
> Hi Chris,
>
> [auto build test ERROR on hwmon/hwmon-next]
> [also build test ERROR on v4.12-rc1 next-20170516]
> [if your patch is applied to the wrong git tree, please drop us a note to 
> help improve the system]
>
> url:
> https://github.com/0day-ci/linux/commits/Chris-Packham/hwmon-adt7475-fan-stall-prevention/20170515-093530
> base:   
> https://git.kernel.org/pub/scm/linux/kernel/git/groeck/linux-staging.git 
> hwmon-next
> config: x86_64-rhel (attached as .config)
> compiler: gcc-6 (Debian 6.2.0-3) 6.2.0 20160901
> reproduce:
> # save the attached .config to linux build tree
> make ARCH=x86_64
>
> All errors (new ones prefixed by >>):
>
>drivers/hwmon/adt7475.c: In function 'set_temp_st':
>>> drivers/hwmon/adt7475.c:622:9: error: implicit declaration of function 
>>> 'find_closest_descending' [-Werror=implicit-function-declaration]
>   val = find_closest_descending(val, ad7475_st_map,
> ^~~
>cc1: some warnings being treated as errors
>
> vim +/find_closest_descending +622 drivers/hwmon/adt7475.c
>
>616shift = 4;
>617idx = 1;
>618break;
>619}
>620
>621if (val > 0) {
>  > 622val = find_closest_descending(val, 
> ad7475_st_map,
>623  
> ARRAY_SIZE(ad7475_st_map));
>624val |= 0x8;
>625}
>
> ---
> 0-DAY kernel test infrastructureOpen Source Technology Center
> https://lists.01.org/pipermail/kbuild-all   Intel Corporation
>

I'm not sure how this is failing. find_closest_descending() is a macro 
defined in linux/util_macros.h which is explicitly included in 
drivers/hwmon/adt7475.c. Aside from the include guards there's nothing 
conditional about it.
--
To unsubscribe from this list: send the line "unsubscribe linux-doc" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH v3 0/6] Add kselftest_harness.h

2017-05-16 Thread Mickaël Salaün


On 16/05/2017 22:29, Jonathan Corbet wrote:
> On Tue, 16 May 2017 22:12:39 +0200
> Mickaël Salaün  wrote:
> 
>>> I will have to defer to Jon Corbet for Documentation related changes
>>> and patches. Jon! Could you please review and give me an Ack.  
>>
>> Jonathan, what do you think about this patches?
> 
> Sorry, I missed that completely, looking now...
> 
>> Add metadata to kselftest_harness.h to be able to include the comments
>> in the Sphinx documentation.
>>
>> Changes since v2:
>> * add reference to the full documentation in the header file (suggested
>>   by Kees Cook)
>>
>> Signed-off-by: Mickaël Salaün 
>> Acked-by: Kees Cook 
>> Cc: Andy Lutomirski 
>> Cc: Jonathan Corbet 
>> Cc: Shuah Khan 
>> Cc: Will Drewry 
>> ---
>>  Documentation/dev-tools/kselftest.rst   |  58 +++
>>  tools/testing/selftests/kselftest_harness.h | 259 
>> 
>>  2 files changed, 245 insertions(+), 72 deletions(-)
>>
>> diff --git a/Documentation/dev-tools/kselftest.rst 
>> b/Documentation/dev-tools/kselftest.rst
>> index 9232ce94612c..92fc7cc3094b 100644
>> --- a/Documentation/dev-tools/kselftest.rst
>> +++ b/Documentation/dev-tools/kselftest.rst
>> @@ -120,3 +120,61 @@ Contributing new tests (details)
>> executable which is not tested by default.
>> TEST_FILES, TEST_GEN_FILES mean it is the file which is used by
>> test.
>> +
>> +Test Harness
>> +
>> +
>> +The *kselftest_harness.h* file contains useful helpers to build tests. The
>> +tests from *tools/testing/selftests/seccomp/seccomp_bpf.c* can be used as
>> +examples.
> 
> Minor quibble: in the spirit of minimizing markup, I'd probably not mark up
> the file names in this way.

OK

> 
>> +
>> +Example
>> +---
>> +
>> +.. code-block:: c
>> +
>> +#include "../kselftest_harness.h"
>> +
>> +TEST(standalone_test) {
>> +  do_some_stuff;
>> +  EXPECT_GT(10, stuff) {
>> + stuff_state_t state;
>> + enumerate_stuff_state(&state);
>> + TH_LOG("expectation failed with state: %s", state.msg);
>> +  }
>> +  more_stuff;
>> +  ASSERT_NE(some_stuff, NULL) TH_LOG("how did it happen?!");
>> +  last_stuff;
>> +  EXPECT_EQ(0, last_stuff);
>> +}
>> +
>> +FIXTURE(my_fixture) {
>> +  mytype_t *data;
>> +  int awesomeness_level;
>> +};
>> +FIXTURE_SETUP(my_fixture) {
>> +  self->data = mytype_new();
>> +  ASSERT_NE(NULL, self->data);
>> +}
>> +FIXTURE_TEARDOWN(my_fixture) {
>> +  mytype_free(self->data);
>> +}
>> +TEST_F(my_fixture, data_is_good) {
>> +  EXPECT_EQ(1, is_my_data_good(self->data));
>> +}
>> +
>> +TEST_HARNESS_MAIN
> 
> So this was moved from the .h file.  That's fine if you want to do it that
> way, but you could have also left it in place and included it with a :doc:
> directive.  Up to you.

Keeping it in the .h file means not benefiting from the C syntax
highlighting (even with ".. code-block:: c"). It looks like a bug, though.

> 
>> +
>> +Helpers
>> +---
>> +
>> +.. kernel-doc:: tools/testing/selftests/kselftest_harness.h
>> +:doc: helpers
>> +
>> +
>> +Operators
>> +-
>> +
>> +.. kernel-doc:: tools/testing/selftests/kselftest_harness.h
>> +:doc: operators
>> diff --git a/tools/testing/selftests/kselftest_harness.h 
>> b/tools/testing/selftests/kselftest_harness.h
>> index 8ba227db46aa..b55be9807af4 100644
>> --- a/tools/testing/selftests/kselftest_harness.h
>> +++ b/tools/testing/selftests/kselftest_harness.h
>> @@ -4,37 +4,7 @@
>>   *
>>   * kselftest_harness.h: simple C unit test helper.
>>   *
>> - * Usage:
>> - *   #include "../kselftest_harness.h"
>> - *   TEST(standalone_test) {
>> - * do_some_stuff;
>> - * EXPECT_GT(10, stuff) {
>> - *stuff_state_t state;
>> - *enumerate_stuff_state(&state);
>> - *TH_LOG("expectation failed with state: %s", state.msg);
>> - * }
>> - * more_stuff;
>> - * ASSERT_NE(some_stuff, NULL) TH_LOG("how did it happen?!");
>> - * last_stuff;
>> - * EXPECT_EQ(0, last_stuff);
>> - *   }
>> - *
>> - *   FIXTURE(my_fixture) {
>> - * mytype_t *data;
>> - * int awesomeness_level;
>> - *   };
>> - *   FIXTURE_SETUP(my_fixture) {
>> - * self->data = mytype_new();
>> - * ASSERT_NE(NULL, self->data);
>> - *   }
>> - *   FIXTURE_TEARDOWN(my_fixture) {
>> - * mytype_free(self->data);
>> - *   }
>> - *   TEST_F(my_fixture, data_is_good) {
>> - * EXPECT_EQ(1, is_my_data_good(self->data));
>> - *   }
>> - *
>> - *   TEST_HARNESS_MAIN
>> + * See documentation in Documentation/dev-tools/kselftest.rst
>>   *
>>   * API inspired by code.google.com/p/googletest
>>   */
>> @@ -58,7 +28,13 @@
>>   * Exported APIs
>>   */
>>  
>> -/* TEST(name) { implementation }
>> +/**
>> + * DOC: helpers
>> + *
>> + * .. code-block:: c
>> + *
>> + * TEST(name) { implementation }
>> + *
>>   * Defines a test by name.
>>   * Names must be unique and tests must not be run in parallel.  The
>>   * imple

Re: [PATCH v5 14/32] efi: Add an EFI table address match function

2017-05-16 Thread Tom Lendacky

On 5/15/2017 1:09 PM, Borislav Petkov wrote:

On Tue, Apr 18, 2017 at 04:18:48PM -0500, Tom Lendacky wrote:

Add a function that will determine if a supplied physical address matches
the address of an EFI table.

Signed-off-by: Tom Lendacky 
---
 drivers/firmware/efi/efi.c |   33 +
 include/linux/efi.h|7 +++
 2 files changed, 40 insertions(+)

diff --git a/drivers/firmware/efi/efi.c b/drivers/firmware/efi/efi.c
index b372aad..8f606a3 100644
--- a/drivers/firmware/efi/efi.c
+++ b/drivers/firmware/efi/efi.c
@@ -55,6 +55,25 @@ struct efi __read_mostly efi = {
 };
 EXPORT_SYMBOL(efi);

+static unsigned long *efi_tables[] = {
+   &efi.mps,
+   &efi.acpi,
+   &efi.acpi20,
+   &efi.smbios,
+   &efi.smbios3,
+   &efi.sal_systab,
+   &efi.boot_info,
+   &efi.hcdp,
+   &efi.uga,
+   &efi.uv_systab,
+   &efi.fw_vendor,
+   &efi.runtime,
+   &efi.config_table,
+   &efi.esrt,
+   &efi.properties_table,
+   &efi.mem_attr_table,
+};
+
 static bool disable_runtime;
 static int __init setup_noefi(char *arg)
 {
@@ -854,6 +873,20 @@ int efi_status_to_err(efi_status_t status)
return err;
 }

+bool efi_table_address_match(unsigned long phys_addr)


efi_is_table_address() reads easier/better in the code.


Will do.

Thanks,
Tom




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


Re: [PATCH v4 2/3] hwmon: (adt7475) temperature smoothing

2017-05-16 Thread Guenter Roeck
On Tue, May 16, 2017 at 08:30:52PM +, Chris Packham wrote:
> On 16/05/17 20:23, kbuild test robot wrote:
> > Hi Chris,
> >
> > [auto build test ERROR on hwmon/hwmon-next]
> > [also build test ERROR on v4.12-rc1 next-20170516]
> > [if your patch is applied to the wrong git tree, please drop us a note to 
> > help improve the system]
> >
> > url:
> > https://github.com/0day-ci/linux/commits/Chris-Packham/hwmon-adt7475-fan-stall-prevention/20170515-093530
> > base:   
> > https://git.kernel.org/pub/scm/linux/kernel/git/groeck/linux-staging.git 
> > hwmon-next
> > config: x86_64-rhel (attached as .config)
> > compiler: gcc-6 (Debian 6.2.0-3) 6.2.0 20160901
> > reproduce:
> > # save the attached .config to linux build tree
> > make ARCH=x86_64
> >
> > All errors (new ones prefixed by >>):
> >
> >drivers/hwmon/adt7475.c: In function 'set_temp_st':
> >>> drivers/hwmon/adt7475.c:622:9: error: implicit declaration of function 
> >>> 'find_closest_descending' [-Werror=implicit-function-declaration]
> >   val = find_closest_descending(val, ad7475_st_map,
> > ^~~
> >cc1: some warnings being treated as errors
> >
> > vim +/find_closest_descending +622 drivers/hwmon/adt7475.c
> >
> >616  shift = 4;
> >617  idx = 1;
> >618  break;
> >619  }
> >620  
> >621  if (val > 0) {
> >  > 622  val = find_closest_descending(val, 
> > ad7475_st_map,
> >623
> > ARRAY_SIZE(ad7475_st_map));
> >624  val |= 0x8;
> >625  }
> >
> > ---
> > 0-DAY kernel test infrastructureOpen Source Technology 
> > Center
> > https://lists.01.org/pipermail/kbuild-all   Intel 
> > Corporation
> >
> 
> I'm not sure how this is failing. find_closest_descending() is a macro 
> defined in linux/util_macros.h which is explicitly included in 
> drivers/hwmon/adt7475.c. Aside from the include guards there's nothing 
> conditional about it.

I suspect it was tested out of sequence, without the preceding patches,
and the header file include was missing.

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


Re: [PATCH] mm: per-cgroup memory reclaim stats

2017-05-16 Thread Balbir Singh
On Sat, May 13, 2017 at 2:42 AM, Johannes Weiner  wrote:
> On Fri, May 12, 2017 at 12:25:22PM +1000, Balbir Singh wrote:
>> On Thu, 2017-05-11 at 20:16 +0100, Roman Gushchin wrote:
>> > The meaning of each value is the same as for global counters,
>> > available using /proc/vmstat.
>> >
>> > Also, for consistency, rename mem_cgroup_count_vm_event() to
>> > count_memcg_event_mm().
>> >
>>
>> I still prefer the mem_cgroup_count_vm_event() name, or 
>> memcg_count_vm_event(),
>> the namespace upfront makes it easier to parse where to look for the the
>> implementation and also grep. In any case the rename should be independent
>> patch, but I don't like the name you've proposed.
>
> The memory controller is no longer a tacked-on feature to the VM - the
> entire reclaim path is designed around cgroups at this point. The
> namespacing is just cumbersome and doesn't add add any value, IMO.
>
> This name is also more consistent with the stats interface, where we
> use nodes, zones, memcgs all equally to describe scopes/containers:
>
> inc_node_state(), inc_zone_state(), inc_memcg_state()
>

I don't have a very strong opinion, but I find memcg_* easier to parse
than inc_memcg_*
If memcg is going to be present everywhere we may consider abstracting
them inside
the main routines

>> > @@ -357,6 +357,17 @@ static inline unsigned short mem_cgroup_id(struct 
>> > mem_cgroup *memcg)
>> >  }
>> >  struct mem_cgroup *mem_cgroup_from_id(unsigned short id);
>> >
>> > +static inline struct mem_cgroup *lruvec_memcg(struct lruvec *lruvec)
>>
>> mem_cgroup_from_lruvec()?
>
> This name is consistent with other lruvec accessors such as
> lruvec_pgdat() and lruvec_lru_size() etc.
>

lruvec_ being the namespace, the same comment as above.

>> > @@ -1741,11 +1748,16 @@ shrink_inactive_list(unsigned long nr_to_scan, 
>> > struct lruvec *lruvec,
>> >
>> > spin_lock_irq(&pgdat->lru_lock);
>> >
>> > -   if (global_reclaim(sc)) {
>> > -   if (current_is_kswapd())
>> > +   if (current_is_kswapd()) {
>> > +   if (global_reclaim(sc))
>> > __count_vm_events(PGSTEAL_KSWAPD, nr_reclaimed);
>> > -   else
>> > +   count_memcg_events(lruvec_memcg(lruvec), PGSTEAL_KSWAPD,
>> > +  nr_reclaimed);
>>
>> Has the else gone missing? What happens if it's global_reclaim(), do
>> we still account the count in memcg?
>>
>> > +   } else {
>> > +   if (global_reclaim(sc))
>> > __count_vm_events(PGSTEAL_DIRECT, nr_reclaimed);
>> > +   count_memcg_events(lruvec_memcg(lruvec), PGSTEAL_DIRECT,
>> > +  nr_reclaimed);
>>
>> It sounds like memcg accumlates both global and memcg reclaim driver
>> counts -- is this what we want?
>
> Yes.
>
> Consider a fully containerized system that is using only memory.low
> and thus exclusively global reclaim to enforce the partitioning, NOT
> artificial limits and limit reclaim. In this case, we still want to
> know how much reclaim activity each group is experiencing.

But its also confusing to see memcg.stat's value being greater
than the global value? At-least for me. For example PGSTEAL_DIRECT
inside a memcg > global value of PGSTEAL_DIRECT. Do we make
memcg.stat values sum of all impact on memcg or local to memcg?

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


Re: [PATCH 2/4] crypto: drbg wait for crypto op not signal safe

2017-05-16 Thread Eric Biggers
Hi Gilad,

On Thu, May 11, 2017 at 02:53:43PM +0300, Gilad Ben-Yossef wrote:
> drbg_kcapi_sym_ctr() was using wait_for_completion_interruptible() to
> wait for completion of async crypto op but if a signal occurs it
> may return before DMA ops of HW crypto provider finish, thus
> corrupting the output buffer.
> 
> Resolve this by using wait_for_completion() instead.
> 
> Reported-by: Eric Biggers 
> Signed-off-by: Gilad Ben-Yossef 
> CC: sta...@vger.kernel.org
> ---
>  crypto/drbg.c | 3 +--
>  1 file changed, 1 insertion(+), 2 deletions(-)
> 
> diff --git a/crypto/drbg.c b/crypto/drbg.c
> index fa749f4..fa9054d 100644
> --- a/crypto/drbg.c
> +++ b/crypto/drbg.c
> @@ -1767,8 +1767,7 @@ static int drbg_kcapi_sym_ctr(struct drbg_state *drbg,
>   break;
>   case -EINPROGRESS:
>   case -EBUSY:
> - ret = wait_for_completion_interruptible(
> - &drbg->ctr_completion);
> + ret = wait_for_completion(&drbg->ctr_completion);
>   if (!ret && !drbg->ctr_async_err) {
>   reinit_completion(&drbg->ctr_completion);
>   break;
> -- 

wait_for_completion() doesn't return a value.  This was fixed in the next patch,
but it should be done in this patch.

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


Re: [PATCH 4/4] crypto: Documentation: fix none signal safe sample

2017-05-16 Thread Eric Biggers
On Thu, May 11, 2017 at 02:53:45PM +0300, Gilad Ben-Yossef wrote:
> The sample code was showing use of wait_for_completion_interruptible()
> for waiting for an async. crypto op to finish. However, if a signal
> arrived it would free the buffers used even while crypto HW might
> still DMA from/into the buffers.
> 
> Resolve this by using wait_for_completion() instead.
> 
> Reported-by: Eric Biggers 
> Signed-off-by: Gilad Ben-Yossef 
> ---
>  Documentation/crypto/api-samples.rst | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/Documentation/crypto/api-samples.rst 
> b/Documentation/crypto/api-samples.rst
> index d021fd9..944f08b 100644
> --- a/Documentation/crypto/api-samples.rst
> +++ b/Documentation/crypto/api-samples.rst
> @@ -48,7 +48,7 @@ Code Example For Symmetric Key Cipher Operation
>  break;
>  case -EINPROGRESS:
>  case -EBUSY:
> -rc = wait_for_completion_interruptible(
> +rc = wait_for_completion(
>  &sk->result.completion);
>  if (!rc && !sk->result.err) {
>  reinit_completion(&sk->result.completion);
> -- 
> 2.1.4
> 

Same issue here: wait_for_completion() doesn't return a value.

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


Re: [kbuild-all] [PATCH v4 2/3] hwmon: (adt7475) temperature smoothing

2017-05-16 Thread Ye Xiaolong
On 05/16, Chris Packham wrote:
>On 16/05/17 20:23, kbuild test robot wrote:
>> Hi Chris,
>>
>> [auto build test ERROR on hwmon/hwmon-next]
>> [also build test ERROR on v4.12-rc1 next-20170516]
>> [if your patch is applied to the wrong git tree, please drop us a note to 
>> help improve the system]
>>
>> url:
>> https://github.com/0day-ci/linux/commits/Chris-Packham/hwmon-adt7475-fan-stall-prevention/20170515-093530
>> base:   
>> https://git.kernel.org/pub/scm/linux/kernel/git/groeck/linux-staging.git 
>> hwmon-next
>> config: x86_64-rhel (attached as .config)
>> compiler: gcc-6 (Debian 6.2.0-3) 6.2.0 20160901
>> reproduce:
>> # save the attached .config to linux build tree
>> make ARCH=x86_64
>>
>> All errors (new ones prefixed by >>):
>>
>>drivers/hwmon/adt7475.c: In function 'set_temp_st':
>>>> drivers/hwmon/adt7475.c:622:9: error: implicit declaration of function 
>>>> 'find_closest_descending' [-Werror=implicit-function-declaration]
>>   val = find_closest_descending(val, ad7475_st_map,
>> ^~~
>>cc1: some warnings being treated as errors
>>
>> vim +/find_closest_descending +622 drivers/hwmon/adt7475.c
>>
>>616   shift = 4;
>>617   idx = 1;
>>618   break;
>>619   }
>>620   
>>621   if (val > 0) {
>>  > 622   val = find_closest_descending(val, 
>> ad7475_st_map,
>>623 
>> ARRAY_SIZE(ad7475_st_map));
>>624   val |= 0x8;
>>625   }
>>
>> ---
>> 0-DAY kernel test infrastructureOpen Source Technology Center
>> https://lists.01.org/pipermail/kbuild-all   Intel Corporation
>>
>
>I'm not sure how this is failing. find_closest_descending() is a macro 
>defined in linux/util_macros.h which is explicitly included in 
>drivers/hwmon/adt7475.c. Aside from the include guards there's nothing 
>conditional about it.

Hi,

0day bot applied your patchset on top of commit 6eaaea1 ("hwmon: (pmbus) Add 
client driver for IR35221"),
is it wrong or you have some prerequisite patches?

Thanks,
Xiaolong
>___
>kbuild-all mailing list
>kbuild-...@lists.01.org
>https://lists.01.org/mailman/listinfo/kbuild-all
--
To unsubscribe from this list: send the line "unsubscribe linux-doc" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [kbuild-all] [PATCH v4 2/3] hwmon: (adt7475) temperature smoothing

2017-05-16 Thread Chris Packham
On 17/05/17 15:09, Ye Xiaolong wrote:
> On 05/16, Chris Packham wrote:
>> On 16/05/17 20:23, kbuild test robot wrote:
>>> Hi Chris,
>>>
>>> [auto build test ERROR on hwmon/hwmon-next]
>>> [also build test ERROR on v4.12-rc1 next-20170516]
>>> [if your patch is applied to the wrong git tree, please drop us a note to 
>>> help improve the system]
>>>
>>> url:
>>> https://github.com/0day-ci/linux/commits/Chris-Packham/hwmon-adt7475-fan-stall-prevention/20170515-093530
>>> base:   
>>> https://git.kernel.org/pub/scm/linux/kernel/git/groeck/linux-staging.git 
>>> hwmon-next
>>> config: x86_64-rhel (attached as .config)
>>> compiler: gcc-6 (Debian 6.2.0-3) 6.2.0 20160901
>>> reproduce:
>>> # save the attached .config to linux build tree
>>> make ARCH=x86_64
>>>
>>> All errors (new ones prefixed by >>):
>>>
>>>drivers/hwmon/adt7475.c: In function 'set_temp_st':
>>>>> drivers/hwmon/adt7475.c:622:9: error: implicit declaration of function 
>>>>> 'find_closest_descending' [-Werror=implicit-function-declaration]
>>>   val = find_closest_descending(val, ad7475_st_map,
>>> ^~~
>>>cc1: some warnings being treated as errors
>>>
>>> vim +/find_closest_descending +622 drivers/hwmon/adt7475.c
>>>
>>>616  shift = 4;
>>>617  idx = 1;
>>>618  break;
>>>619  }
>>>620  
>>>621  if (val > 0) {
>>>  > 622  val = find_closest_descending(val, 
>>> ad7475_st_map,
>>>623
>>> ARRAY_SIZE(ad7475_st_map));
>>>624  val |= 0x8;
>>>625  }
>>>
>>> ---
>>> 0-DAY kernel test infrastructureOpen Source Technology 
>>> Center
>>> https://lists.01.org/pipermail/kbuild-all   Intel 
>>> Corporation
>>>
>>
>> I'm not sure how this is failing. find_closest_descending() is a macro
>> defined in linux/util_macros.h which is explicitly included in
>> drivers/hwmon/adt7475.c. Aside from the include guards there's nothing
>> conditional about it.
>
> Hi,
>
> 0day bot applied your patchset on top of commit 6eaaea1 ("hwmon: (pmbus) Add 
> client driver for IR35221"),
> is it wrong or you have some prerequisite patches?
>

Looks like it's missing 
https://git.kernel.org/pub/scm/linux/kernel/git/groeck/linux-staging.git/commit/?h=hwmon-next&id=bbb4dd0ff
 
which was part of the series but was applied after v3 so I didn't send 
it out with v4.
--
To unsubscribe from this list: send the line "unsubscribe linux-doc" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [kbuild-all] [PATCH v4 2/3] hwmon: (adt7475) temperature smoothing

2017-05-16 Thread Ye Xiaolong
On 05/17, Chris Packham wrote:
>On 17/05/17 15:09, Ye Xiaolong wrote:
>> On 05/16, Chris Packham wrote:
>>> On 16/05/17 20:23, kbuild test robot wrote:
>>>> Hi Chris,
>>>>
>>>> [auto build test ERROR on hwmon/hwmon-next]
>>>> [also build test ERROR on v4.12-rc1 next-20170516]
>>>> [if your patch is applied to the wrong git tree, please drop us a note to 
>>>> help improve the system]
>>>>
>>>> url:
>>>> https://github.com/0day-ci/linux/commits/Chris-Packham/hwmon-adt7475-fan-stall-prevention/20170515-093530
>>>> base:   
>>>> https://git.kernel.org/pub/scm/linux/kernel/git/groeck/linux-staging.git 
>>>> hwmon-next
>>>> config: x86_64-rhel (attached as .config)
>>>> compiler: gcc-6 (Debian 6.2.0-3) 6.2.0 20160901
>>>> reproduce:
>>>> # save the attached .config to linux build tree
>>>> make ARCH=x86_64
>>>>
>>>> All errors (new ones prefixed by >>):
>>>>
>>>>drivers/hwmon/adt7475.c: In function 'set_temp_st':
>>>>>> drivers/hwmon/adt7475.c:622:9: error: implicit declaration of function 
>>>>>> 'find_closest_descending' [-Werror=implicit-function-declaration]
>>>>   val = find_closest_descending(val, ad7475_st_map,
>>>> ^~~
>>>>cc1: some warnings being treated as errors
>>>>
>>>> vim +/find_closest_descending +622 drivers/hwmon/adt7475.c
>>>>
>>>>616 shift = 4;
>>>>617 idx = 1;
>>>>618 break;
>>>>619 }
>>>>620 
>>>>621 if (val > 0) {
>>>>  > 622 val = find_closest_descending(val, 
>>>> ad7475_st_map,
>>>>623   
>>>> ARRAY_SIZE(ad7475_st_map));
>>>>624 val |= 0x8;
>>>>625 }
>>>>
>>>> ---
>>>> 0-DAY kernel test infrastructureOpen Source Technology 
>>>> Center
>>>> https://lists.01.org/pipermail/kbuild-all   Intel 
>>>> Corporation
>>>>
>>>
>>> I'm not sure how this is failing. find_closest_descending() is a macro
>>> defined in linux/util_macros.h which is explicitly included in
>>> drivers/hwmon/adt7475.c. Aside from the include guards there's nothing
>>> conditional about it.
>>
>> Hi,
>>
>> 0day bot applied your patchset on top of commit 6eaaea1 ("hwmon: (pmbus) Add 
>> client driver for IR35221"),
>> is it wrong or you have some prerequisite patches?

Thanks for the info, seems we need to improve the kbuild bot by pulling the
latest tree before applying new patches.

Thanks,
Xiaolong
>>
>
>Looks like it's missing 
>https://git.kernel.org/pub/scm/linux/kernel/git/groeck/linux-staging.git/commit/?h=hwmon-next&id=bbb4dd0ff
> 
>which was part of the series but was applied after v3 so I didn't send 
>it out with v4.
--
To unsubscribe from this list: send the line "unsubscribe linux-doc" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [kbuild-all] [PATCH v4 2/3] hwmon: (adt7475) temperature smoothing

2017-05-16 Thread Guenter Roeck

On 05/16/2017 09:39 PM, Ye Xiaolong wrote:

On 05/17, Chris Packham wrote:

On 17/05/17 15:09, Ye Xiaolong wrote:

On 05/16, Chris Packham wrote:

On 16/05/17 20:23, kbuild test robot wrote:

Hi Chris,

[auto build test ERROR on hwmon/hwmon-next]
[also build test ERROR on v4.12-rc1 next-20170516]
[if your patch is applied to the wrong git tree, please drop us a note to help 
improve the system]

url:
https://github.com/0day-ci/linux/commits/Chris-Packham/hwmon-adt7475-fan-stall-prevention/20170515-093530
base:   
https://git.kernel.org/pub/scm/linux/kernel/git/groeck/linux-staging.git 
hwmon-next
config: x86_64-rhel (attached as .config)
compiler: gcc-6 (Debian 6.2.0-3) 6.2.0 20160901
reproduce:
# save the attached .config to linux build tree
make ARCH=x86_64

All errors (new ones prefixed by >>):

   drivers/hwmon/adt7475.c: In function 'set_temp_st':

drivers/hwmon/adt7475.c:622:9: error: implicit declaration of function 
'find_closest_descending' [-Werror=implicit-function-declaration]

  val = find_closest_descending(val, ad7475_st_map,
^~~
   cc1: some warnings being treated as errors

vim +/find_closest_descending +622 drivers/hwmon/adt7475.c

   616  shift = 4;
   617  idx = 1;
   618  break;
   619  }
   620  
   621  if (val > 0) {
 > 622   val = find_closest_descending(val, ad7475_st_map,
   623
ARRAY_SIZE(ad7475_st_map));
   624  val |= 0x8;
   625  }

---
0-DAY kernel test infrastructureOpen Source Technology Center
https://lists.01.org/pipermail/kbuild-all   Intel Corporation



I'm not sure how this is failing. find_closest_descending() is a macro
defined in linux/util_macros.h which is explicitly included in
drivers/hwmon/adt7475.c. Aside from the include guards there's nothing
conditional about it.


Hi,

0day bot applied your patchset on top of commit 6eaaea1 ("hwmon: (pmbus) Add client 
driver for IR35221"),
is it wrong or you have some prerequisite patches?


Thanks for the info, seems we need to improve the kbuild bot by pulling the
latest tree before applying new patches.



No worries. I don't mind the occasional false positive. Better a false positive 
than a missed bug.

Guenter


Thanks,
Xiaolong




Looks like it's missing
https://git.kernel.org/pub/scm/linux/kernel/git/groeck/linux-staging.git/commit/?h=hwmon-next&id=bbb4dd0ff
which was part of the series but was applied after v3 so I didn't send
it out with v4.




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