lkml.org 
[lkml]   [2021]   [May]   [13]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [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.

\
 
 \ /
  Last update: 2021-05-13 16:18    [W:0.127 / U:0.552 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site