* [PATCH v3 04/20] docs: kernellog.py: add support for info()
[not found] <cover.1563360659.git.mchehab+samsung@kernel.org>
@ 2019-07-17 11:05 ` Mauro Carvalho Chehab
2019-07-17 11:05 ` [PATCH v3 05/20] docs: kernel_abi.py: add a script to parse ABI documentation Mauro Carvalho Chehab
` (12 subsequent siblings)
13 siblings, 0 replies; 17+ messages in thread
From: Mauro Carvalho Chehab @ 2019-07-17 11:05 UTC (permalink / raw)
To: gregkh; +Cc: Mauro Carvalho Chehab, Jonathan Corbet, linux-doc
An extension may want to just inform about something. So, add
support for it.
Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
---
Documentation/sphinx/kernellog.py | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/Documentation/sphinx/kernellog.py b/Documentation/sphinx/kernellog.py
index af924f51a7dc..8ac7d274f542 100644
--- a/Documentation/sphinx/kernellog.py
+++ b/Documentation/sphinx/kernellog.py
@@ -25,4 +25,8 @@ def verbose(app, message):
else:
app.verbose(message)
-
+def info(app, message):
+ if UseLogging:
+ logger.info(message)
+ else:
+ app.info(message)
--
2.21.0
^ permalink raw reply related [flat|nested] 17+ messages in thread
* [PATCH v3 05/20] docs: kernel_abi.py: add a script to parse ABI documentation
[not found] <cover.1563360659.git.mchehab+samsung@kernel.org>
2019-07-17 11:05 ` [PATCH v3 04/20] docs: kernellog.py: add support for info() Mauro Carvalho Chehab
@ 2019-07-17 11:05 ` Mauro Carvalho Chehab
2019-07-17 11:05 ` [PATCH v3 06/20] docs: kernel_abi.py: fix UTF-8 support Mauro Carvalho Chehab
` (11 subsequent siblings)
13 siblings, 0 replies; 17+ messages in thread
From: Mauro Carvalho Chehab @ 2019-07-17 11:05 UTC (permalink / raw)
To: gregkh; +Cc: Mauro Carvalho Chehab, Jonathan Corbet, linux-doc
The ABI documentation is special: it is not plain text files,
but, instead, files with an strict format, as specified by
Documentation/ABI/README.
Add a parser for it.
Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
---
Documentation/sphinx/kernel_abi.py | 155 +++++++++++++++++++++++++++++
1 file changed, 155 insertions(+)
create mode 100644 Documentation/sphinx/kernel_abi.py
diff --git a/Documentation/sphinx/kernel_abi.py b/Documentation/sphinx/kernel_abi.py
new file mode 100644
index 000000000000..32ce90775d96
--- /dev/null
+++ b/Documentation/sphinx/kernel_abi.py
@@ -0,0 +1,155 @@
+# -*- coding: utf-8; mode: python -*-
+u"""
+ kernel-abi
+ ~~~~~~~~~~
+
+ Implementation of the ``kernel-abi`` reST-directive.
+
+ :copyright: Copyright (C) 2016 Markus Heiser
+ :copyright: Copyright (C) 2016 Mauro Carvalho Chehab
+ :license: GPL Version 2, June 1991 see Linux/COPYING for details.
+
+ The ``kernel-abi`` (:py:class:`KernelCmd`) directive calls the
+ scripts/get_abi.pl script to parse the Kernel ABI files.
+
+ Overview of directive's argument and options.
+
+ .. code-block:: rst
+
+ .. kernel-abi:: <ABI directory location>
+ :debug:
+
+ The argument ``<ABI directory location>`` is required. It contains the
+ location of the ABI files to be parsed.
+
+ ``debug``
+ Inserts a code-block with the *raw* reST. Sometimes it is helpful to see
+ what reST is generated.
+
+"""
+
+import sys
+import os
+from os import path
+import subprocess
+
+from sphinx.ext.autodoc import AutodocReporter
+
+from docutils import nodes
+from docutils.parsers.rst import Directive, directives
+from docutils.statemachine import ViewList
+from docutils.utils.error_reporting import ErrorString
+
+
+__version__ = '1.0'
+
+# We can't assume that six is installed
+PY3 = sys.version_info[0] == 3
+PY2 = sys.version_info[0] == 2
+if PY3:
+ # pylint: disable=C0103, W0622
+ unicode = str
+ basestring = str
+
+def setup(app):
+
+ app.add_directive("kernel-abi", KernelCmd)
+ return dict(
+ version = __version__
+ , parallel_read_safe = True
+ , parallel_write_safe = True
+ )
+
+class KernelCmd(Directive):
+
+ u"""KernelABI (``kernel-abi``) directive"""
+
+ required_arguments = 1
+ optional_arguments = 0
+ has_content = False
+ final_argument_whitespace = True
+
+ option_spec = {
+ "debug" : directives.flag
+ }
+
+ def warn(self, message, **replace):
+ replace["fname"] = self.state.document.current_source
+ replace["line_no"] = replace.get("line_no", self.lineno)
+ message = ("%(fname)s:%(line_no)s: [kernel-abi WARN] : " + message) % replace
+ self.state.document.settings.env.app.warn(message, prefix="")
+
+ def run(self):
+
+ doc = self.state.document
+ if not doc.settings.file_insertion_enabled:
+ raise self.warning("docutils: file insertion disabled")
+
+ env = doc.settings.env
+ cwd = path.dirname(doc.current_source)
+ cmd = "get_abi.pl rest --dir "
+ cmd += self.arguments[0]
+
+ srctree = path.abspath(os.environ["srctree"])
+
+ fname = cmd
+
+ # extend PATH with $(srctree)/scripts
+ path_env = os.pathsep.join([
+ srctree + os.sep + "scripts",
+ os.environ["PATH"]
+ ])
+ shell_env = os.environ.copy()
+ shell_env["PATH"] = path_env
+ shell_env["srctree"] = srctree
+
+ lines = self.runCmd(cmd, shell=True, cwd=cwd, env=shell_env)
+ nodeList = self.nestedParse(lines, fname)
+ return nodeList
+
+ def runCmd(self, cmd, **kwargs):
+ u"""Run command ``cmd`` and return it's stdout as unicode."""
+
+ try:
+ proc = subprocess.Popen(
+ cmd
+ , stdout = subprocess.PIPE
+ , stderr = subprocess.PIPE
+ , universal_newlines = True
+ , **kwargs
+ )
+ out, err = proc.communicate()
+ if err:
+ self.warn(err)
+ if proc.returncode != 0:
+ raise self.severe(
+ u"command '%s' failed with return code %d"
+ % (cmd, proc.returncode)
+ )
+ except OSError as exc:
+ raise self.severe(u"problems with '%s' directive: %s."
+ % (self.name, ErrorString(exc)))
+ return unicode(out)
+
+ def nestedParse(self, lines, fname):
+ content = ViewList()
+ node = nodes.section()
+
+ if "debug" in self.options:
+ code_block = "\n\n.. code-block:: rst\n :linenos:\n"
+ for l in lines.split("\n"):
+ code_block += "\n " + l
+ lines = code_block + "\n\n"
+
+ for c, l in enumerate(lines.split("\n")):
+ content.append(l, fname, c)
+
+ buf = self.state.memo.title_styles, self.state.memo.section_level, self.state.memo.reporter
+ self.state.memo.title_styles = []
+ self.state.memo.section_level = 0
+ self.state.memo.reporter = AutodocReporter(content, self.state.memo.reporter)
+ try:
+ self.state.nested_parse(content, 0, node, match_titles=1)
+ finally:
+ self.state.memo.title_styles, self.state.memo.section_level, self.state.memo.reporter = buf
+ return node.children
--
2.21.0
^ permalink raw reply related [flat|nested] 17+ messages in thread
* [PATCH v3 06/20] docs: kernel_abi.py: fix UTF-8 support
[not found] <cover.1563360659.git.mchehab+samsung@kernel.org>
2019-07-17 11:05 ` [PATCH v3 04/20] docs: kernellog.py: add support for info() Mauro Carvalho Chehab
2019-07-17 11:05 ` [PATCH v3 05/20] docs: kernel_abi.py: add a script to parse ABI documentation Mauro Carvalho Chehab
@ 2019-07-17 11:05 ` Mauro Carvalho Chehab
2019-07-17 11:44 ` Markus Heiser
2019-07-17 11:05 ` [PATCH v3 07/20] docs: kernel_abi.py: make it compatible with Sphinx 1.7+ Mauro Carvalho Chehab
` (10 subsequent siblings)
13 siblings, 1 reply; 17+ messages in thread
From: Mauro Carvalho Chehab @ 2019-07-17 11:05 UTC (permalink / raw)
To: gregkh; +Cc: Mauro Carvalho Chehab, Jonathan Corbet, linux-doc
The parser breaks with UTF-8 characters with Sphinx 1.4.
Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
---
Documentation/sphinx/kernel_abi.py | 20 +++++++-------------
1 file changed, 7 insertions(+), 13 deletions(-)
diff --git a/Documentation/sphinx/kernel_abi.py b/Documentation/sphinx/kernel_abi.py
index 32ce90775d96..0f3e51e67e8d 100644
--- a/Documentation/sphinx/kernel_abi.py
+++ b/Documentation/sphinx/kernel_abi.py
@@ -1,4 +1,5 @@
-# -*- coding: utf-8; mode: python -*-
+# coding=utf-8
+#
u"""
kernel-abi
~~~~~~~~~~
@@ -28,6 +29,7 @@ u"""
"""
+import codecs
import sys
import os
from os import path
@@ -43,14 +45,6 @@ from docutils.utils.error_reporting import ErrorString
__version__ = '1.0'
-# We can't assume that six is installed
-PY3 = sys.version_info[0] == 3
-PY2 = sys.version_info[0] == 2
-if PY3:
- # pylint: disable=C0103, W0622
- unicode = str
- basestring = str
-
def setup(app):
app.add_directive("kernel-abi", KernelCmd)
@@ -115,12 +109,12 @@ class KernelCmd(Directive):
cmd
, stdout = subprocess.PIPE
, stderr = subprocess.PIPE
- , universal_newlines = True
, **kwargs
)
out, err = proc.communicate()
- if err:
- self.warn(err)
+
+ out, err = codecs.decode(out, 'utf-8'), codecs.decode(err, 'utf-8')
+
if proc.returncode != 0:
raise self.severe(
u"command '%s' failed with return code %d"
@@ -129,7 +123,7 @@ class KernelCmd(Directive):
except OSError as exc:
raise self.severe(u"problems with '%s' directive: %s."
% (self.name, ErrorString(exc)))
- return unicode(out)
+ return out
def nestedParse(self, lines, fname):
content = ViewList()
--
2.21.0
^ permalink raw reply related [flat|nested] 17+ messages in thread
* [PATCH v3 07/20] docs: kernel_abi.py: make it compatible with Sphinx 1.7+
[not found] <cover.1563360659.git.mchehab+samsung@kernel.org>
` (2 preceding siblings ...)
2019-07-17 11:05 ` [PATCH v3 06/20] docs: kernel_abi.py: fix UTF-8 support Mauro Carvalho Chehab
@ 2019-07-17 11:05 ` Mauro Carvalho Chehab
2019-07-17 11:05 ` [PATCH v3 08/20] docs: kernel_abi.py: Update copyrights Mauro Carvalho Chehab
` (9 subsequent siblings)
13 siblings, 0 replies; 17+ messages in thread
From: Mauro Carvalho Chehab @ 2019-07-17 11:05 UTC (permalink / raw)
To: gregkh; +Cc: Mauro Carvalho Chehab, Jonathan Corbet, linux-doc
The same way kerneldoc.py needed changes to work with newer
Sphinx, this script needs the same changes.
While here, reorganize the include order to match kerneldoc.py.
Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
---
Documentation/sphinx/kernel_abi.py | 39 +++++++++++++++++++++---------
1 file changed, 27 insertions(+), 12 deletions(-)
diff --git a/Documentation/sphinx/kernel_abi.py b/Documentation/sphinx/kernel_abi.py
index 0f3e51e67e8d..2d5d582207f7 100644
--- a/Documentation/sphinx/kernel_abi.py
+++ b/Documentation/sphinx/kernel_abi.py
@@ -30,18 +30,27 @@ u"""
"""
import codecs
-import sys
import os
-from os import path
import subprocess
+import sys
-from sphinx.ext.autodoc import AutodocReporter
+from os import path
-from docutils import nodes
-from docutils.parsers.rst import Directive, directives
+from docutils import nodes, statemachine
from docutils.statemachine import ViewList
+from docutils.parsers.rst import directives, Directive
from docutils.utils.error_reporting import ErrorString
+#
+# AutodocReporter is only good up to Sphinx 1.7
+#
+import sphinx
+
+Use_SSI = sphinx.__version__[:3] >= '1.7'
+if Use_SSI:
+ from sphinx.util.docutils import switch_source_input
+else:
+ from sphinx.ext.autodoc import AutodocReporter
__version__ = '1.0'
@@ -139,11 +148,17 @@ class KernelCmd(Directive):
content.append(l, fname, c)
buf = self.state.memo.title_styles, self.state.memo.section_level, self.state.memo.reporter
- self.state.memo.title_styles = []
- self.state.memo.section_level = 0
- self.state.memo.reporter = AutodocReporter(content, self.state.memo.reporter)
- try:
- self.state.nested_parse(content, 0, node, match_titles=1)
- finally:
- self.state.memo.title_styles, self.state.memo.section_level, self.state.memo.reporter = buf
+
+ if Use_SSI:
+ with switch_source_input(self.state, content):
+ self.state.nested_parse(content, 0, node, match_titles=1)
+ else:
+ self.state.memo.title_styles = []
+ self.state.memo.section_level = 0
+ self.state.memo.reporter = AutodocReporter(content, self.state.memo.reporter)
+ try:
+ self.state.nested_parse(content, 0, node, match_titles=1)
+ finally:
+ self.state.memo.title_styles, self.state.memo.section_level, self.state.memo.reporter = buf
+
return node.children
--
2.21.0
^ permalink raw reply related [flat|nested] 17+ messages in thread
* [PATCH v3 08/20] docs: kernel_abi.py: Update copyrights
[not found] <cover.1563360659.git.mchehab+samsung@kernel.org>
` (3 preceding siblings ...)
2019-07-17 11:05 ` [PATCH v3 07/20] docs: kernel_abi.py: make it compatible with Sphinx 1.7+ Mauro Carvalho Chehab
@ 2019-07-17 11:05 ` Mauro Carvalho Chehab
2019-07-17 11:05 ` [PATCH v3 09/20] docs: kernel_abi.py: add a SPDX header file Mauro Carvalho Chehab
` (8 subsequent siblings)
13 siblings, 0 replies; 17+ messages in thread
From: Mauro Carvalho Chehab @ 2019-07-17 11:05 UTC (permalink / raw)
To: gregkh; +Cc: Mauro Carvalho Chehab, Jonathan Corbet, linux-doc
As Markus doesn't want to maintain ths file, update it to
put me as its maintainer.
Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
---
Documentation/sphinx/kernel_abi.py | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/Documentation/sphinx/kernel_abi.py b/Documentation/sphinx/kernel_abi.py
index 2d5d582207f7..ef91b1e1ff4b 100644
--- a/Documentation/sphinx/kernel_abi.py
+++ b/Documentation/sphinx/kernel_abi.py
@@ -7,7 +7,8 @@ u"""
Implementation of the ``kernel-abi`` reST-directive.
:copyright: Copyright (C) 2016 Markus Heiser
- :copyright: Copyright (C) 2016 Mauro Carvalho Chehab
+ :copyright: Copyright (C) 2016-2019 Mauro Carvalho Chehab
+ :maintained-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
:license: GPL Version 2, June 1991 see Linux/COPYING for details.
The ``kernel-abi`` (:py:class:`KernelCmd`) directive calls the
--
2.21.0
^ permalink raw reply related [flat|nested] 17+ messages in thread
* [PATCH v3 09/20] docs: kernel_abi.py: add a SPDX header file
[not found] <cover.1563360659.git.mchehab+samsung@kernel.org>
` (4 preceding siblings ...)
2019-07-17 11:05 ` [PATCH v3 08/20] docs: kernel_abi.py: Update copyrights Mauro Carvalho Chehab
@ 2019-07-17 11:05 ` Mauro Carvalho Chehab
2019-07-17 11:05 ` [PATCH v3 10/20] docs: kernel_abi.py: use --enable-lineno for get_abi.pl Mauro Carvalho Chehab
` (7 subsequent siblings)
13 siblings, 0 replies; 17+ messages in thread
From: Mauro Carvalho Chehab @ 2019-07-17 11:05 UTC (permalink / raw)
To: gregkh; +Cc: Mauro Carvalho Chehab, Jonathan Corbet, linux-doc
This file is released under GPL v2.
Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
---
Documentation/sphinx/kernel_abi.py | 1 +
1 file changed, 1 insertion(+)
diff --git a/Documentation/sphinx/kernel_abi.py b/Documentation/sphinx/kernel_abi.py
index ef91b1e1ff4b..5d43cac73d0a 100644
--- a/Documentation/sphinx/kernel_abi.py
+++ b/Documentation/sphinx/kernel_abi.py
@@ -1,4 +1,5 @@
# coding=utf-8
+# SPDX-License-Identifier: GPL-2.0
#
u"""
kernel-abi
--
2.21.0
^ permalink raw reply related [flat|nested] 17+ messages in thread
* [PATCH v3 10/20] docs: kernel_abi.py: use --enable-lineno for get_abi.pl
[not found] <cover.1563360659.git.mchehab+samsung@kernel.org>
` (5 preceding siblings ...)
2019-07-17 11:05 ` [PATCH v3 09/20] docs: kernel_abi.py: add a SPDX header file Mauro Carvalho Chehab
@ 2019-07-17 11:05 ` Mauro Carvalho Chehab
2019-07-17 11:05 ` [PATCH v3 11/20] docs: kernel_abi.py: Handle with a lazy Sphinx parser Mauro Carvalho Chehab
` (6 subsequent siblings)
13 siblings, 0 replies; 17+ messages in thread
From: Mauro Carvalho Chehab @ 2019-07-17 11:05 UTC (permalink / raw)
To: gregkh; +Cc: Mauro Carvalho Chehab, Jonathan Corbet, linux-doc
Just like kernel-doc extension, we need to be able to identify
what part of an imported document has issues, as reporting them
as:
get_abi.pl rest --dir $srctree/Documentation/ABI/obsolete --rst-source:1689: ERROR: Unexpected indentation.
Makes a lot harder for someone to fix.
It should be noticed that it the line which will be reported is
the line where the "What:" definition is, and not the line
with actually has an error.
Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
---
Documentation/sphinx/kernel_abi.py | 18 ++++++++++++++----
1 file changed, 14 insertions(+), 4 deletions(-)
diff --git a/Documentation/sphinx/kernel_abi.py b/Documentation/sphinx/kernel_abi.py
index 5d43cac73d0a..efa338e18764 100644
--- a/Documentation/sphinx/kernel_abi.py
+++ b/Documentation/sphinx/kernel_abi.py
@@ -35,6 +35,7 @@ import codecs
import os
import subprocess
import sys
+import re
from os import path
@@ -92,7 +93,7 @@ class KernelCmd(Directive):
env = doc.settings.env
cwd = path.dirname(doc.current_source)
- cmd = "get_abi.pl rest --dir "
+ cmd = "get_abi.pl rest --enable-lineno --dir "
cmd += self.arguments[0]
srctree = path.abspath(os.environ["srctree"])
@@ -136,7 +137,7 @@ class KernelCmd(Directive):
% (self.name, ErrorString(exc)))
return out
- def nestedParse(self, lines, fname):
+ def nestedParse(self, lines, f):
content = ViewList()
node = nodes.section()
@@ -146,8 +147,17 @@ class KernelCmd(Directive):
code_block += "\n " + l
lines = code_block + "\n\n"
- for c, l in enumerate(lines.split("\n")):
- content.append(l, fname, c)
+ line_regex = re.compile("^#define LINENO (\S+)\#([0-9]+)$")
+ ln = 0
+
+ for line in lines.split("\n"):
+ match = line_regex.search(line)
+ if match:
+ f = match.group(1)
+ # sphinx counts lines from 0
+ ln = int(match.group(2)) - 1
+ else:
+ content.append(line, f, ln)
buf = self.state.memo.title_styles, self.state.memo.section_level, self.state.memo.reporter
--
2.21.0
^ permalink raw reply related [flat|nested] 17+ messages in thread
* [PATCH v3 11/20] docs: kernel_abi.py: Handle with a lazy Sphinx parser
[not found] <cover.1563360659.git.mchehab+samsung@kernel.org>
` (6 preceding siblings ...)
2019-07-17 11:05 ` [PATCH v3 10/20] docs: kernel_abi.py: use --enable-lineno for get_abi.pl Mauro Carvalho Chehab
@ 2019-07-17 11:05 ` Mauro Carvalho Chehab
2019-07-17 11:05 ` [PATCH v3 12/20] docs: add ABI documentation to the admin-guide book Mauro Carvalho Chehab
` (5 subsequent siblings)
13 siblings, 0 replies; 17+ messages in thread
From: Mauro Carvalho Chehab @ 2019-07-17 11:05 UTC (permalink / raw)
To: gregkh; +Cc: Mauro Carvalho Chehab, Jonathan Corbet, linux-doc
The Sphinx docutils parser is lazy: if the content is bigger than
a certain number of lines, it silenlty stops parsing it,
producing an incomplete content. This seems to be worse on newer
Sphinx versions, like 2.0.
So, change the logic to parse the contents per input file.
Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
---
Documentation/sphinx/kernel_abi.py | 39 ++++++++++++++++++++----------
1 file changed, 26 insertions(+), 13 deletions(-)
diff --git a/Documentation/sphinx/kernel_abi.py b/Documentation/sphinx/kernel_abi.py
index efa338e18764..a417026ed690 100644
--- a/Documentation/sphinx/kernel_abi.py
+++ b/Documentation/sphinx/kernel_abi.py
@@ -36,6 +36,7 @@ import os
import subprocess
import sys
import re
+import kernellog
from os import path
@@ -79,12 +80,6 @@ class KernelCmd(Directive):
"debug" : directives.flag
}
- def warn(self, message, **replace):
- replace["fname"] = self.state.document.current_source
- replace["line_no"] = replace.get("line_no", self.lineno)
- message = ("%(fname)s:%(line_no)s: [kernel-abi WARN] : " + message) % replace
- self.state.document.settings.env.app.warn(message, prefix="")
-
def run(self):
doc = self.state.document
@@ -110,7 +105,7 @@ class KernelCmd(Directive):
shell_env["srctree"] = srctree
lines = self.runCmd(cmd, shell=True, cwd=cwd, env=shell_env)
- nodeList = self.nestedParse(lines, fname)
+ nodeList = self.nestedParse(lines, self.arguments[0])
return nodeList
def runCmd(self, cmd, **kwargs):
@@ -137,9 +132,9 @@ class KernelCmd(Directive):
% (self.name, ErrorString(exc)))
return out
- def nestedParse(self, lines, f):
+ def nestedParse(self, lines, fname):
content = ViewList()
- node = nodes.section()
+ node = nodes.section()
if "debug" in self.options:
code_block = "\n\n.. code-block:: rst\n :linenos:\n"
@@ -149,22 +144,42 @@ class KernelCmd(Directive):
line_regex = re.compile("^#define LINENO (\S+)\#([0-9]+)$")
ln = 0
+ n = 0
+ f = fname
for line in lines.split("\n"):
+ n = n + 1
match = line_regex.search(line)
if match:
- f = match.group(1)
+ new_f = match.group(1)
+
+ # Sphinx parser is lazy: it stops parsing contents in the
+ # middle, if it is too big. So, handle it per input file
+ if new_f != f and content:
+ self.do_parse(content, node)
+ content = ViewList()
+
+ f = new_f
+
# sphinx counts lines from 0
ln = int(match.group(2)) - 1
else:
content.append(line, f, ln)
- buf = self.state.memo.title_styles, self.state.memo.section_level, self.state.memo.reporter
+ kernellog.info(self.state.document.settings.env.app, "%s: parsed %i lines" % (fname, n))
+ if content:
+ self.do_parse(content, node)
+
+ return node.children
+
+ def do_parse(self, content, node):
if Use_SSI:
with switch_source_input(self.state, content):
self.state.nested_parse(content, 0, node, match_titles=1)
else:
+ buf = self.state.memo.title_styles, self.state.memo.section_level, self.state.memo.reporter
+
self.state.memo.title_styles = []
self.state.memo.section_level = 0
self.state.memo.reporter = AutodocReporter(content, self.state.memo.reporter)
@@ -172,5 +187,3 @@ class KernelCmd(Directive):
self.state.nested_parse(content, 0, node, match_titles=1)
finally:
self.state.memo.title_styles, self.state.memo.section_level, self.state.memo.reporter = buf
-
- return node.children
--
2.21.0
^ permalink raw reply related [flat|nested] 17+ messages in thread
* [PATCH v3 12/20] docs: add ABI documentation to the admin-guide book
[not found] <cover.1563360659.git.mchehab+samsung@kernel.org>
` (7 preceding siblings ...)
2019-07-17 11:05 ` [PATCH v3 11/20] docs: kernel_abi.py: Handle with a lazy Sphinx parser Mauro Carvalho Chehab
@ 2019-07-17 11:05 ` Mauro Carvalho Chehab
2019-07-17 11:05 ` [PATCH v3 16/20] docs: ABI: make it parse ABI/stable as ReST-compatible files Mauro Carvalho Chehab
` (4 subsequent siblings)
13 siblings, 0 replies; 17+ messages in thread
From: Mauro Carvalho Chehab @ 2019-07-17 11:05 UTC (permalink / raw)
To: gregkh; +Cc: Mauro Carvalho Chehab, Jonathan Corbet, linux-doc
As we don't want a generic Sphinx extension to execute commands,
change the one proposed to Markus to call the abi_book.pl
script.
Use a script to parse the Documentation/ABI directory and output
it at the admin-guide.
Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
---
Documentation/admin-guide/abi-obsolete.rst | 10 ++++++++++
Documentation/admin-guide/abi-removed.rst | 4 ++++
Documentation/admin-guide/abi-stable.rst | 13 +++++++++++++
Documentation/admin-guide/abi-testing.rst | 19 +++++++++++++++++++
Documentation/admin-guide/abi.rst | 11 +++++++++++
Documentation/admin-guide/index.rst | 2 ++
Documentation/conf.py | 2 +-
7 files changed, 60 insertions(+), 1 deletion(-)
create mode 100644 Documentation/admin-guide/abi-obsolete.rst
create mode 100644 Documentation/admin-guide/abi-removed.rst
create mode 100644 Documentation/admin-guide/abi-stable.rst
create mode 100644 Documentation/admin-guide/abi-testing.rst
create mode 100644 Documentation/admin-guide/abi.rst
diff --git a/Documentation/admin-guide/abi-obsolete.rst b/Documentation/admin-guide/abi-obsolete.rst
new file mode 100644
index 000000000000..cda9168445a5
--- /dev/null
+++ b/Documentation/admin-guide/abi-obsolete.rst
@@ -0,0 +1,10 @@
+ABI obsolete symbols
+====================
+
+Documents interfaces that are still remaining in the kernel, but are
+marked to be removed at some later point in time.
+
+The description of the interface will document the reason why it is
+obsolete and when it can be expected to be removed.
+
+.. kernel-abi:: $srctree/Documentation/ABI/obsolete
diff --git a/Documentation/admin-guide/abi-removed.rst b/Documentation/admin-guide/abi-removed.rst
new file mode 100644
index 000000000000..497978fc9632
--- /dev/null
+++ b/Documentation/admin-guide/abi-removed.rst
@@ -0,0 +1,4 @@
+ABI removed symbols
+===================
+
+.. kernel-abi:: $srctree/Documentation/ABI/removed
diff --git a/Documentation/admin-guide/abi-stable.rst b/Documentation/admin-guide/abi-stable.rst
new file mode 100644
index 000000000000..7495d7a35048
--- /dev/null
+++ b/Documentation/admin-guide/abi-stable.rst
@@ -0,0 +1,13 @@
+ABI stable symbols
+==================
+
+Documents the interfaces that the developer has defined to be stable.
+
+Userspace programs are free to use these interfaces with no
+restrictions, and backward compatibility for them will be guaranteed
+for at least 2 years.
+
+Most interfaces (like syscalls) are expected to never change and always
+be available.
+
+.. kernel-abi:: $srctree/Documentation/ABI/stable
diff --git a/Documentation/admin-guide/abi-testing.rst b/Documentation/admin-guide/abi-testing.rst
new file mode 100644
index 000000000000..5c886fc50b9e
--- /dev/null
+++ b/Documentation/admin-guide/abi-testing.rst
@@ -0,0 +1,19 @@
+ABI testing symbols
+===================
+
+Documents interfaces that are felt to be stable,
+as the main development of this interface has been completed.
+
+The interface can be changed to add new features, but the
+current interface will not break by doing this, unless grave
+errors or security problems are found in them.
+
+Userspace programs can start to rely on these interfaces, but they must
+be aware of changes that can occur before these interfaces move to
+be marked stable.
+
+Programs that use these interfaces are strongly encouraged to add their
+name to the description of these interfaces, so that the kernel
+developers can easily notify them if any changes occur.
+
+.. kernel-abi:: $srctree/Documentation/ABI/testing
diff --git a/Documentation/admin-guide/abi.rst b/Documentation/admin-guide/abi.rst
new file mode 100644
index 000000000000..3b9645c77469
--- /dev/null
+++ b/Documentation/admin-guide/abi.rst
@@ -0,0 +1,11 @@
+=====================
+Linux ABI description
+=====================
+
+.. toctree::
+ :maxdepth: 1
+
+ abi-stable
+ abi-testing
+ abi-obsolete
+ abi-removed
diff --git a/Documentation/admin-guide/index.rst b/Documentation/admin-guide/index.rst
index 280355d08af5..acdf2cd1d186 100644
--- a/Documentation/admin-guide/index.rst
+++ b/Documentation/admin-guide/index.rst
@@ -18,6 +18,8 @@ etc.
devices
sysctl/index
+ abi
+
This section describes CPU vulnerabilities and their mitigations.
.. toctree::
diff --git a/Documentation/conf.py b/Documentation/conf.py
index 3b2397bcb565..35c1960ea15d 100644
--- a/Documentation/conf.py
+++ b/Documentation/conf.py
@@ -35,7 +35,7 @@ needs_sphinx = '1.3'
# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom
# ones.
extensions = ['kerneldoc', 'rstFlatTable', 'kernel_include', 'cdomain',
- 'kfigure', 'sphinx.ext.ifconfig', 'automarkup']
+ 'kfigure', 'sphinx.ext.ifconfig', 'automarkup', 'kernel_abi']
# The name of the math extension changed on Sphinx 1.4
if (major == 1 and minor > 3) or (major > 1):
--
2.21.0
^ permalink raw reply related [flat|nested] 17+ messages in thread
* [PATCH v3 16/20] docs: ABI: make it parse ABI/stable as ReST-compatible files
[not found] <cover.1563360659.git.mchehab+samsung@kernel.org>
` (8 preceding siblings ...)
2019-07-17 11:05 ` [PATCH v3 12/20] docs: add ABI documentation to the admin-guide book Mauro Carvalho Chehab
@ 2019-07-17 11:05 ` Mauro Carvalho Chehab
2019-07-17 11:05 ` [PATCH v3 17/20] docs: ABI: create a 2-depth index for ABI Mauro Carvalho Chehab
` (3 subsequent siblings)
13 siblings, 0 replies; 17+ messages in thread
From: Mauro Carvalho Chehab @ 2019-07-17 11:05 UTC (permalink / raw)
To: gregkh; +Cc: Mauro Carvalho Chehab, Jonathan Corbet, linux-doc
Now that the stable ABI files are compatible with ReST,
parse them without converting complex descriptions as literal
blocks nor escaping special characters.
Please notice that escaping special characters will probably
be needed at descriptions, at least for the asterisk character.
Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
---
Documentation/admin-guide/abi-stable.rst | 1 +
Documentation/sphinx/kernel_abi.py | 8 ++++++--
2 files changed, 7 insertions(+), 2 deletions(-)
diff --git a/Documentation/admin-guide/abi-stable.rst b/Documentation/admin-guide/abi-stable.rst
index 7495d7a35048..70490736e0d3 100644
--- a/Documentation/admin-guide/abi-stable.rst
+++ b/Documentation/admin-guide/abi-stable.rst
@@ -11,3 +11,4 @@ Most interfaces (like syscalls) are expected to never change and always
be available.
.. kernel-abi:: $srctree/Documentation/ABI/stable
+ :rst:
diff --git a/Documentation/sphinx/kernel_abi.py b/Documentation/sphinx/kernel_abi.py
index a417026ed690..a00eccfbafea 100644
--- a/Documentation/sphinx/kernel_abi.py
+++ b/Documentation/sphinx/kernel_abi.py
@@ -72,12 +72,13 @@ class KernelCmd(Directive):
u"""KernelABI (``kernel-abi``) directive"""
required_arguments = 1
- optional_arguments = 0
+ optional_arguments = 2
has_content = False
final_argument_whitespace = True
option_spec = {
- "debug" : directives.flag
+ "debug" : directives.flag,
+ "rst" : directives.unchanged
}
def run(self):
@@ -91,6 +92,9 @@ class KernelCmd(Directive):
cmd = "get_abi.pl rest --enable-lineno --dir "
cmd += self.arguments[0]
+ if 'rst' in self.options:
+ cmd += " --rst-source"
+
srctree = path.abspath(os.environ["srctree"])
fname = cmd
--
2.21.0
^ permalink raw reply related [flat|nested] 17+ messages in thread
* [PATCH v3 17/20] docs: ABI: create a 2-depth index for ABI
[not found] <cover.1563360659.git.mchehab+samsung@kernel.org>
` (9 preceding siblings ...)
2019-07-17 11:05 ` [PATCH v3 16/20] docs: ABI: make it parse ABI/stable as ReST-compatible files Mauro Carvalho Chehab
@ 2019-07-17 11:05 ` Mauro Carvalho Chehab
2019-07-17 11:05 ` [PATCH v3 18/20] docs: ABI: don't escape ReST-incompatible chars from obsolete and removed Mauro Carvalho Chehab
` (2 subsequent siblings)
13 siblings, 0 replies; 17+ messages in thread
From: Mauro Carvalho Chehab @ 2019-07-17 11:05 UTC (permalink / raw)
To: gregkh; +Cc: Mauro Carvalho Chehab, Jonathan Corbet, linux-doc
That helps to identify what ABI files are adding titles.
Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
---
Documentation/admin-guide/abi.rst | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/Documentation/admin-guide/abi.rst b/Documentation/admin-guide/abi.rst
index 3b9645c77469..bcab3ef2597c 100644
--- a/Documentation/admin-guide/abi.rst
+++ b/Documentation/admin-guide/abi.rst
@@ -3,7 +3,7 @@ Linux ABI description
=====================
.. toctree::
- :maxdepth: 1
+ :maxdepth: 2
abi-stable
abi-testing
--
2.21.0
^ permalink raw reply related [flat|nested] 17+ messages in thread
* [PATCH v3 18/20] docs: ABI: don't escape ReST-incompatible chars from obsolete and removed
[not found] <cover.1563360659.git.mchehab+samsung@kernel.org>
` (10 preceding siblings ...)
2019-07-17 11:05 ` [PATCH v3 17/20] docs: ABI: create a 2-depth index for ABI Mauro Carvalho Chehab
@ 2019-07-17 11:05 ` Mauro Carvalho Chehab
2019-07-28 22:02 ` Linus Walleij
2019-07-17 11:05 ` [PATCH v3 19/20] docs: abi-testing.rst: enable --rst-sources when building docs Mauro Carvalho Chehab
2019-07-17 11:05 ` [PATCH v3 20/20] docs: Kconfig/Makefile: add a check for broken ABI files Mauro Carvalho Chehab
13 siblings, 1 reply; 17+ messages in thread
From: Mauro Carvalho Chehab @ 2019-07-17 11:05 UTC (permalink / raw)
To: gregkh
Cc: Mauro Carvalho Chehab, Linus Walleij, Bartosz Golaszewski,
Jonathan Corbet, linux-gpio, linux-doc
With just a single fix, the contents there can be parsed properly
without the need to escape any ReST incompatible stuff.
Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
---
Documentation/ABI/obsolete/sysfs-gpio | 2 ++
Documentation/admin-guide/abi-obsolete.rst | 1 +
Documentation/admin-guide/abi-removed.rst | 1 +
3 files changed, 4 insertions(+)
diff --git a/Documentation/ABI/obsolete/sysfs-gpio b/Documentation/ABI/obsolete/sysfs-gpio
index e0d4e5e2dd90..b8b0fd341c17 100644
--- a/Documentation/ABI/obsolete/sysfs-gpio
+++ b/Documentation/ABI/obsolete/sysfs-gpio
@@ -13,6 +13,8 @@ Description:
GPIOs are identified as they are inside the kernel, using integers in
the range 0..INT_MAX. See Documentation/admin-guide/gpio for more information.
+ ::
+
/sys/class/gpio
/export ... asks the kernel to export a GPIO to userspace
/unexport ... to return a GPIO to the kernel
diff --git a/Documentation/admin-guide/abi-obsolete.rst b/Documentation/admin-guide/abi-obsolete.rst
index cda9168445a5..d095867899c5 100644
--- a/Documentation/admin-guide/abi-obsolete.rst
+++ b/Documentation/admin-guide/abi-obsolete.rst
@@ -8,3 +8,4 @@ The description of the interface will document the reason why it is
obsolete and when it can be expected to be removed.
.. kernel-abi:: $srctree/Documentation/ABI/obsolete
+ :rst:
diff --git a/Documentation/admin-guide/abi-removed.rst b/Documentation/admin-guide/abi-removed.rst
index 497978fc9632..f7e9e43023c1 100644
--- a/Documentation/admin-guide/abi-removed.rst
+++ b/Documentation/admin-guide/abi-removed.rst
@@ -2,3 +2,4 @@ ABI removed symbols
===================
.. kernel-abi:: $srctree/Documentation/ABI/removed
+ :rst:
--
2.21.0
^ permalink raw reply related [flat|nested] 17+ messages in thread
* [PATCH v3 19/20] docs: abi-testing.rst: enable --rst-sources when building docs
[not found] <cover.1563360659.git.mchehab+samsung@kernel.org>
` (11 preceding siblings ...)
2019-07-17 11:05 ` [PATCH v3 18/20] docs: ABI: don't escape ReST-incompatible chars from obsolete and removed Mauro Carvalho Chehab
@ 2019-07-17 11:05 ` Mauro Carvalho Chehab
2019-07-17 11:05 ` [PATCH v3 20/20] docs: Kconfig/Makefile: add a check for broken ABI files Mauro Carvalho Chehab
13 siblings, 0 replies; 17+ messages in thread
From: Mauro Carvalho Chehab @ 2019-07-17 11:05 UTC (permalink / raw)
To: gregkh; +Cc: Mauro Carvalho Chehab, Jonathan Corbet, linux-doc
Now that ABI/testing documents were fixed, add --rst-sources to
the ABI/testing too.
Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
---
Documentation/admin-guide/abi-testing.rst | 1 +
1 file changed, 1 insertion(+)
diff --git a/Documentation/admin-guide/abi-testing.rst b/Documentation/admin-guide/abi-testing.rst
index 5c886fc50b9e..b205b16a72d0 100644
--- a/Documentation/admin-guide/abi-testing.rst
+++ b/Documentation/admin-guide/abi-testing.rst
@@ -17,3 +17,4 @@ name to the description of these interfaces, so that the kernel
developers can easily notify them if any changes occur.
.. kernel-abi:: $srctree/Documentation/ABI/testing
+ :rst:
--
2.21.0
^ permalink raw reply related [flat|nested] 17+ messages in thread
* [PATCH v3 20/20] docs: Kconfig/Makefile: add a check for broken ABI files
[not found] <cover.1563360659.git.mchehab+samsung@kernel.org>
` (12 preceding siblings ...)
2019-07-17 11:05 ` [PATCH v3 19/20] docs: abi-testing.rst: enable --rst-sources when building docs Mauro Carvalho Chehab
@ 2019-07-17 11:05 ` Mauro Carvalho Chehab
13 siblings, 0 replies; 17+ messages in thread
From: Mauro Carvalho Chehab @ 2019-07-17 11:05 UTC (permalink / raw)
To: gregkh; +Cc: Mauro Carvalho Chehab, Jonathan Corbet, linux-doc
The files under Documentation/ABI should follow the syntax
as defined at Documentation/ABI/README.
Allow checking if they're following the syntax by running
the ABI parser script on COMPILE_TEST.
With that, when there's a problem with a file under
Documentation/ABI, it would produce a warning like:
Warning: file ./Documentation/ABI/testing/sysfs-bus-pci-devices-aer_stats#14:
What '/sys/bus/pci/devices/<dev>/aer_stats/aer_rootport_total_err_cor' doesn't have a description
Warning: file ./Documentation/ABI/testing/sysfs-bus-pci-devices-aer_stats#21:
What '/sys/bus/pci/devices/<dev>/aer_stats/aer_rootport_total_err_fatal' doesn't have a description
Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
---
Documentation/Kconfig | 10 ++++++++++
Documentation/Makefile | 5 +++++
lib/Kconfig.debug | 2 ++
scripts/get_abi.pl | 14 +++++++++++---
4 files changed, 28 insertions(+), 3 deletions(-)
diff --git a/Documentation/Kconfig b/Documentation/Kconfig
index 66046fa1c341..e549a61f4d96 100644
--- a/Documentation/Kconfig
+++ b/Documentation/Kconfig
@@ -10,4 +10,14 @@ config WARN_MISSING_DOCUMENTS
If unsure, select 'N'.
+config WARN_ABI_ERRORS
+ bool "Warn if there are errors at ABI files"
+ depends on COMPILE_TEST
+ help
+ The files under Documentation/ABI should follow what's
+ described at Documentation/ABI/README. Yet, as they're manually
+ written, it would be possible that some of those files would
+ have errors that would break them for being parsed by
+ scripts/get_abi.pl. Add a check to verify them.
+ If unsure, select 'N'.
diff --git a/Documentation/Makefile b/Documentation/Makefile
index e145e4db508b..638c4c11d102 100644
--- a/Documentation/Makefile
+++ b/Documentation/Makefile
@@ -9,6 +9,11 @@ ifeq ($(CONFIG_WARN_MISSING_DOCUMENTS),y)
$(shell $(srctree)/scripts/documentation-file-ref-check --warn)
endif
+# Check for broken ABI files
+ifeq ($(CONFIG_WARN_ABI_ERRORS),y)
+$(shell $(srctree)/scripts/get_abi.pl validate --dir $(srctree)/Documentation/ABI)
+endif
+
# You can set these variables from the command line.
SPHINXBUILD = sphinx-build
SPHINXOPTS =
diff --git a/lib/Kconfig.debug b/lib/Kconfig.debug
index a858b55e8ac7..4cf6a8f68409 100644
--- a/lib/Kconfig.debug
+++ b/lib/Kconfig.debug
@@ -2146,4 +2146,6 @@ config IO_STRICT_DEVMEM
source "arch/$(SRCARCH)/Kconfig.debug"
+source "Documentation/Kconfig"
+
endmenu # Kernel hacking
diff --git a/scripts/get_abi.pl b/scripts/get_abi.pl
index 6a4d387ebf3b..e80f9ab2ed26 100755
--- a/scripts/get_abi.pl
+++ b/scripts/get_abi.pl
@@ -47,7 +47,15 @@ my %data;
sub parse_error($$$$) {
my ($file, $ln, $msg, $data) = @_;
- print STDERR "file $file#$ln: $msg at\n\t$data";
+ $data =~ s/\s+$/\n/;
+
+ print STDERR "Warning: file $file#$ln:\n\t$msg";
+
+ if ($data ne "") {
+ print STDERR ". Line\n\t\t$data";
+ } else {
+ print STDERR "\n";
+ }
}
#
@@ -104,7 +112,7 @@ sub parse_abi {
# Invalid, but it is a common mistake
if ($new_tag eq "where") {
- parse_error($file, $ln, "tag 'Where' is invalid. Should be 'What:' instead", $_);
+ parse_error($file, $ln, "tag 'Where' is invalid. Should be 'What:' instead", "");
$new_tag = "what";
}
@@ -205,7 +213,7 @@ sub parse_abi {
}
# Everything else is error
- parse_error($file, $ln, "Unexpected line:", $_);
+ parse_error($file, $ln, "Unexpected content", $_);
}
$data{$nametag}->{description} =~ s/^\n+//;
close IN;
--
2.21.0
^ permalink raw reply related [flat|nested] 17+ messages in thread
* Re: [PATCH v3 06/20] docs: kernel_abi.py: fix UTF-8 support
2019-07-17 11:05 ` [PATCH v3 06/20] docs: kernel_abi.py: fix UTF-8 support Mauro Carvalho Chehab
@ 2019-07-17 11:44 ` Markus Heiser
2019-07-17 12:30 ` Mauro Carvalho Chehab
0 siblings, 1 reply; 17+ messages in thread
From: Markus Heiser @ 2019-07-17 11:44 UTC (permalink / raw)
To: Mauro Carvalho Chehab, gregkh; +Cc: Jonathan Corbet, linux-doc
Hi Mauro,
just nitpicking ..
Am 17.07.19 um 13:05 schrieb Mauro Carvalho Chehab:
> The parser breaks with UTF-8 characters with Sphinx 1.4.
>
> Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
> ---
> Documentation/sphinx/kernel_abi.py | 20 +++++++-------------
> 1 file changed, 7 insertions(+), 13 deletions(-)
>
> diff --git a/Documentation/sphinx/kernel_abi.py b/Documentation/sphinx/kernel_abi.py
> index 32ce90775d96..0f3e51e67e8d 100644
> --- a/Documentation/sphinx/kernel_abi.py
> +++ b/Documentation/sphinx/kernel_abi.py
> @@ -1,4 +1,5 @@
> -# -*- coding: utf-8; mode: python -*-
> +# coding=utf-8
Can we use the more common::
# -*- coding: utf-8 -*-
notation? See [1] """using formats recognized by popular editors"""
If I'am not wrong, I remember we had this 'magic comment' discussion in the past.
Thanks!
-- Markus --
[1] https://www.python.org/dev/peps/pep-0263/#defining-the-encoding
^ permalink raw reply [flat|nested] 17+ messages in thread
* Re: [PATCH v3 06/20] docs: kernel_abi.py: fix UTF-8 support
2019-07-17 11:44 ` Markus Heiser
@ 2019-07-17 12:30 ` Mauro Carvalho Chehab
0 siblings, 0 replies; 17+ messages in thread
From: Mauro Carvalho Chehab @ 2019-07-17 12:30 UTC (permalink / raw)
To: Markus Heiser; +Cc: gregkh, Jonathan Corbet, linux-doc
Em Wed, 17 Jul 2019 13:44:40 +0200
Markus Heiser <markus.heiser@darmarit.de> escreveu:
> Hi Mauro,
>
> just nitpicking ..
>
> Am 17.07.19 um 13:05 schrieb Mauro Carvalho Chehab:
> > The parser breaks with UTF-8 characters with Sphinx 1.4.
> >
> > Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
> > ---
> > Documentation/sphinx/kernel_abi.py | 20 +++++++-------------
> > 1 file changed, 7 insertions(+), 13 deletions(-)
> >
> > diff --git a/Documentation/sphinx/kernel_abi.py b/Documentation/sphinx/kernel_abi.py
> > index 32ce90775d96..0f3e51e67e8d 100644
> > --- a/Documentation/sphinx/kernel_abi.py
> > +++ b/Documentation/sphinx/kernel_abi.py
> > @@ -1,4 +1,5 @@
> > -# -*- coding: utf-8; mode: python -*-
> > +# coding=utf-8
>
> Can we use the more common::
>
> # -*- coding: utf-8 -*-
>
> notation? See [1] """using formats recognized by popular editors"""
>
> If I'am not wrong, I remember we had this 'magic comment' discussion in the past.
Changed. I ended by merging this change, together with the SPDX one at
the initial patch and did some other patch merges, in order to provide
a cleaner history.
Thanks,
Mauro
^ permalink raw reply [flat|nested] 17+ messages in thread
* Re: [PATCH v3 18/20] docs: ABI: don't escape ReST-incompatible chars from obsolete and removed
2019-07-17 11:05 ` [PATCH v3 18/20] docs: ABI: don't escape ReST-incompatible chars from obsolete and removed Mauro Carvalho Chehab
@ 2019-07-28 22:02 ` Linus Walleij
0 siblings, 0 replies; 17+ messages in thread
From: Linus Walleij @ 2019-07-28 22:02 UTC (permalink / raw)
To: Mauro Carvalho Chehab
Cc: Greg KH, Bartosz Golaszewski, Jonathan Corbet,
open list:GPIO SUBSYSTEM, Linux Doc Mailing List
On Wed, Jul 17, 2019 at 1:05 PM Mauro Carvalho Chehab
<mchehab+samsung@kernel.org> wrote:
> With just a single fix, the contents there can be parsed properly
> without the need to escape any ReST incompatible stuff.
>
> Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
This seems to depend on other stuff so:
Reviewed-by: Linus Walleij <linus.walleij@linaro.org>
Yours,
Linus Walleij
^ permalink raw reply [flat|nested] 17+ messages in thread
end of thread, other threads:[~2019-07-28 22:02 UTC | newest]
Thread overview: 17+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <cover.1563360659.git.mchehab+samsung@kernel.org>
2019-07-17 11:05 ` [PATCH v3 04/20] docs: kernellog.py: add support for info() Mauro Carvalho Chehab
2019-07-17 11:05 ` [PATCH v3 05/20] docs: kernel_abi.py: add a script to parse ABI documentation Mauro Carvalho Chehab
2019-07-17 11:05 ` [PATCH v3 06/20] docs: kernel_abi.py: fix UTF-8 support Mauro Carvalho Chehab
2019-07-17 11:44 ` Markus Heiser
2019-07-17 12:30 ` Mauro Carvalho Chehab
2019-07-17 11:05 ` [PATCH v3 07/20] docs: kernel_abi.py: make it compatible with Sphinx 1.7+ Mauro Carvalho Chehab
2019-07-17 11:05 ` [PATCH v3 08/20] docs: kernel_abi.py: Update copyrights Mauro Carvalho Chehab
2019-07-17 11:05 ` [PATCH v3 09/20] docs: kernel_abi.py: add a SPDX header file Mauro Carvalho Chehab
2019-07-17 11:05 ` [PATCH v3 10/20] docs: kernel_abi.py: use --enable-lineno for get_abi.pl Mauro Carvalho Chehab
2019-07-17 11:05 ` [PATCH v3 11/20] docs: kernel_abi.py: Handle with a lazy Sphinx parser Mauro Carvalho Chehab
2019-07-17 11:05 ` [PATCH v3 12/20] docs: add ABI documentation to the admin-guide book Mauro Carvalho Chehab
2019-07-17 11:05 ` [PATCH v3 16/20] docs: ABI: make it parse ABI/stable as ReST-compatible files Mauro Carvalho Chehab
2019-07-17 11:05 ` [PATCH v3 17/20] docs: ABI: create a 2-depth index for ABI Mauro Carvalho Chehab
2019-07-17 11:05 ` [PATCH v3 18/20] docs: ABI: don't escape ReST-incompatible chars from obsolete and removed Mauro Carvalho Chehab
2019-07-28 22:02 ` Linus Walleij
2019-07-17 11:05 ` [PATCH v3 19/20] docs: abi-testing.rst: enable --rst-sources when building docs Mauro Carvalho Chehab
2019-07-17 11:05 ` [PATCH v3 20/20] docs: Kconfig/Makefile: add a check for broken ABI files Mauro Carvalho Chehab
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).