]> git.ipfire.org Git - thirdparty/linux.git/commitdiff
bpf, doc: Improve wording of docs
authorEslam Khafagy <eslam.medhat1993@gmail.com>
Sat, 7 Jun 2025 22:24:25 +0000 (01:24 +0300)
committerAlexei Starovoitov <ast@kernel.org>
Wed, 11 Jun 2025 19:30:41 +0000 (12:30 -0700)
The phrase "dividing -1" is one I find confusing.  E.g.,
"INT_MIN dividing -1" sounds like "-1 / INT_MIN" rather than the inverse.
"divided by" instead of "dividing" assuming the inverse is meant.

Signed-off-by: Eslam Khafagy <eslam.medhat1993@gmail.com>
Acked-by: Yonghong Song <yonghong.song@linux.dev>
Link: https://lore.kernel.org/r/20250607222434.227890-1-eslam.medhat1993@gmail.com
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
Documentation/bpf/standardization/instruction-set.rst

index ac950a5bb6ad52854538edab6aa821dca223c5f9..39c74611752b6d9a0d07e5115e5038e3309cc271 100644 (file)
@@ -350,8 +350,8 @@ Underflow and overflow are allowed during arithmetic operations, meaning
 the 64-bit or 32-bit value will wrap. If BPF program execution would
 result in division by zero, the destination register is instead set to zero.
 Otherwise, for ``ALU64``, if execution would result in ``LLONG_MIN``
-dividing -1, the destination register is instead set to ``LLONG_MIN``. For
-``ALU``, if execution would result in ``INT_MIN`` dividing -1, the
+divided by -1, the destination register is instead set to ``LLONG_MIN``. For
+``ALU``, if execution would result in ``INT_MIN`` divided by -1, the
 destination register is instead set to ``INT_MIN``.
 
 If execution would result in modulo by zero, for ``ALU64`` the value of