lkml.org 
[lkml]   [2016]   [Dec]   [8]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: staging: comedi: usbduxsigma: Split a condition check in usbduxsigma_alloc_usb_buffers()
From
Date
On 08/12/16 15:46, SF Markus Elfring wrote:
>>> * Reduce memory allocation sizes for two function calls.
>
> Is this implementation detail worth for further considerations?

I assume you are referring to the allocation of devpriv->ai_urbs and
devpriv->ao_urbs? Your patch does not reduce their sizes; `urb` and
`*devpriv->ai_urbs` have the same type `struct urb *`. Having said
that, `sizeof(*devpriv->ai_urbs)` is cleaner code than `sizeof(urb)` in
this case.

--
-=( Ian Abbott @ MEV Ltd. E-mail: <abbotti@mev.co.uk> )=-
-=( Web: http://www.mev.co.uk/ )=-

\
 
 \ /
  Last update: 2016-12-08 19:14    [W:0.108 / U:0.332 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site