[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <5A0BEBEB.8030501@linux.intel.com>
Date: Wed, 15 Nov 2017 15:25:31 +0800
From: Lu Baolu <baolu.lu@...ux.intel.com>
To: Felipe Balbi <felipe.balbi@...ux.intel.com>,
Mathias Nyman <mathias.nyman@...ux.intel.com>,
Greg Kroah-Hartman <gregkh@...uxfoundation.org>
Cc: linux-usb@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH v3 2/3] usb: xhci: Add DbC support in xHCI driver
Hi,
On 11/14/2017 03:28 PM, Felipe Balbi wrote:
> Hi,
>
> Mathias Nyman <mathias.nyman@...ux.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.
>
Yeah! kfifo gives me exactly what I want here.
I will replace it with kfifo. Thank you.
Best regards,
Lu Baolu
Powered by blists - more mailing lists