On 12/08/2021 08.50, Wolfgang Denk wrote: > Dear Rasmus, > > In message <20210811124800.2593226-10-rasmus.villem...@prevas.dk> you wrote: >> >> + ret = uclass_get(UCLASS_WDT, &uc); >> + if (ret) { >> + log_debug("Error getting UCLASS_WDT: %d\n", ret); >> + return 0; >> + } > > Here the error goes silent, so we should fix the callers to report > it.
The caller (singular) is the initr sequence, so returning an error is effectively the same as halting the boot process, and as I've already explained, I'm not going to change the semantics of initr_watchdog in this regard. Note that, as I've also already explained, the code which this is replacing would also fail if uclass_get() fails (there are uclass_get()s done inside the uclass_get_device_by_seq() and uclass_get_device()), and would similarly just turn an error from one of those into "return 0". Feel free to submit a patch if you feel a change in this area is in order. That's completely unrelated to what these patches are trying to achieve. >> + uclass_foreach_dev(dev, uc) { >> + ret = device_probe(dev); >> + if (ret) { >> + log_debug("Error probing %s: %d\n", dev->name, ret); >> + continue; >> } > > Here the situation is different. The probing error is never > reported anywhere. Is it really a normal condition that a > device_probe() fails here? No, it is not a normal condition. I added the log_debug() after a request from Simon. Rasmus