Re: [PATCH] staging: greybus: uart: replace IDR with XArray

From: Greg KH

Date: Tue Jun 16 2026 - 21:28:06 EST


On Tue, Jun 16, 2026 at 12:07:03PM -0700, Jack Lee wrote:
> DEFINE_IDR is deprecated in favor of XArray. Convert tty_minors
> from IDR to XArray, replacing idr_alloc, idr_find, idr_remove and
> idr_destroy with their xa_alloc, xa_load, xa_erase and xa_destroy
> equivalents.
>
> Signed-off-by: Jack Lee <skunkolee@xxxxxxxxx>
> ---
> drivers/staging/greybus/uart.c | 23 +++++++++++------------
> 1 file changed, 11 insertions(+), 12 deletions(-)
>

This "cleanup" has come up in the past, and shot down each time as it's
not really needed or necessary. idr is just fine to use here and xarray
is overkill.

thanks,

greg k-h