Re: [PATCH] firewire: core: update fw_device outside of device_find_child()

From: Takashi Sakamoto
Date: Wed Aug 21 2024 - 10:26:21 EST


On Tue, Aug 20, 2024 at 10:21:32PM +0900, Takashi Sakamoto wrote:
> When detecting updates of bus topology, the data of fw_device is newly
> allocated and caches the content of configuration ROM from the
> corresponding node. Then, the tree of device is sought to find the
> previous data of fw_device corresponding to the node. If found, the
> previous data is updated and reused and the data of fw_device newly
> allocated is going to be released.
>
> The above procedure is done in the call of device_find_child(), however it
> is a bit abusing against the intention of the helper function, since it is
> preferable to find only without updating.
>
> This commit splits the update outside of the call.
>
> Cc: Zijun Hu <zijun_hu@xxxxxxxxxx>
> Signed-off-by: Takashi Sakamoto <o-takashi@xxxxxxxxxxxxx>
> ---
> drivers/firewire/core-device.c | 116 +++++++++++++++++----------------
> 1 file changed, 59 insertions(+), 57 deletions(-)

Applied to for-next branch.

Regards

Takashi Sakamoto