Received: by 2002:a25:4158:0:0:0:0:0 with SMTP id o85csp433603yba; Thu, 16 May 2019 03:21:22 -0700 (PDT) X-Google-Smtp-Source: APXvYqyZLZ/Evsq2koa5T2X1akdCsJeQE+AYt/VjL2N4jAP3P7ttmyMdhCziXsaTu1HGTADLzU+L X-Received: by 2002:a63:6a42:: with SMTP id f63mr50153307pgc.377.1558002082116; Thu, 16 May 2019 03:21:22 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1558002082; cv=none; d=google.com; s=arc-20160816; b=KoHUyHHyFUzpeQejxsCuIh4nYIZZThd5SUA8htMzQ6KTohZxN68FfOkjz1FaSZdOAo 2P5Bka1/hvnzRrfYzKMKZIf62NyKtuww3gqU68LUfMTA1zWGTUFa+o1T8Gfpp0TdYX/k jWIKn95tYRiwXpq3FkLVTdksO1Mi9FRAqpSsK6hR5zSuROo+i6Sp9aoU2+NjwGrw2Pf2 HMDxOBKiHnHgRrdFaPun2l9p5yKEq7f5L0Jcl57E729PQIVZb3x2GDH8J7EZmBBtrg+T jvBZlbeBgUWlSgzLodH7P2Wa4A0wKnSdObZ4S8RPe4WPWimYKmPZPoKmvtcxa9bPZzmd a9yQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature; bh=TafLJ5xzQhYN5npKIcyt3SN7Hm+qCiJlw7F3vyjTHuo=; b=rMO/x74t5ZwBlRsY/CacO94lxUkbwwwFxd0nXV+YbWW6UjIiIc4Nx9sKwfJ1LBxbWa RVrjvEaDkJ467ZuJsZOZFB/UJAQqY/9/rpaePi6ySwc6CaG2O+ZdPqxH5JhG79rLHnB+ LL2vhW2ORQXeG6CaZzBFoF8Ae8u7IR0PeZafPoB6Ojo5GDwRXySHcFgbCynAIPzPQgcg yQGx0g3vDhRSw88N+b2pgSDHy1L+C2Yt54BP9lT3F0ocvn7Ns59VGWcQaYaIp2Zc4GrJ gGKkNt+Z4l/4M1dLI996NSU8egQCEcJJ0OeIxuDmmVJtB7dTo+8FrfwEAd6Tnh90pFeD ZkzA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=cvujyhHb; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id z26si4557948pge.345.2019.05.16.03.21.07; Thu, 16 May 2019 03:21:22 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=cvujyhHb; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726787AbfEPKT5 (ORCPT + 99 others); Thu, 16 May 2019 06:19:57 -0400 Received: from mail.kernel.org ([198.145.29.99]:44808 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726363AbfEPKT4 (ORCPT ); Thu, 16 May 2019 06:19:56 -0400 Received: from localhost (83-86-89-107.cable.dynamic.v4.ziggo.nl [83.86.89.107]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 7A2E1205ED; Thu, 16 May 2019 10:19:55 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1558001996; bh=GNeZk44iUjZpvezqnuLxWMKIOov7x5+FAxK5yoRztyA=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=cvujyhHb+Shb0guDQ9USF9pVhy8GIqVvT7ze92sQe7HWnl+yu6cTJorhjB3Kf6xpa qz0hoxpAOIvy3Y2rRf/DThinRBTO9QC+fWrTauvjXL0yGC88V9UmxWlZ7eC0mXwgkB /klQUdWkURbxFEXBkb5GYhprJW+AnaEvPeLRQXPw= Date: Thu, 16 May 2019 12:19:53 +0200 From: Greg Kroah-Hartman To: Quentin Deslandes Cc: "kernel-janitors@vger.kernel.org" , "devel@driverdev.osuosl.org" , Forest Bond , "linux-kernel@vger.kernel.org" Subject: Re: [PATCH] staging: vt6656: remove unused variable Message-ID: <20190516101953.GA22358@kroah.com> References: <20190516093046.1400-1-quentin.deslandes@itdev.co.uk> <20190516093951.GA19798@kroah.com> <20190516095035.GA1692@qd-ubuntu> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20190516095035.GA1692@qd-ubuntu> User-Agent: Mutt/1.11.4 (2019-03-13) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, May 16, 2019 at 09:50:38AM +0000, Quentin Deslandes wrote: > On Thu, May 16, 2019 at 11:39:51AM +0200, Greg Kroah-Hartman wrote: > > On Thu, May 16, 2019 at 09:31:05AM +0000, Quentin Deslandes wrote: > > > Fixed 'set but not used' warning message on a status variable. The > > > called function returning the status code 'vnt_start_interrupt_urb()' > > > clean up after itself and the caller function > > > 'vnt_int_start_interrupt()' does not returns any value. > > > > > > Signed-off-by: Quentin Deslandes > > > --- > > > drivers/staging/vt6656/int.c | 3 +-- > > > 1 file changed, 1 insertion(+), 2 deletions(-) > > > > > > diff --git a/drivers/staging/vt6656/int.c b/drivers/staging/vt6656/int.c > > > index 504424b19fcf..ac30ce72db5a 100644 > > > --- a/drivers/staging/vt6656/int.c > > > +++ b/drivers/staging/vt6656/int.c > > > @@ -42,13 +42,12 @@ static const u8 fallback_rate1[5][5] = { > > > void vnt_int_start_interrupt(struct vnt_private *priv) > > > { > > > unsigned long flags; > > > - int status; > > > > > > dev_dbg(&priv->usb->dev, "---->Interrupt Polling Thread\n"); > > > > > > spin_lock_irqsave(&priv->lock, flags); > > > > > > - status = vnt_start_interrupt_urb(priv); > > > + vnt_start_interrupt_urb(priv); > > > > Shouldn't you fix this by erroring out if this fails? Why ignore the > > errors? > > > > thanks, > > > > greg k-h > > I could, however 'vnt_start_interrupt_urb()' already call 'dev_dbg()' if > it fails. Nothing is done after this debug call except returning an > error code. Returning an error code is fine for that function. But then you have to do something with that error. > 'vnt_int_start_interrupt()' should, IMHO, return a status code, but the > original developer may have good reasons not to do so. I think that is the real problem that needs to be fixed here, don't paper over the issue by ignoring the return value. thanks, greg k-h