From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752054AbaHRIvd (ORCPT ); Mon, 18 Aug 2014 04:51:33 -0400 Received: from mail.mev.co.uk ([62.49.15.74]:54455 "EHLO mail.mev.co.uk" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750915AbaHRIvc (ORCPT ); Mon, 18 Aug 2014 04:51:32 -0400 Message-ID: <53F1BE77.40505@mev.co.uk> Date: Mon, 18 Aug 2014 09:51:03 +0100 From: Ian Abbott User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.0 MIME-Version: 1.0 To: Chase Southwood , CC: , , Subject: Re: [PATCH] staging: comedi: dt2801: change function return type to void References: <1408333382-15086-1-git-send-email-chase.southwood@gmail.com> In-Reply-To: <1408333382-15086-1-git-send-email-chase.southwood@gmail.com> Content-Type: text/plain; charset="us-ascii"; format=flowed Content-Transfer-Encoding: 7bit X-ClientProxiedBy: MEVEXCHANGE.mev.local (10.0.0.4) To MEVEXCHANGE.mev.local (10.0.0.4) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 > Cc: Ian Abbott > Cc: H Hartley Sweeten > --- > drivers/staging/comedi/drivers/dt2801.c | 8 +++----- > 1 file changed, 3 insertions(+), 5 deletions(-) Reviewed-by: Ian Abbott -- -=( Ian Abbott @ MEV Ltd. E-mail: )=- -=( Tel: +44 (0)161 477 1898 FAX: +44 (0)161 718 3587 )=-