lkml.org 
[lkml]   [2017]   [Nov]   [14]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRe: [PATCH v3 2/3] usb: xhci: Add DbC support in xHCI driver
Date

Hi,

Mathias Nyman <mathias.nyman@linux.intel.com> writes:
>> +static int dbc_buf_alloc(struct dbc_buf *db, unsigned int size)
>> +{
>> + db->buf_buf = kzalloc(size, GFP_KERNEL);
>> + if (!db->buf_buf)
>> + return -ENOMEM;
>> +
>> + db->buf_size = size;
>> + db->buf_put = db->buf_buf;
>> + db->buf_get = db->buf_buf;
>> +
>> + return 0;
>> +}

you may wanna have a look at kfifo.

--
balbi

\
 
 \ /
  Last update: 2017-11-14 08:29    [W:0.072 / U:3.124 seconds]
©2003-2017 Jasper Spaans. hosted at Digital OceanAdvertise on this site