Re: [v7 2/5] PCI: Refactor capability search functions to eliminate code duplication

Hans Zhang
2025-04-09T01:38:34Z

On 2025/4/9 00:18, Ilpo Järvinen wrote:
>> Move the Capability search logic into a header-based macro that accepts a
>> config space accessor function as an argument. This enables controller
>> drivers to perform Capability discovery using their early access mechanisms
>> prior to full device initialization while maintaining the original search
>> behavior.
>
> ... while maintaining ... ->
>
> ... while sharing the Capability search code.
>

Dear Ilpo,

Thank you very much for your reply. Will change.

>>
>> Convert the existing PCI core Capability search implementation to use this new
>> macro
>
> I think the rest of this paragraph after this are unnecessary.
>

Will delete.

>> , eliminating code duplication. The refactoring preserves the original
>> functionality without behavioral changes, while allowing both the core and
>> drivers to share common Capability discovery logic.
>
> Other than that, it seemed good enough for me.
>

Best regards,
Hans