[PATCH v3 08/22] firmware: ti_sci: Combine xfer allocation and transfer functions
Sebin Francis
sebin.francis at ti.com
Wed Dec 2 07:15:43 PST 2026
On 02/12/26 20:35, Andrew Davis wrote:
> On 12/2/26 8:17 AM, Sebin Francis wrote:
>> Hi Beleswar,
>>
>> On 29/10/26 23:41, Beleswar Padhi wrote:
>>> From: Andrew Davis <afd at ti.com>
>>>
>>> In each TI-SCI message function we allocate a xfer struct and use
>>> it to perform a message transfer. There is now no reason to do these
>>> in two steps. Instead make the ti_sci_do_xfer() function do the
>>> allocation internally. That function already does the xfer free so
>>> it make sense to have it also do the allocation. This reduces the
>>> complexity of all the individual message functions.
>>>
>>
>> The error check that you are removing `if (IS_ERR(handle))` is not
>> done for all ti_sci* functions, is it intentional?
>>
>
> We don't remove `if (IS_ERR(handle))` in this patch, was this comment meant
> for patch [9/22]?
>
> If so then, yes that is intentional, the functions that keep the `handle`
> check all use the handle in their function body (to get `dev` to print
> a warning message on failure). For the rest of the functions that
> don't use `handle` directly the check is dropped.
>
> Andrew
Thanks Andrew, make sense.
>
>> Functions like ti_sci_msg_cmd_lpm_wake_reason,
>> ti_sci_msg_cmd_query_fw_caps
>>
>> Sebin
>>
>>> Signed-off-by: Andrew Davis <afd at ti.com>
>>> Co-developed-by: Beleswar Padhi <b-padhi at ti.com>
>>> Signed-off-by: Beleswar Padhi <b-padhi at ti.com>
>>> ---
>>> v3: Changelog:
>>> 1. None to this patch.
>>>
>>> Link to v2:
>>> https://lore.kernel.org/all/20260930160607.2674980-9-b-padhi@ti.com/
>>>
>>> v2: Changelog:
>>> 1. None to this patch.
>>>
>>> Link to v1:
>>> https://lore.kernel.org/all/20260929201746.4078803-9-b-padhi@ti.com/
>>>
>>> drivers/firmware/ti_sci.c | 487 +++++++++++++-------------------------
>>> 1 file changed, 170 insertions(+), 317 deletions(-)
>>>
>>
>> ---
>>
>
More information about the linux-arm-kernel
mailing list