Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1538784

Re: staging: comedi: usbduxsigma: Split a condition check in usbduxsigma_alloc_usb_buffers()

From Ian Abbott <abbotti@mev.co.uk>
Newsgroups linux.kernel
Subject Re: staging: comedi: usbduxsigma: Split a condition check in usbduxsigma_alloc_usb_buffers()
Date 2016-12-08 19:20 +0100
Message-ID <sMbsu-Yb-55@gated-at.bofh.it> (permalink)
References <sM5do-5A5-3@gated-at.bofh.it> <sM5do-5A5-19@gated-at.bofh.it> <sM6sT-6fr-21@gated-at.bofh.it> <sM97l-7Se-71@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


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/  )=-

Back to linux.kernel | Previous | NextPrevious in thread | Find similar | Unroll thread


Thread

[PATCH 4/5] staging: comedi: usbduxsigma: Split a condition check in  usbduxsigma_alloc_usb_buffers() SF Markus Elfring <elfring@users.sourceforge.net> - 2016-12-08 12:40 +0100
  Re: [PATCH 4/5] staging: comedi: usbduxsigma: Split a condition check  in usbduxsigma_alloc_usb_buffers() Ian Abbott <abbotti@mev.co.uk> - 2016-12-08 14:00 +0100
    Re: staging: comedi: usbduxsigma: Split a condition check in  usbduxsigma_alloc_usb_buffers() SF Markus Elfring <elfring@users.sourceforge.net> - 2016-12-08 16:50 +0100
      Re: staging: comedi: usbduxsigma: Split a condition check in  usbduxsigma_alloc_usb_buffers() Ian Abbott <abbotti@mev.co.uk> - 2016-12-08 19:20 +0100

csiph-web