Received: by 2002:a25:ab43:0:0:0:0:0 with SMTP id u61csp7061591ybi; Wed, 5 Jun 2019 10:34:02 -0700 (PDT) X-Google-Smtp-Source: APXvYqxEogmMiH91ZtmUS7FQXEnzgD5x59jABNmSuIeKvRPpKr4mGAExRkTKUrF4S9JSydb6HsmL X-Received: by 2002:a17:902:7883:: with SMTP id q3mr44862808pll.89.1559756042853; Wed, 05 Jun 2019 10:34:02 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1559756042; cv=none; d=google.com; s=arc-20160816; b=A24Yx0+teMsnN0+ePk6jqBXREPrvXKRK3s0qvtDcNXiBiEmhtE/RHY0U3zTDbXCVbX fIPpAy6MMd5/k9TXFCmA6ZldhnY5w6tFdM0nFB5TFmZhkgdDKmKOaj2l94rjEkCbSR8f kIi9GgJesTIG+MtSJRUZFGzG8PZ0VAPX6WU7sRipQ3GOM3pRvrvEJ7aapfU+uIlBrycF u2HjFL+TRLQ+gIPfl7htgjZmDzWujs79PqlsGPSy4aYwJL7WWW2MZUE9F4zy6NkI84rD WhOA1WtS5+cqUjbR3oVbaYIAKRbWdBWxSYZMHoJZX2yFzevaPV2pcAvsNvh21oRDUHJ+ P80Q== 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=ecs90UB8yft08fZhkbKSv7S0h88qdnxVbsqce6kg0Jg=; b=jcv7Tln0kXtPVFRsKVQbAMFPoPvptSt4t4R0hTFJSyloR12LFgj8ow8IyJgArFhNfE Q2EnwpwqxZDQ8ueLuVnzEmNQ4DjeOhMaYn5jwQCd+hxsF4PbsTApFcFkNG78TD4DJJH6 t9tczNp2enjxky/v66DCF3K0nAaYR4eZpkImril3xXkjHZZK3jvCmHc6oFOxS5o3i6mW UBd0diWx2ZbUd82qwQ9KKwRe1uSMeByloCp3SHGbaBs/I0KOW9SrHJK58/eUShTIVXZp /N1chuSd8cRUSHg8Ci1ANYjglbVjMfQpOQzMUNUrjqL+I33pdXZMXLFhcvQzC8P+lDlJ BH/Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b="K05P9hZ/"; 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 w2si27308883pga.495.2019.06.05.10.33.45; Wed, 05 Jun 2019 10:34:02 -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="K05P9hZ/"; 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 S1726589AbfFERcX (ORCPT + 99 others); Wed, 5 Jun 2019 13:32:23 -0400 Received: from mail.kernel.org ([198.145.29.99]:54448 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725950AbfFERcW (ORCPT ); Wed, 5 Jun 2019 13:32:22 -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 C4F8020866; Wed, 5 Jun 2019 17:32:21 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1559755942; bh=3OiQHIkBj5obYDAp408SvCaE7dajk3tP3v7IaTQD8NM=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=K05P9hZ/zbQOih6+VIAtmv54MVb00m0mVCk6ICAh53KoDtFLyQRde0VVPjP3Am+Zx frkol9unQ7LlQMuO5WDQ2N+mpkEyld1lltMfotgu8QSP6unXm4Hbz13Ap8w66a9CyS supbIfeQkaymcOPYPAg2dycl1TrvYXtR8QEBjd7c= Date: Wed, 5 Jun 2019 19:32:19 +0200 From: Greg Kroah-Hartman To: Hariprasad Kelam Cc: Thomas Winischhofer , linux-usb@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] USB: sisusbvga: Remove unneeded variable Message-ID: <20190605173219.GC27700@kroah.com> References: <20190605171908.GA10444@hari-Inspiron-1545> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20190605171908.GA10444@hari-Inspiron-1545> User-Agent: Mutt/1.12.0 (2019-05-25) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Jun 05, 2019 at 10:49:08PM +0530, Hariprasad Kelam wrote: > fix below warning reported by coccicheck > > drivers/usb/misc/sisusbvga/sisusb.c:1753:5-8: Unneeded variable: "ret". > Return "0" on line 1877 > > Signed-off-by: Hariprasad Kelam > --- > drivers/usb/misc/sisusbvga/sisusb.c | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) > > diff --git a/drivers/usb/misc/sisusbvga/sisusb.c b/drivers/usb/misc/sisusbvga/sisusb.c > index ea06f1f..dfe2ed1 100644 > --- a/drivers/usb/misc/sisusbvga/sisusb.c > +++ b/drivers/usb/misc/sisusbvga/sisusb.c > @@ -1750,7 +1750,7 @@ static int sisusb_setup_screen(struct sisusb_usb_data *sisusb, > static int sisusb_set_default_mode(struct sisusb_usb_data *sisusb, > int touchengines) > { > - int ret = 0, i, j, modex, bpp, du; > + int i, j, modex, bpp, du; > u8 sr31, cr63, tmp8; > static const char attrdata[] = { > 0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, > @@ -1874,7 +1874,7 @@ static int sisusb_set_default_mode(struct sisusb_usb_data *sisusb, > > SETIREG(SISCR, 0x34, 0x44); /* we just set std mode #44 */ > > - return ret; > + return 0; If this function can not fail, why is it returning anything at all? Please fix that up at the same time. thanks, greg k-h