[PATCH 02/16] drivers: reset: Handle gracefully NULL pointers
Simon Glass
sjg at chromium.org
Tue Mar 23 01:56:40 CET 2021
Hi Kishon,
On Mon, 22 Mar 2021 at 18:11, Kishon Vijay Abraham I <kishon at ti.com> wrote:
>
> Hi Simon,
>
> On 12/03/21 10:15 am, Simon Glass wrote:
> > Hi Kishon,
> >
> > On Tue, 9 Mar 2021 at 05:27, Kishon Vijay Abraham I <kishon at ti.com> wrote:
> >>
> >> From: Jean-Jacques Hiblot <jjhiblot at ti.com>
> >>
> >> Prepare the way for a managed reset API by handling NULL pointers without
> >> crashing nor failing.
> >>
> >> Signed-off-by: Jean-Jacques Hiblot <jjhiblot at ti.com>
> >> Signed-off-by: Vignesh Raghavendra <vigneshr at ti.com>
> >> Signed-off-by: Kishon Vijay Abraham I <kishon at ti.com>
> >> ---
> >> drivers/reset/reset-uclass.c | 30 +++++++++++++++++-------------
> >> 1 file changed, 17 insertions(+), 13 deletions(-)
> >
> > Why do you want this? This patch is missing the motivation which
> > should be at the start of the commit message.
>
> This is for "optional" reset controllers used by peripheral drivers.
> This will help avoid adding checks in peripheral drivers.
Can you please be more specific?
Reset drivers are required to have operations. Only a very few
uclasses allow the operations pointer to be NULL.
Regards,
Simon
More information about the U-Boot
mailing list