Re: [PATCH v17 07/12] firmware: psci: Implement vendor-specific resets as reboot-mode

From: Shivendra Pratap
Date: Mon Nov 10 2025 - 09:41:58 EST




On 11/10/2025 10:10 AM, Kathiravan Thirumoorthy wrote:
>
> On 11/9/2025 8:07 PM, Shivendra Pratap wrote:
>> +static int __init psci_init_vendor_reset(void)
>> +{
>> +    struct reboot_mode_driver *reboot;
>> +    struct device_node *psci_np;
>> +    struct device_node *np;
>
>
> We can take advantage of __cleanup() attribute to simply the code paths.
>
> Declare the variables like below
>
>     struct device_node *psci_np __free(device_node) = NULL;
>     struct device_node *np __free(device_node) = NULL;
>
> and get rid of the explicit of_node_put().
>
> I think, we can take up this an improvement once this series landed. But if you happen to respin to address other issues, please take care of this as well.

Let me evaluate this for next respin.

thanks,
Shivendra