lkml.org 
[lkml]   [2014]   [Aug]   [18]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] staging: comedi: dt2801: change function return type to void
On 2014-08-18 04:43, Chase Southwood wrote:
> cppcheck was complaining that the variable 'stat' is being reassigned
> before the old value is used. Upon inspection, I found that
> dt2801_writecmd() cannot fail, always returns 0, and most callers already
> do not bother with assigning its return value anyway, so it makes sense to
> just change the return type for this function from int to void, and remove
> the two assignments to 'stat'.
>
> Signed-off-by: Chase Southwood <chase.southwood@gmail.com>
> Cc: Ian Abbott <abbotti@mev.co.uk>
> Cc: H Hartley Sweeten <hsweeten@visionengravers.com>
> ---
> drivers/staging/comedi/drivers/dt2801.c | 8 +++-----
> 1 file changed, 3 insertions(+), 5 deletions(-)

Reviewed-by: Ian Abbott <abbotti@mev.co.uk>

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


\
 
 \ /
  Last update: 2014-08-18 11:21    [W:0.155 / U:0.200 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site