From: Tomas Glozar Date: Tue, 7 Jan 2025 14:48:21 +0000 (+0100) Subject: rtla/osnoise: Distinguish missing workload option X-Git-Tag: v6.14-rc1~83^2~7 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=80d3ba1cf51bfbbb3b098434f2b2c95cd7c0ae5c;p=thirdparty%2Flinux.git rtla/osnoise: Distinguish missing workload option 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 Cc: Luis Goncalves Link: https://lore.kernel.org/20250107144823.239782-2-tglozar@redhat.com Signed-off-by: Tomas Glozar Signed-off-by: Steven Rostedt (Google) --- diff --git a/tools/tracing/rtla/src/osnoise.c b/tools/tracing/rtla/src/osnoise.c index 245e9344932bc..699a83f538a8e 100644 --- a/tools/tracing/rtla/src/osnoise.c +++ b/tools/tracing/rtla/src/osnoise.c @@ -867,7 +867,7 @@ int osnoise_set_workload(struct osnoise_context *context, bool onoff) retval = osnoise_options_set_option("OSNOISE_WORKLOAD", onoff); if (retval < 0) - return -1; + return -2; context->opt_workload = onoff;