]> www.infradead.org Git - users/jedix/linux-maple.git/commit
firewire: core: use xarray instead of idr to maintain client resource
authorTakashi Sakamoto <o-takashi@sakamocchi.jp>
Mon, 12 Aug 2024 23:52:10 +0000 (08:52 +0900)
committerTakashi Sakamoto <o-takashi@sakamocchi.jp>
Mon, 12 Aug 2024 23:52:10 +0000 (08:52 +0900)
commitd9f6c64e03c2fd5bfe8e03f806b8e56d9cf112e4
treebce3f4d6fb634100ecc645ec158a32af610a205b
parent6ec9e9260fe405a667e0dfbdf706483d648a8779
firewire: core: use xarray instead of idr to maintain client resource

In core function, the instances of some client resource structures are
maintained by IDR. As of kernel v6.0, IDR has been superseded by XArray
and deprecated.

This commit replaces the usage of IDR with XArray to maintain the
resource instances. The instance of XArray is allocated per client with
XA_FLAGS_ALLOC1 so that the index of allocated entry is greater than zero
and returns to user space client as handle of the resource.

Link: https://lore.kernel.org/r/20240812235210.28458-6-o-takashi@sakamocchi.jp
Signed-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp>
drivers/firewire/core-cdev.c
drivers/firewire/core.h