Re: [PATCH v2] staging: greybus: uart: convert idr to xarray

From: Greg KH

Date: Fri Nov 20 2026 - 02:05:57 EST


On Thu, Nov 12, 2026 at 06:05:46PM +0200, Aviv Levinson wrote:
> The legacy IDR API is deprecated in favor of the modern XArray API.
> Convert the tty_minors IDR to an XArray.
>
> To prevent locking the entire gb_tty object while loading the minor,
> switch IDR to XArray and use the internal XArray's spinlock (xa_lock).
> To respect TTY encapsulation, use tty_port_get()
> instead of direct kref_get_unless_zero().
>
> Signed-off-by: Aviv Levinson <levinson.aviv@xxxxxxxxx>
> ---
> drivers/staging/greybus/uart.c | 27 ++++++++++++---------------
> 1 file changed, 12 insertions(+), 15 deletions(-)

Again, this is not a needed change, and odds are one you didn't actually
test with the hardware, so I can't take it for now, sorry.

greg k-h