* [PATCH 1/1] dm: fix DM_EVENT dependencies
@ 2022-05-03 19:18 Heinrich Schuchardt
2022-05-03 19:35 ` Tom Rini
0 siblings, 1 reply; 4+ messages in thread
From: Heinrich Schuchardt @ 2022-05-03 19:18 UTC (permalink / raw)
To: Simon Glass; +Cc: Jan Kiszka, u-boot, Heinrich Schuchardt
CONFIG_DM_EVENT without CONFIG_EVENT is non-functional. Select instead
of imply CONFIG_EVENT.
Remove superfluous stub in include/event.h.
Fixes: 5b896ed5856f ("event: Add events for device probe/remove")
Reported-by: Jan Kiszka <jan.kiszka@siemens.com>
Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
---
drivers/core/Kconfig | 2 +-
include/event.h | 7 +------
2 files changed, 2 insertions(+), 7 deletions(-)
diff --git a/drivers/core/Kconfig b/drivers/core/Kconfig
index 5c3400417f..be956c79ff 100644
--- a/drivers/core/Kconfig
+++ b/drivers/core/Kconfig
@@ -80,7 +80,7 @@ config DM_DEVICE_REMOVE
config DM_EVENT
bool "Support events with driver model"
depends on DM
- imply EVENT
+ select EVENT
default y if SANDBOX
help
This enables support for generating events related to driver model
diff --git a/include/event.h b/include/event.h
index 62e72a7bd3..7765f07250 100644
--- a/include/event.h
+++ b/include/event.h
@@ -144,7 +144,6 @@ int event_register(const char *id, enum event_t type, event_handler_t func,
/** event_show_spy_list( - Show a list of event spies */
void event_show_spy_list(void);
-#if CONFIG_IS_ENABLED(EVENT)
/**
* event_notify() - notify spies about an event
*
@@ -159,6 +158,7 @@ void event_show_spy_list(void);
*/
int event_notify(enum event_t type, void *data, int size);
+#if CONFIG_IS_ENABLED(EVENT)
/**
* event_notify_null() - notify spies about an event
*
@@ -169,11 +169,6 @@ int event_notify(enum event_t type, void *data, int size);
*/
int event_notify_null(enum event_t type);
#else
-static inline int event_notify(enum event_t type, void *data, int size)
-{
- return 0;
-}
-
static inline int event_notify_null(enum event_t type)
{
return 0;
--
2.34.1
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH 1/1] dm: fix DM_EVENT dependencies
2022-05-03 19:18 [PATCH 1/1] dm: fix DM_EVENT dependencies Heinrich Schuchardt
@ 2022-05-03 19:35 ` Tom Rini
2022-05-04 6:06 ` Heinrich Schuchardt
0 siblings, 1 reply; 4+ messages in thread
From: Tom Rini @ 2022-05-03 19:35 UTC (permalink / raw)
To: Heinrich Schuchardt; +Cc: Simon Glass, Jan Kiszka, u-boot
[-- Attachment #1: Type: text/plain, Size: 682 bytes --]
On Tue, May 03, 2022 at 09:18:33PM +0200, Heinrich Schuchardt wrote:
> CONFIG_DM_EVENT without CONFIG_EVENT is non-functional. Select instead
> of imply CONFIG_EVENT.
>
> Remove superfluous stub in include/event.h.
>
> Fixes: 5b896ed5856f ("event: Add events for device probe/remove")
> Reported-by: Jan Kiszka <jan.kiszka@siemens.com>
> Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
> ---
> drivers/core/Kconfig | 2 +-
> include/event.h | 7 +------
> 2 files changed, 2 insertions(+), 7 deletions(-)
I don't think it makes sense to have two symbols at all. It's part of
DM, it should always be DM_EVENT I suppose.
--
Tom
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 659 bytes --]
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH 1/1] dm: fix DM_EVENT dependencies
2022-05-03 19:35 ` Tom Rini
@ 2022-05-04 6:06 ` Heinrich Schuchardt
2022-05-04 14:27 ` Tom Rini
0 siblings, 1 reply; 4+ messages in thread
From: Heinrich Schuchardt @ 2022-05-04 6:06 UTC (permalink / raw)
To: Tom Rini; +Cc: Simon Glass, Jan Kiszka, u-boot
On 5/3/22 21:35, Tom Rini wrote:
> On Tue, May 03, 2022 at 09:18:33PM +0200, Heinrich Schuchardt wrote:
>
>> CONFIG_DM_EVENT without CONFIG_EVENT is non-functional. Select instead
>> of imply CONFIG_EVENT.
>>
>> Remove superfluous stub in include/event.h.
>>
>> Fixes: 5b896ed5856f ("event: Add events for device probe/remove")
>> Reported-by: Jan Kiszka <jan.kiszka@siemens.com>
>> Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
>> ---
>> drivers/core/Kconfig | 2 +-
>> include/event.h | 7 +------
>> 2 files changed, 2 insertions(+), 7 deletions(-)
>
> I don't think it makes sense to have two symbols at all. It's part of
> DM, it should always be DM_EVENT I suppose.
The event EVT_MISC_INIT_F is used outside of the driver model.
arch/sandbox/cpu/start.c:127:EVENT_SPY(EVT_MISC_INIT_F,
sandbox_misc_init_f);
board/google/chromebook_coral/coral.c:60:EVENT_SPY(EVT_MISC_INIT_F,
coral_check_ll_boot);
board/keymile/kmcent2/kmcent2.c:213:EVENT_SPY(EVT_MISC_INIT_F,
kmcent2_misc_init_f);
board/keymile/pg-wcom-ls102xa/pg-wcom-ls102xa.c:120:EVENT_SPY(EVT_MISC_INIT_F,
pg_wcom_misc_init_f);
Best regards
Heinrich
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH 1/1] dm: fix DM_EVENT dependencies
2022-05-04 6:06 ` Heinrich Schuchardt
@ 2022-05-04 14:27 ` Tom Rini
0 siblings, 0 replies; 4+ messages in thread
From: Tom Rini @ 2022-05-04 14:27 UTC (permalink / raw)
To: Heinrich Schuchardt; +Cc: Simon Glass, Jan Kiszka, u-boot
[-- Attachment #1: Type: text/plain, Size: 1382 bytes --]
On Wed, May 04, 2022 at 08:06:12AM +0200, Heinrich Schuchardt wrote:
>
>
> On 5/3/22 21:35, Tom Rini wrote:
> > On Tue, May 03, 2022 at 09:18:33PM +0200, Heinrich Schuchardt wrote:
> >
> > > CONFIG_DM_EVENT without CONFIG_EVENT is non-functional. Select instead
> > > of imply CONFIG_EVENT.
> > >
> > > Remove superfluous stub in include/event.h.
> > >
> > > Fixes: 5b896ed5856f ("event: Add events for device probe/remove")
> > > Reported-by: Jan Kiszka <jan.kiszka@siemens.com>
> > > Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
> > > ---
> > > drivers/core/Kconfig | 2 +-
> > > include/event.h | 7 +------
> > > 2 files changed, 2 insertions(+), 7 deletions(-)
> >
> > I don't think it makes sense to have two symbols at all. It's part of
> > DM, it should always be DM_EVENT I suppose.
>
> The event EVT_MISC_INIT_F is used outside of the driver model.
>
> arch/sandbox/cpu/start.c:127:EVENT_SPY(EVT_MISC_INIT_F,
> sandbox_misc_init_f);
> board/google/chromebook_coral/coral.c:60:EVENT_SPY(EVT_MISC_INIT_F,
> coral_check_ll_boot);
> board/keymile/kmcent2/kmcent2.c:213:EVENT_SPY(EVT_MISC_INIT_F,
> kmcent2_misc_init_f);
> board/keymile/pg-wcom-ls102xa/pg-wcom-ls102xa.c:120:EVENT_SPY(EVT_MISC_INIT_F,
> pg_wcom_misc_init_f);
Oh, I see now. But then DM_EVENT needs to depend on EVENT.
--
Tom
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 659 bytes --]
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2022-05-04 14:28 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-05-03 19:18 [PATCH 1/1] dm: fix DM_EVENT dependencies Heinrich Schuchardt
2022-05-03 19:35 ` Tom Rini
2022-05-04 6:06 ` Heinrich Schuchardt
2022-05-04 14:27 ` Tom Rini
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.