From patchwork Thu Sep 28 13:26:31 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Florian Eckert X-Patchwork-Id: 727564 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 3C9D2E732D9 for ; Thu, 28 Sep 2023 13:26:47 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231966AbjI1N0q (ORCPT ); Thu, 28 Sep 2023 09:26:46 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39454 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231822AbjI1N0o (ORCPT ); Thu, 28 Sep 2023 09:26:44 -0400 Received: from mxout70.expurgate.net (mxout70.expurgate.net [91.198.224.70]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 79AA619B for ; Thu, 28 Sep 2023 06:26:42 -0700 (PDT) Received: from [127.0.0.1] (helo=localhost) by relay.expurgate.net with smtp (Exim 4.92) (envelope-from ) id 1qlr2M-00DmTR-SB for linux-serial@vger.kernel.org; Thu, 28 Sep 2023 15:26:38 +0200 Received: from [195.243.126.94] (helo=securemail.tdt.de) by relay.expurgate.net with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1qlr2M-00DmTD-FH for linux-serial@vger.kernel.org; Thu, 28 Sep 2023 15:26:38 +0200 Received: from securemail.tdt.de (localhost [127.0.0.1]) by securemail.tdt.de (Postfix) with ESMTP id 3F5DB240050 for ; Thu, 28 Sep 2023 15:26:38 +0200 (CEST) Received: from mail.dev.tdt.de (unknown [10.2.4.42]) by securemail.tdt.de (Postfix) with ESMTP id F24AE24004D; Thu, 28 Sep 2023 15:26:37 +0200 (CEST) Received: from localhost.localdomain (unknown [10.2.3.40]) by mail.dev.tdt.de (Postfix) with ESMTPSA id 84C9B32F15; Thu, 28 Sep 2023 15:26:37 +0200 (CEST) From: Florian Eckert To: Eckert.Florian@googlemail.com, gregkh@linuxfoundation.org, jirislaby@kernel.org, pavel@ucw.cz, lee@kernel.org, kabel@kernel.org, u.kleine-koenig@pengutronix.de Cc: linux-kernel@vger.kernel.org, linux-serial@vger.kernel.org, linux-leds@vger.kernel.org, kernel test robot Subject: [PATCH v2 3/4] trigger: ledtrig-tty: move variable definition to the top Date: Thu, 28 Sep 2023 15:26:31 +0200 Message-ID: <20230928132632.200263-4-fe@dev.tdt.de> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20230928132632.200263-1-fe@dev.tdt.de> References: <20230928132632.200263-1-fe@dev.tdt.de> MIME-Version: 1.0 X-purgate-type: clean X-purgate-ID: 151534::1695907598-91376A89-74F90E24/0/0 X-purgate: clean Precedence: bulk List-ID: X-Mailing-List: linux-serial@vger.kernel.org The Intel build robot has complained about this. Hence move the commit of the variable definition to the beginning of the function. Reported-by: kernel test robot Signed-off-by: Florian Eckert --- drivers/leds/trigger/ledtrig-tty.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/leds/trigger/ledtrig-tty.c b/drivers/leds/trigger/ledtrig-tty.c index 8ae0d2d284af..1c6fadf0b856 100644 --- a/drivers/leds/trigger/ledtrig-tty.c +++ b/drivers/leds/trigger/ledtrig-tty.c @@ -82,6 +82,7 @@ static void ledtrig_tty_work(struct work_struct *work) { struct ledtrig_tty_data *trigger_data = container_of(work, struct ledtrig_tty_data, dwork.work); + unsigned long interval = LEDTRIG_TTY_INTERVAL; struct serial_icounter_struct icount; int ret; @@ -124,8 +125,6 @@ static void ledtrig_tty_work(struct work_struct *work) if (icount.rx != trigger_data->rx || icount.tx != trigger_data->tx) { - unsigned long interval = LEDTRIG_TTY_INTERVAL; - led_blink_set_oneshot(trigger_data->led_cdev, &interval, &interval, 0);