docs: deprecated.rst: Clarify open-coded arithmetic with literals
authorLen Baker <len.baker@gmx.com>
Sat, 25 Sep 2021 14:34:55 +0000 (16:34 +0200)
committerJonathan Corbet <corbet@lwn.net>
Tue, 26 Oct 2021 15:43:54 +0000 (09:43 -0600)
commit3577cdb23b8f76612017b82a8a1f89ac55f4d313
treec47ce88f515504a9b1073fbf2b17ecf1ea843e8e
parent6e74e68d0b4cec4255d3af09cfa5426b8e20d549
docs: deprecated.rst: Clarify open-coded arithmetic with literals

Although using literals for size calculation in allocator arguments may
be harmless due to compiler warnings in case of overflows, it is better
to refactor the code to avoid the use of open-coded arithmetic.

So, clarify the preferred way in these cases.

Suggested-by: Kees Cook <keescook@chromium.org>
Signed-off-by: Len Baker <len.baker@gmx.com>
Reviewed-by: Gustavo A. R. Silva <gustavoars@kernel.org>
Link: https://lore.kernel.org/r/20210925143455.21221-1-len.baker@gmx.com
Signed-off-by: Jonathan Corbet <corbet@lwn.net>
Documentation/process/deprecated.rst