[RFC PATCH] reset: Remove WARN_ON when CONFIG_RESET_CONTROLLER=n

Jules Maselbas jmaselbas at kalray.eu
Mon Mar 15 11:03:33 GMT 2021


On Mon, Mar 15, 2021 at 10:35:37AM +0100, Sascha Hauer wrote:
> On Fri, Mar 12, 2021 at 04:21:45PM +0100, Jules Maselbas wrote:
> > Signed-off-by: Jules Maselbas <jmaselbas at kalray.eu>
> > ---
> > I am using dwc2 but my platform doesn't has CONFIG_RESET_CONTROLLER enabled,
> > when booting barebox I got this kind of message:
> > WARNING: at barebox/include/linux/reset.h:54/device_reset_us()!
> > 
> > Not sure if removing all the WARN_ON is a good idea... asking for insight.
> 
> I looked at the kernel and it has no warnings in the stubs. For that
> reason I applied this patch.
> 
> Having no warnings has its downside as well of course. If you really
> need resets for your device to function then you won't notice that reset
> support is missing.
Yeah, that makes me a bit unconfortable with removing all WARN_ON.
I though to only warn if the function is call and the device has an
"reset" in it's of_tree node. But then it's no longer a stub.





More information about the barebox mailing list