lkml.org 
[lkml]   [2012]   [Jun]   [14]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 12/15] staging: comedi: 8255: refactor subdev_8255_insn function
On 2012/06/13 11:42 PM, H Hartley Sweeten wrote:
> Refactor the subdev_8255_insn function to follow what the user
> space library is doing.
>
> 1) This function requires 'data' to contain 2 parameters. Add a
> sanity check for this (insn->n != 2).

Actually, the comedi core will have already checked that.

> 4) The user space library only checks for a < 0 return to indicate
> an error. It appears that the 'return 2' in this function is supposed
> to indicate the number of data parameters used to perform the command.
> Return the insn->n value for this, the open coded '2' looks wrong.

As long as it still returns 2, I don't care how you do it!

--
-=( Ian Abbott @ MEV Ltd. E-mail: <abbotti@mev.co.uk> )=-
-=( Tel: +44 (0)161 477 1898 FAX: +44 (0)161 718 3587 )=-


\
 
 \ /
  Last update: 2012-06-14 11:42    [W:0.039 / U:0.516 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site