mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2025-08-24 09:34:02 +00:00

Monitors generated with dot2k have their registration function (the one called during monitor initialisation) return always 0, even if the registration failed on RV side. This can hide potential errors. Return the value returned by the RV register function. Cc: Masami Hiramatsu <mhiramat@kernel.org> Cc: Tomas Glozar <tglozar@redhat.com> Cc: Juri Lelli <jlelli@redhat.com> Cc: Clark Williams <williams@redhat.com> Cc: John Kacur <jkacur@redhat.com> Link: https://lore.kernel.org/20250723161240.194860-6-gmonaco@redhat.com Reviewed-by: Nam Cao <namcao@linutronix.de> Signed-off-by: Gabriele Monaco <gmonaco@redhat.com> Signed-off-by: Steven Rostedt (Google) <rostedt@goodmis.org>
38 lines
804 B
C
38 lines
804 B
C
// SPDX-License-Identifier: GPL-2.0
|
|
#include <linux/kernel.h>
|
|
#include <linux/module.h>
|
|
#include <linux/init.h>
|
|
#include <linux/rv.h>
|
|
|
|
#define MODULE_NAME "sched"
|
|
|
|
#include "sched.h"
|
|
|
|
struct rv_monitor rv_sched;
|
|
|
|
struct rv_monitor rv_sched = {
|
|
.name = "sched",
|
|
.description = "container for several scheduler monitor specifications.",
|
|
.enable = NULL,
|
|
.disable = NULL,
|
|
.reset = NULL,
|
|
.enabled = 0,
|
|
};
|
|
|
|
static int __init register_sched(void)
|
|
{
|
|
return rv_register_monitor(&rv_sched, NULL);
|
|
}
|
|
|
|
static void __exit unregister_sched(void)
|
|
{
|
|
rv_unregister_monitor(&rv_sched);
|
|
}
|
|
|
|
module_init(register_sched);
|
|
module_exit(unregister_sched);
|
|
|
|
MODULE_LICENSE("GPL");
|
|
MODULE_AUTHOR("Gabriele Monaco <gmonaco@redhat.com>");
|
|
MODULE_DESCRIPTION("sched: container for several scheduler monitor specifications.");
|