[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <YJ00sFLGnW0pengc@casper.infradead.org>
Date: Thu, 13 May 2021 15:16:16 +0100
From: Matthew Wilcox <willy@...radead.org>
To: Maciej Kwapulinski <maciej.kwapulinski@...ux.intel.com>
Cc: Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
Arnd Bergmann <arnd@...db.de>,
Jonathan Corbet <corbet@....net>,
Derek Kiernan <derek.kiernan@...inx.com>,
Dragan Cvetic <dragan.cvetic@...inx.com>,
Andy Shevchenko <andy.shevchenko@...il.com>,
linux-kernel@...r.kernel.org, linux-doc@...r.kernel.org,
Tomasz Jankowski <tomasz1.jankowski@...el.com>,
Savo Novakovic <savox.novakovic@...el.com>,
Jianxun Zhang <jianxun.zhang@...ux.intel.com>
Subject: Re: [PATCH v3 11/14] intel_gna: add ioctl handler
On Thu, May 13, 2021 at 01:00:37PM +0200, Maciej Kwapulinski wrote:
> +#include <linux/idr.h>
Please don't use the IDR in new code. Use the XArray instead.
> + mutex_lock(&gna_priv->memidr_lock);
> + mo = idr_find(&gna_priv->memory_idr, memory_id);
> + mutex_unlock(&gna_priv->memidr_lock);
You don't need your own lock with the XArray.
Powered by blists - more mailing lists