lkml.org 
[lkml]   [2021]   [Nov]   [2]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    Date
    From
    Subject[for-next][PATCH 11/14] tracing/histogram: Update division by 0 documentation
    From: Kalesh Singh <kaleshsingh@google.com>

    If the divisor is a constant and zero, the undeifned case can be
    detected and an error returned instead of -1.

    Link: https://lkml.kernel.org/r/20211029183339.3216491-3-kaleshsingh@google.com

    Cc: Jonathan Corbet <corbet@lwn.net>
    Cc: Ingo Molnar <mingo@redhat.com>
    Cc: Shuah Khan <shuah@kernel.org>
    Cc: Tom Zanussi <zanussi@kernel.org>
    Signed-off-by: Kalesh Singh <kaleshsingh@google.com>
    Signed-off-by: Steven Rostedt (VMware) <rostedt@goodmis.org>
    ---
    Documentation/trace/histogram.rst | 3 ++-
    1 file changed, 2 insertions(+), 1 deletion(-)

    diff --git a/Documentation/trace/histogram.rst b/Documentation/trace/histogram.rst
    index 66ec972dfb78..859fd1b76c63 100644
    --- a/Documentation/trace/histogram.rst
    +++ b/Documentation/trace/histogram.rst
    @@ -1766,7 +1766,8 @@ using the same key and variable from yet another event::
    Expressions support the use of addition, subtraction, multiplication and
    division operators (+-\*/).

    -Note that division by zero always returns -1.
    +Note if division by zero cannot be detected at parse time (i.e. the
    +divisor is not a constant), the result will be -1.

    Numeric constants can also be used directly in an expression::

    --
    2.33.0
    \
     
     \ /
      Last update: 2021-11-02 21:12    [W:3.084 / U:0.204 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site