Skip to content

Commit 7929b98

Browse files
author
Jonathan Corbet
committed
docs: Remove :c:func: from process/deprecated.rst
Documentation/process/deprecated.rst has a lot of uses of :c:func:, which is, well, deprecated. Emacs query-replace-regexp to the rescue. Signed-off-by: Jonathan Corbet <[email protected]>
1 parent 76136e0 commit 7929b98

File tree

1 file changed

+15
-15
lines changed

1 file changed

+15
-15
lines changed

Documentation/process/deprecated.rst

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -63,51 +63,51 @@ Instead, use the helper::
6363

6464
header = kzalloc(struct_size(header, item, count), GFP_KERNEL);
6565

66-
See :c:func:`array_size`, :c:func:`array3_size`, and :c:func:`struct_size`,
67-
for more details as well as the related :c:func:`check_add_overflow` and
68-
:c:func:`check_mul_overflow` family of functions.
66+
See array_size(), array3_size(), and struct_size(),
67+
for more details as well as the related check_add_overflow() and
68+
check_mul_overflow() family of functions.
6969

7070
simple_strtol(), simple_strtoll(), simple_strtoul(), simple_strtoull()
7171
----------------------------------------------------------------------
72-
The :c:func:`simple_strtol`, :c:func:`simple_strtoll`,
73-
:c:func:`simple_strtoul`, and :c:func:`simple_strtoull` functions
72+
The simple_strtol(), simple_strtoll(),
73+
simple_strtoul(), and simple_strtoull() functions
7474
explicitly ignore overflows, which may lead to unexpected results
75-
in callers. The respective :c:func:`kstrtol`, :c:func:`kstrtoll`,
76-
:c:func:`kstrtoul`, and :c:func:`kstrtoull` functions tend to be the
75+
in callers. The respective kstrtol(), kstrtoll(),
76+
kstrtoul(), and kstrtoull() functions tend to be the
7777
correct replacements, though note that those require the string to be
7878
NUL or newline terminated.
7979

8080
strcpy()
8181
--------
82-
:c:func:`strcpy` performs no bounds checking on the destination
82+
strcpy() performs no bounds checking on the destination
8383
buffer. This could result in linear overflows beyond the
8484
end of the buffer, leading to all kinds of misbehaviors. While
8585
`CONFIG_FORTIFY_SOURCE=y` and various compiler flags help reduce the
8686
risk of using this function, there is no good reason to add new uses of
87-
this function. The safe replacement is :c:func:`strscpy`.
87+
this function. The safe replacement is strscpy().
8888

8989
strncpy() on NUL-terminated strings
9090
-----------------------------------
91-
Use of :c:func:`strncpy` does not guarantee that the destination buffer
91+
Use of strncpy() does not guarantee that the destination buffer
9292
will be NUL terminated. This can lead to various linear read overflows
9393
and other misbehavior due to the missing termination. It also NUL-pads the
9494
destination buffer if the source contents are shorter than the destination
9595
buffer size, which may be a needless performance penalty for callers using
96-
only NUL-terminated strings. The safe replacement is :c:func:`strscpy`.
97-
(Users of :c:func:`strscpy` still needing NUL-padding should instead
96+
only NUL-terminated strings. The safe replacement is strscpy().
97+
(Users of strscpy() still needing NUL-padding should instead
9898
use strscpy_pad().)
9999

100-
If a caller is using non-NUL-terminated strings, :c:func:`strncpy()` can
100+
If a caller is using non-NUL-terminated strings, strncpy()() can
101101
still be used, but destinations should be marked with the `__nonstring
102102
<https://gcc.gnu.org/onlinedocs/gcc/Common-Variable-Attributes.html>`_
103103
attribute to avoid future compiler warnings.
104104

105105
strlcpy()
106106
---------
107-
:c:func:`strlcpy` reads the entire source buffer first, possibly exceeding
107+
strlcpy() reads the entire source buffer first, possibly exceeding
108108
the given limit of bytes to copy. This is inefficient and can lead to
109109
linear read overflows if a source string is not NUL-terminated. The
110-
safe replacement is :c:func:`strscpy`.
110+
safe replacement is strscpy().
111111

112112
%p format specifier
113113
-------------------

0 commit comments

Comments
 (0)