[PATCH 05/14] drivers/firmware/sdei: Remove sdei_get_conduit()

Gavin Shan gshan at redhat.com
Tue Jul 21 23:50:48 EDT 2020


Hi James,

On 7/22/20 6:42 AM, James Morse wrote:
> On 06/07/2020 06:47, Gavin Shan wrote:
>> There are some logics in sdei_get_conduit() can be safely dropped:
>>
>>     * There are no associated device node with the platform device,
>>       so it's pointless to check on it.
> 
> This is for DT. Its looking up the conduit in the binding. See
> Documentation/devicetree/bindings/arm/firmware/sdei.txt.
> 

Yeah, I obviously missed the DT case.

> 
>>     * ACPI functionality has been verified when the platform device
>>       is added in sdei_init(). So it's unnecessary to recheck.
> 
> This is so that a kernel built without ACPI support can have all that code removed at
> compile time. The check appears repeatedly to ensure the compiler knows this is dead code.
> 

Yes, this patch isn't meaningful and should be dropped except to
remove the duplicate checker on ACPI enablement in sdei_get_conduit()

     if (np) {
         :
     } else if (IS_ENABLED(CONFIG_ACPI) && !acpi_disabled) {
         :
     }

I will have new patch to replace this one, to remove the duplicate
checker in v2.

Thanks,
Gavin




More information about the linux-arm-kernel mailing list