Re: [PATCH v6 2/4] ACPI: NHLT: Introduce API for the table

Cezary Rojewski
2024-03-09T10:39:48Z

On 2024-03-08 2:39 PM, Andy Shevchenko wrote:
> On Fri, Mar 08, 2024 at 08:32:38AM +0100, Cezary Rojewski wrote:
>> The table is composed of a range of endpoints with each describing
>> audio formats they support. Most of the operations involve iterating
>> over elements of the table and filtering them. Simplify the process by
>> implementing range of getters.
>>
>> While the acpi_nhlt_endpoint_mic_count() stands out a bit, it is a
>> critical component for any AudioDSP driver to know how many digital
>> microphones it is dealing with.
>
> ...
>
> + acpi.h ?
>
>> +#include <linux/export.h>
>
> + errno.h
>
> + minmax.h
>
> + printk.h
> + types.h
>
>> +#include <acpi/nhlt.h>
>
> ...
>
>> +#if IS_ENABLED(CONFIG_ACPI_NHLT)
>
> + kconfig.h ?
>
>> +#endif /* CONFIG_ACPI_NHLT */
>

Which tool helps you find out these? I want it too!

While I'll add the headers mentioned here, it feels weird to include
primitives such as errno.h or minmax.h. Majority of C-files found in the
kernel utilize such primitives yet the number of includes for these when
looking at the kernel as a whole is low.

Is there a "common defs" header in kernel? Looking for an equivalent of
'build-essentials' package.