Re: [PATCH v3 20/23] mailbox/riscv-sbi-mpxy: Add ACPI support

Sunil V L
2025-05-12T08:57:20Z

On Mon, May 12, 2025 at 11:47:14AM +0300, Andy Shevchenko wrote:
> On Mon, May 12, 2025 at 02:06:37PM +0530, Sunil V L wrote:
> > On Mon, May 12, 2025 at 10:28:17AM +0300, Andy Shevchenko wrote:
> > > On Sun, May 11, 2025 at 07:09:36PM +0530, Anup Patel wrote:
>
> ...
>
> > > > +#ifdef CONFIG_ACPI
> > > > + if (!acpi_disabled)
> > >
> > > Hmm... Why do you need this check? What for?
> > >
> > When we boot with DT, ACPI_COMPANION(dev) will return NULL which will
> > cause a crash in acpi_dev_clear_dependencies(). Let me know if I am
> > missing something.
>
> Yes, just check that the companion is NULL, rather than the above.
>
> struct acpi_device *adev;
>
> adev = ACPI_COMPANION(dev);
> if (adev)
> acpi_dev_clear_dependencies(adev);
>
Ah Ok. Sure. Will update.

Thanks!
Sunil