
Hi Heinrich, On Mon, 18 Aug 2025 at 01:09, Heinrich Schuchardt <xypron.glpk@gmx.de> wrote:
On 16.08.25 01:31, Simon Glass wrote:
From: Simon Glass <sjg@chromium.org>
You seem not to keep up with wokeism ;) https://www.aswf.io/inclusive-language-guide/ banned "dummy".
That's up to them, I suppose. It's a very common term and has been for years...also it appears thousands of times in U-Boot and 10s of thousands of times in Linux. I don't think anyone would be confused as to what it means, which is a primary concern of naming. Incidentally I noticed Emperor and Vassal being used in nginx :-)
When CONFIG_EVENT is disabled, we should not try to send an event. This is already handled for events without parameters, so handle it for events that do have parameters, too.
Why can't we just pass NULL instead of a notify function. if we don't want to be notified?
If events are disabled we want to avoid building in the event code at all, to reduce the size of U-Boot. Regards, Simon
Best regards
Heinrich
Signed-off-by: Simon Glass <sjg@chromium.org> ---
include/event.h | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-)
diff --git a/include/event.h b/include/event.h index 67b5bdd8a8b..a68be9fc1e8 100644 --- a/include/event.h +++ b/include/event.h @@ -402,6 +402,7 @@ void event_show_spy_list(void); */ const char *event_type_name(enum event_t type);
+#if CONFIG_IS_ENABLED(EVENT) /** * event_notify() - notify spies about an event * @@ -416,7 +417,6 @@ const char *event_type_name(enum event_t type); */ int event_notify(enum event_t type, void *data, int size);
-#if CONFIG_IS_ENABLED(EVENT) /** * event_notify_null() - notify spies about an event * @@ -431,6 +431,11 @@ static inline int event_notify_null(enum event_t type) { return 0; } + +static inline int event_notify(enum event_t type, void *data, int size) +{ + return 0; +} #endif
#if CONFIG_IS_ENABLED(EVENT_DYNAMIC)