]> git.ipfire.org Git - thirdparty/kernel/stable.git/commitdiff
rtla/osnoise: Distinguish missing workload option
authorTomas Glozar <tglozar@redhat.com>
Tue, 7 Jan 2025 14:48:21 +0000 (15:48 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 21 Feb 2025 12:49:52 +0000 (13:49 +0100)
commit 80d3ba1cf51bfbbb3b098434f2b2c95cd7c0ae5c upstream.

osnoise_set_workload returns -1 for both missing OSNOISE_WORKLOAD option
and failure in setting the option.

Return -1 for missing and -2 for failure to distinguish them.

Cc: stable@vger.kernel.org
Cc: John Kacur <jkacur@redhat.com>
Cc: Luis Goncalves <lgoncalv@redhat.com>
Link: https://lore.kernel.org/20250107144823.239782-2-tglozar@redhat.com
Signed-off-by: Tomas Glozar <tglozar@redhat.com>
Signed-off-by: Steven Rostedt (Google) <rostedt@goodmis.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
tools/tracing/rtla/src/osnoise.c

index b8ec6c15bccb1509e952640bcc02525de586bcb8..333195dc63d95da2fc01f56c0eb9f2bc2bff8dca 100644 (file)
@@ -693,7 +693,7 @@ int osnoise_set_tracing_thresh(struct osnoise_context *context, long long tracin
 
        retval = osnoise_write_ll_config("tracing_thresh", tracing_thresh);
        if (retval < 0)
-               return -1;
+               return -2;
 
        context->tracing_thresh = tracing_thresh;