Received: by 2002:a25:ab43:0:0:0:0:0 with SMTP id u61csp8745056ybi; Thu, 6 Jun 2019 19:08:29 -0700 (PDT) X-Google-Smtp-Source: APXvYqzok+hdADHJmaGva3Ltr6RipOeo9jE8olJBQbJeED6BVL+1ZkztuYSEaLffhorljL90YI/1 X-Received: by 2002:a63:f44b:: with SMTP id p11mr717003pgk.225.1559873309527; Thu, 06 Jun 2019 19:08:29 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1559873309; cv=none; d=google.com; s=arc-20160816; b=QamvO2sP3GNIagpGYVoYUN7KMLnDHyReZRRzc9SHbyXlX40UsadZ8jeafRT2EV1Jkv 8+iqdD6AHSWULGGAzupyZYi+ZD1wkMSl9Utg1TEkGutsvEMF0AXql3WvZMtSBDZsLkr5 9U15y6IT5dCsw2p+lcPdILh+5juqGt56oHBe7d/BSpt8rjDM5qNF9DLGVGK5koOBvhPw k7SWgJ9+kVYfD79CiwWcdhE1roMTjAonvugLfE2LO85yT2g8fC9tKXo16kZG7hzewbdR IA5O243aAb+HC0lhgkVRm2xq6HhtnpdsKUrgbPlFeoedTJhSvIAtDpAunab/aE7bb4lC Yk+Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:content-disposition :mime-version:message-id:subject:to:from:date:dkim-signature; bh=YFXox/VaEEDxs9pquSJLpjpCJcX389Fmf7dWJx9j5h8=; b=DE/BMgwzJx14BMm2CfBePQwNK/lgQpNi4czfNYldhn96Pvw8iLNMCFxGzHlfQwPMJ6 isvQHO+mAQ2LAmJygAAY1ct196a9xlQhWQpbMTEbCefLnSkkEM6JqlGGZ/44LGL6u9X0 n2Ic2SZnASu0KCH6fGCjO2rzrHzA7semtkyF1nSOsFNOqIfXP38zA4LecT7MxDShTbz7 Bc8UboC6MKz5SMQbtqXs3cSWT8TYichlHgH7OaOkGhIF2HPcV6dCRxEF3q9alwker5sb vnO3I6ca1ymwvMHFySId6dvFNoqosefY96sk0ma7RVwOW9FMYpB6mjeYlHMtLbWVNOiv QfdQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=fd2atQP1; 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; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id x2si606306plo.237.2019.06.06.19.08.13; Thu, 06 Jun 2019 19:08:29 -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=@gmail.com header.s=20161025 header.b=fd2atQP1; 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; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727915AbfFGB5F (ORCPT + 99 others); Thu, 6 Jun 2019 21:57:05 -0400 Received: from mail-pg1-f174.google.com ([209.85.215.174]:43792 "EHLO mail-pg1-f174.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726791AbfFGB5E (ORCPT ); Thu, 6 Jun 2019 21:57:04 -0400 Received: by mail-pg1-f174.google.com with SMTP id f25so266283pgv.10; Thu, 06 Jun 2019 18:57:04 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=date:from:to:subject:message-id:mime-version:content-disposition :user-agent; bh=YFXox/VaEEDxs9pquSJLpjpCJcX389Fmf7dWJx9j5h8=; b=fd2atQP1qdoyel71qRIYtGZmyNwY3U7xfG5j5j9PFq4fbQXsrW2UMnKBeFmoEhiguC n9HlXRU+w0RAb+jWY4vGVguByv1Cc+fMjVTCT2u+yjFqOkDGn7MrLzJuhrWUg+uPGg4O qk001HgwBTacceHi4x4kObsLZv8yj6FKmFozgzLShHEZ4LdSdTwGFyPHWgHb18mkoCwp Vqm5287oGU0mulRrnaiz3OCyZe14Zdald/jqF67bC8QIM+EvPtQ4qDsaGd5H2Duwhant kf9l92zvOmaU7UbQ9a2zCXYVIY4mreFUALU59myk3XAc63iX81hb7ftawXTZePIv6/fi p+zw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:subject:message-id:mime-version :content-disposition:user-agent; bh=YFXox/VaEEDxs9pquSJLpjpCJcX389Fmf7dWJx9j5h8=; b=BaZfWOU8rFMVF+N66hPsF9nwHXZ5x2DyYXALQoCrcpmkpS8ByXFIGCJRk68nhOQvdC FcwJ5QJx+J4oceG0tyN+hcvV5NOVcP+x7vnimIBunxAlMUE+y6YGdA6Z+Ox7G6qJuGwG ZRqMZUAIcEBN3ZAv/+vYXQ/5pCb0OqtjWKC1bArFdTa0YH+75uGQXV7OJs27ETfyoy7q vEASvv+JK/Nt7fhojBnbBuWkYgArIFuYOqdddgur+mM2CfIhhisgxIL8EIZQDiKKb9go uPxduwr5WhpI9CFjJLk6Ht9qV8FszDIOE1u5f9TCiHzW1YBlKQIb/aDLUczlDyaIlPRu YklQ== X-Gm-Message-State: APjAAAWjP1lJFlIl2HX7UXhinDJK/SE0NXPdaUuZeeOYnmsIFFnUNmFb qfJPv8vxSRk+14GA5KNV4CQ= X-Received: by 2002:a62:a511:: with SMTP id v17mr54610684pfm.129.1559872624178; Thu, 06 Jun 2019 18:57:04 -0700 (PDT) Received: from hari-Inspiron-1545 ([183.83.89.153]) by smtp.gmail.com with ESMTPSA id r77sm385030pgr.93.2019.06.06.18.57.01 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 06 Jun 2019 18:57:03 -0700 (PDT) Date: Fri, 7 Jun 2019 07:26:58 +0530 From: Hariprasad Kelam To: Thomas Winischhofer , Greg Kroah-Hartman , linux-usb@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [Patch v2] USB: sisusbvga: Remove unneeded variable Message-ID: <20190607015658.GA4113@hari-Inspiron-1545> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.5.24 (2015-08-30) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 ----- changes in v2: Change return type of sisusb_set_default_mode from int to void as it never fails. --- drivers/usb/misc/sisusbvga/sisusb.c | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/drivers/usb/misc/sisusbvga/sisusb.c b/drivers/usb/misc/sisusbvga/sisusb.c index ea06f1f..2ab9600 100644 --- a/drivers/usb/misc/sisusbvga/sisusb.c +++ b/drivers/usb/misc/sisusbvga/sisusb.c @@ -1747,10 +1747,10 @@ static int sisusb_setup_screen(struct sisusb_usb_data *sisusb, return ret; } -static int sisusb_set_default_mode(struct sisusb_usb_data *sisusb, +static void 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, @@ -1873,8 +1873,6 @@ static int sisusb_set_default_mode(struct sisusb_usb_data *sisusb, } SETIREG(SISCR, 0x34, 0x44); /* we just set std mode #44 */ - - return ret; } static int sisusb_init_gfxcore(struct sisusb_usb_data *sisusb) @@ -2019,7 +2017,7 @@ static int sisusb_init_gfxcore(struct sisusb_usb_data *sisusb) ret |= SETIREG(SISCR, 0x83, 0x00); - ret |= sisusb_set_default_mode(sisusb, 0); + sisusb_set_default_mode(sisusb, 0); ret |= SETIREGAND(SISSR, 0x21, 0xdf); ret |= SETIREGOR(SISSR, 0x01, 0x20); @@ -2246,7 +2244,7 @@ static int sisusb_init_gfxdevice(struct sisusb_usb_data *sisusb, int initscreen) if (sisusb_init_gfxcore(sisusb) == 0) { sisusb->gfxinit = 1; sisusb_get_ramconfig(sisusb); - ret |= sisusb_set_default_mode(sisusb, 1); + sisusb_set_default_mode(sisusb, 1); ret |= sisusb_setup_screen(sisusb, 1, initscreen); } } -- 2.7.4