From patchwork Thu Feb 25 09:29:43 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Junlin Yang X-Patchwork-Id: 12104155 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-15.7 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_GIT autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 5C3B7C433E0 for ; Thu, 25 Feb 2021 13:52:34 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 0ECB964F0A for ; Thu, 25 Feb 2021 13:52:33 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230467AbhBYNwR (ORCPT ); Thu, 25 Feb 2021 08:52:17 -0500 Received: from m12-18.163.com ([220.181.12.18]:50426 "EHLO m12-18.163.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229491AbhBYNwR (ORCPT ); Thu, 25 Feb 2021 08:52:17 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=163.com; s=s110527; h=From:Subject:Date:Message-Id:MIME-Version; bh=gKhar +lYaJ5173fNnZ4PuxYgg0OdolQJPPWgrxXc07o=; b=j9mxuV/K5gBkuy0Kaakde ft/L5hRP73+cjdxRlcBiLLxi8oLRshFNCTdNm+qOkCaOlzz1SUcPohf9IyYdsDwd 3aSKn+TFoT2ml3shUdStv0njXXEitmWL/IRg7zgTWLog7E9/R9p8rNJqZ0sAeMei msQf6bbKoD9bxN+k1D0guE= Received: from yangjunlin.ccdomain.com (unknown [218.17.89.92]) by smtp14 (Coremail) with SMTP id EsCowAAXGPYccjdgbGBCVw--.4398S2; Thu, 25 Feb 2021 17:47:09 +0800 (CST) From: angkery To: dmitry.torokhov@gmail.com, hdegoede@redhat.com, rajatja@google.com, luomeng12@huawei.com, gustavoars@kernel.org Cc: linux-input@vger.kernel.org, linux-kernel@vger.kernel.org, Junlin Yang Subject: [PATCH] Input: i8042: Remove unneeded variable Date: Thu, 25 Feb 2021 17:29:43 +0800 Message-Id: <20210225092943.657-1-angkery@163.com> X-Mailer: git-send-email 2.24.0.windows.2 MIME-Version: 1.0 X-CM-TRANSID: EsCowAAXGPYccjdgbGBCVw--.4398S2 X-Coremail-Antispam: 1Uf129KBjvdXoWrZF1kJryfKr13AFWUWw45Wrg_yoWfuFc_u3 4Yvwn7XFyDAwn8t3ZrArW3Z3sIka12vFW09F4Syw43Ary5J3y3GF1DAryDAw42qr1fWr92 gw17GryrCr4DGjkaLaAFLSUrUUUUjb8apTn2vfkv8UJUUUU8Yxn0WfASr-VFAUDa7-sFnT 9fnUUvcSsGvfC2KfnxnUUI43ZEXa7IUn-BMJUUUUU== X-Originating-IP: [218.17.89.92] X-CM-SenderInfo: 5dqjyvlu16il2tof0z/1tbiLR1EI1SIlFlwFAAAsi Precedence: bulk List-ID: X-Mailing-List: linux-input@vger.kernel.org From: Junlin Yang The variable "delay" is initialized to zero and then returned. So remove the delay variable and return zero. Generated by:scripts/coccinelle/misc/returnvar.cocci Signed-off-by: Junlin Yang Reported-by: kernel test robot Reported-by: kernel test robot --- drivers/input/serio/i8042.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/input/serio/i8042.c b/drivers/input/serio/i8042.c index abae23a..145bda1 100644 --- a/drivers/input/serio/i8042.c +++ b/drivers/input/serio/i8042.c @@ -1126,7 +1126,6 @@ static void i8042_controller_reset(bool s2r_wants_reset) static long i8042_panic_blink(int state) { - long delay = 0; char led; led = (state) ? 0x01 | 0x04 : 0; @@ -1142,7 +1141,7 @@ static long i8042_panic_blink(int state) dbg("%02x -> i8042 (panic blink)\n", led); i8042_write_data(led); DELAY; - return delay; + return 0; } #undef DELAY