Documentation: sphinx: Add missing comma to list of strings
Subsystems (5)
PATCH v2 1/2 Documentation: sphinx: Add missing comma to list of strings
In Python, like in C, when a comma is omitted in a list of strings, the two strings around the missing comma are concatenated.
---
v2:
- new patch
--- Documentation/sphinx/automarkup.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
Documentation/sphinx/automarkup.py +1 -1
@@ -25,7 +25,7 @@ RE_function = re.compile(r'([\w_][\w\d_]+\(\))') # to the creation of incorrect and confusing cross references. So # just don't even try with these names. # -Skipfuncs = [ 'open', 'close', 'read', 'write', 'fcntl', 'mmap' +Skipfuncs = [ 'open', 'close', 'read', 'write', 'fcntl', 'mmap', 'select', 'poll', 'fork', 'execve', 'clone', 'ioctl'] #
--
2.20.1
PATCH v2 2/2 Documentation: sphinx: Don't parse socket() as identifier reference
With the introduction of Documentation/sphinx/automarkup.py, socket() is parsed as a reference to the in-kernel definition of socket. Sphinx then decides that struct socket is a good match, which is usually not intended, when the syscall is meant instead. This was observed in Documentation/networking/af_xdp.rst.
Prevent socket() from being misinterpreted by adding it to the Skipfuncs list in automarkup.py.
---
v2:
- block socket() in Documentation/sphinx/automarkup.py, as suggested by Jonathan Corbet
v1:
- https://lore.kernel.org/lkml/[email protected]/
--- Documentation/sphinx/automarkup.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
Documentation/sphinx/automarkup.py +2 -1
@@ -26,7 +26,8 @@ RE_function = re.compile(r'([\w_][\w\d_]+\(\))') # just don't even try with these names. # Skipfuncs = [ 'open', 'close', 'read', 'write', 'fcntl', 'mmap', - 'select', 'poll', 'fork', 'execve', 'clone', 'ioctl'] + 'select', 'poll', 'fork', 'execve', 'clone', 'ioctl', + 'socket' ] # # Find all occurrences of function() and try to replace them with
--
2.20.1
Re: [PATCH v2 2/2] Documentation: sphinx: Don't parse socket() as identifier reference
Em Mon, 12 Aug 2019 18:07:05 +0200
Jonathan Neuschäfer <[email protected]> escreveu:
Quoted 27 lines
With the introduction of
Documentation/sphinx/automarkup.py,socket()is parsed as a reference to the in-kernel definition of socket. Sphinx then decides that struct socket is a good match, which is usually not intended, when the syscall is meant instead. This was observed inDocumentation/networking/af_xdp.rst.Prevent
socket()from being misinterpreted by adding it to the Skipfuncs list inautomarkup.py.Signed-off-by Jonathan Neuschäfer <[email protected]>---
v2:
- blocksocket()inDocumentation/sphinx/automarkup.py, as suggested by Jonathan Corbetv1:
- https://lore.kernel.org/lkml/[email protected]/--- Documentation/sphinx/automarkup.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)Documentation/sphinx/automarkup.py +0
-0
Documentation/sphinx/automarkup.py RE_function = re.compile(r'([\w_][\w\d_]+\(\))') · line 30
Quoted 6 lines
Documentation/sphinx/automarkup.py +2
-1@@ -26,7 +26,8 @@ RE_function = re.compile(r'([\w_][\w\d_]+\(\))') # just don't even try with these names. # Skipfuncs = [ 'open', 'close', 'read', 'write', 'fcntl', 'mmap', - 'select', 'poll', 'fork', 'execve', 'clone', 'ioctl'] + 'select', 'poll', 'fork', 'execve', 'clone', 'ioctl', + 'socket' ]
Both patches sound OK on my eyes. Yet, I would just fold them into a single one.
In any case:
Quoted 6 lines
Documentation/sphinx/automarkup.py +0
-1# # Find all occurrences of function() and try to replace them with --2.20.1
Thanks,
Mauro
Jonathan Corbet
maintainerQuoted 17 lines · On Mon, 12 Aug 2019 18:07:04 +0200 Jonathan Neuschäfer <[email protected]>…
In Python, like in C, when a comma is omitted in a list of strings, the two strings around the missing comma are concatenated.
Signed-off-by Jonathan Neuschäfer <[email protected]>---
v2:
- new patch--- Documentation/sphinx/automarkup.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)Documentation/sphinx/automarkup.py +0
-0
Documentation/sphinx/automarkup.py RE_function = re.compile(r'([\w_][\w\d_]+\(\))') · line 29
Quoted 6 lines
Documentation/sphinx/automarkup.py +1
-1@@ -25,7 +25,7 @@ RE_function = re.compile(r'([\w_][\w\d_]+\(\))') # to the creation of incorrect and confusing cross references. So # just don't even try with these names. # -Skipfuncs = [ 'open', 'close', 'read', 'write', 'fcntl', 'mmap' +Skipfuncs = [ 'open', 'close', 'read', 'write', 'fcntl', 'mmap', 'select', 'poll', 'fork', 'execve', 'clone', 'ioctl']
Hmm...that's a wee bit embarrassing. Applied (and the socket() patch too), thanks.
jon