Skip to content

Commit c9b03a1

Browse files
eslammedhatAlexei Starovoitov
authored andcommitted
bpf, doc: Improve wording of docs
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 <[email protected]> Acked-by: Yonghong Song <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Alexei Starovoitov <[email protected]>
1 parent 2d72dd1 commit c9b03a1

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

Documentation/bpf/standardization/instruction-set.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -350,8 +350,8 @@ Underflow and overflow are allowed during arithmetic operations, meaning
350350
the 64-bit or 32-bit value will wrap. If BPF program execution would
351351
result in division by zero, the destination register is instead set to zero.
352352
Otherwise, for ``ALU64``, if execution would result in ``LLONG_MIN``
353-
dividing -1, the destination register is instead set to ``LLONG_MIN``. For
354-
``ALU``, if execution would result in ``INT_MIN`` dividing -1, the
353+
divided by -1, the destination register is instead set to ``LLONG_MIN``. For
354+
``ALU``, if execution would result in ``INT_MIN`` divided by -1, the
355355
destination register is instead set to ``INT_MIN``.
356356

357357
If execution would result in modulo by zero, for ``ALU64`` the value of

0 commit comments

Comments
 (0)