OSDN Git Service

staging: comedi: comedi_buf: cleanup comedi_buf_munge()
authorH Hartley Sweeten <hsweeten@visionengravers.com>
Wed, 9 Jan 2013 20:29:19 +0000 (13:29 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 18 Jan 2013 00:53:59 +0000 (16:53 -0800)
commit8d4be669479d95a0c6eb4b6a538460f0ab35c4f7
tree0ede48e2b692084214f58075af1d9f1eeb39da26
parent47181eab71a81a919bf74eee570d6db59c6cf298
staging: comedi: comedi_buf: cleanup comedi_buf_munge()

Refactor this function so there is a single return point and only
one BUG_ON check. The BUG_ON needs to be looked at to see if it
can be safely removed.

Clarify the test in the munge loop that checks for a block copy
that would extend pass the end of the prealloc_buf.

Reword the comment about the need for the smp_wmb().

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/comedi/comedi_buf.c