Re: [PATCH v7 01/10] ACPI: scan: Remove the second DSDT traversal

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Andy,

Thank you for the review.

On Tue, Mar 28, 2023 at 05:45:13PM +0300, Andy Shevchenko wrote:
> On Tue, Mar 28, 2023 at 01:12:54PM +0300, Sakari Ailus wrote:
> > Collect the devices with _DEP into a list and continue processing them
> > after a full traversal, instead of doing a full second traversal of the
> > tree.
> > 
> > This makes the second DSDT traversal pass unnecessary as we already have
> > the nodes we're interested in in a linked list.
> 
> ...
> 
> > +/**
> > + * struct acpi_postponed_handle - A postponed ACPI handle
> > + * @handle: The postponed handle
> > + * @list: Entry in a postponed list
> > + *
> > + * One such entry represents an ACPI handle the scanning of which has been
> > + * postponed.
> > + */
> > +struct acpi_postponed_handle {
> > +	acpi_handle handle;
> > +	struct list_head list;
> > +};
> 
> If you put the list to be the first member, container_of() against it becomes a
> no-op at compile time. Have you checked the code generation if you swap these
> members?

I haven't checked but that would seem like a reasonable thing to do. A
pointer to the handle isn't used, unlike it is for the list.

> 
> > +/**
> > + * struct acpi_scan_context - Context for scanning ACPI devices
> > + * @device: The first encountered device, typically the root of the scanned tree
> > + * @postponed_head: The list head of the postponed ACPI handles
> > + */
> > +struct acpi_scan_context {
> > +	struct acpi_device *device;
> > +	struct list_head postponed_head;
> > +};
> 
> Ditto.
> 
> ...
> 
> > +/**
> > + * acpi_bus_handle_postpone - Add an ACPI handle to a given postponed list
> > + * @handle: The ACPI handle
> > + * @head: Postponed list head
> > + *
> > + * Add a given ACPI handle to a list of ACPI objects for which the creation
> > + * of the device objects is to be postponed.
> 
> `kernel-doc -v ...` complains on the absence of Return section. Is it the same
> for you?

That may well be. These comments wouldn't necessarily even need to be
kernel-doc as the rest isn't so documented either. I can of course fix the
error while leaving these kernel-doc.

-- 
Kind regards,

Sakari Ailus



[Index of Archives]     [Linux Input]     [Video for Linux]     [Gstreamer Embedded]     [Mplayer Users]     [Linux USB Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]

  Powered by Linux