Skip to content

Commit

Permalink
Documentation: sphinx: Don't parse socket() as identifier reference
Browse files Browse the repository at this point in the history
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.

Signed-off-by: Jonathan Neuschäfer <[email protected]>
Reviewed-by: Mauro Carvalho Chehab <[email protected]>
Signed-off-by: Jonathan Corbet <[email protected]>
  • Loading branch information
neuschaefer authored and Jonathan Corbet committed Aug 12, 2019
1 parent 11fec00 commit 82bf829
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion Documentation/sphinx/automarkup.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,8 @@
# 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
Expand Down

0 comments on commit 82bf829

Please sign in to comment.