Received: by 2002:a05:7412:d8a:b0:e2:908c:2ebd with SMTP id b10csp2371817rdg; Mon, 16 Oct 2023 02:12:48 -0700 (PDT) X-Google-Smtp-Source: AGHT+IGAsD4toS+DBYX5yppotRZb5XbWIGVMncT6sqqyIfeRltMNj72AFngcTeWYpr/RdsGahs4z X-Received: by 2002:a05:6e02:1189:b0:352:a2f8:99a1 with SMTP id y9-20020a056e02118900b00352a2f899a1mr29128470ili.25.1697447567930; Mon, 16 Oct 2023 02:12:47 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1697447567; cv=none; d=google.com; s=arc-20160816; b=ui9GftD79DEvftwNesW26jeAQehF6CkjpXvrRrfDfC96KlX9u/es9z+cONaR+xMneG D1ow8PbT9dKa1YDZXsZYABvG/7HJUXm2U27GfbpAG5FlpkbqgZhvTIB7n3pCzUDuikSp csr07zS78cGg9QlujIzhzZOlcwa4jGN5bTqGHVZ/m8gNWUCcY88aUMil7N6VRALgMGaE xLK43G7w7befFYU8qNkm5bjyPLbNnCy+u0WsXyt3hKaFoLU+YbDYXDv8zrOpchoZ9VpE DGB8uxEquLZe9N7U0j93LERtKbrf0skqpMh5NkXLhG9pe/BNsivDMalX5LuR0TmG57Cb vmCA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:user-agent:message-id:references:in-reply-to :subject:cc:to:from:date:content-transfer-encoding:mime-version; bh=O3QOCnOeQohbCRUojOlR/ibm7n9HRxr7lENAc8llxmM=; fh=LksU0oMqXS7nBnVf0s5JF4t9RRjp/GydiAujPwGrwYU=; b=As4JaJ5F1PZu1XhBRKx7/6KWoEx89D/muOPOwGkpBeRKHh1H9VMe3doEyLUBc77dq8 uceG6TWwmvwEj+ZiDbD7y/ocJx8wyN3xCoxVGJRcIyBj0oPx6VMyCk+mXo+xXglholtH y5EXNeBdU2JzGlFgAOR35xhae1mlKtfCkiSGlPxrGp3K0MGBve9Gyyu+U5i+DWV3CyPw FMT2aFLTIZr1Qq7kVzj+fk51yvD7XG20bdbLLz5hzf8xG50IsY14eulhQ5A1NWmVO3sm GZNJH3moPlimidbnF4UnQInyGR+6rOCRBFPd6MPd0jAlatxlLMws2Sb/htP+HmeShrac PTwA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.32 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from agentk.vger.email (agentk.vger.email. [23.128.96.32]) by mx.google.com with ESMTPS id c8-20020a633508000000b005ab22c82042si7339743pga.623.2023.10.16.02.12.47 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 16 Oct 2023 02:12:47 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.32 as permitted sender) client-ip=23.128.96.32; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.32 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by agentk.vger.email (Postfix) with ESMTP id 8041D805ADD1; Mon, 16 Oct 2023 02:12:45 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at agentk.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232468AbjJPJMg (ORCPT + 99 others); Mon, 16 Oct 2023 05:12:36 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33728 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232593AbjJPJMe (ORCPT ); Mon, 16 Oct 2023 05:12:34 -0400 Received: from mxout70.expurgate.net (mxout70.expurgate.net [91.198.224.70]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 0E7BFF0 for ; Mon, 16 Oct 2023 02:12:29 -0700 (PDT) Received: from [127.0.0.1] (helo=localhost) by relay.expurgate.net with smtp (Exim 4.92) (envelope-from ) id 1qsJe8-003dDl-Ay; Mon, 16 Oct 2023 11:12:20 +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 1qsJe7-006tet-9U; Mon, 16 Oct 2023 11:12:19 +0200 Received: from securemail.tdt.de (localhost [127.0.0.1]) by securemail.tdt.de (Postfix) with ESMTP id D4BEC240050; Mon, 16 Oct 2023 11:12:18 +0200 (CEST) Received: from mail.dev.tdt.de (unknown [10.2.4.42]) by securemail.tdt.de (Postfix) with ESMTP id 300BB240049; Mon, 16 Oct 2023 11:12:18 +0200 (CEST) Received: from mail.dev.tdt.de (localhost [IPv6:::1]) by mail.dev.tdt.de (Postfix) with ESMTP id 0603A2BD22; Mon, 16 Oct 2023 11:12:16 +0200 (CEST) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII; format=flowed Content-Transfer-Encoding: 7bit Date: Mon, 16 Oct 2023 11:12:15 +0200 From: Florian Eckert To: m.brock@vanmierlo.com Cc: Eckert.Florian@googlemail.com, gregkh@linuxfoundation.org, jirislaby@kernel.org, pavel@ucw.cz, lee@kernel.org, kabel@kernel.org, u.kleine-koenig@pengutronix.de, linux-kernel@vger.kernel.org, linux-serial@vger.kernel.org, linux-leds@vger.kernel.org, kernel test robot Subject: Re: [PATCH v3 3/4] trigger: ledtrig-tty: move variable definition to the top In-Reply-To: <93dcb9f6f218593084f834ba6b450999@vanmierlo.com> References: <20231016071332.597654-1-fe@dev.tdt.de> <20231016071332.597654-4-fe@dev.tdt.de> <93dcb9f6f218593084f834ba6b450999@vanmierlo.com> Message-ID: <34e8fcd94b4a959fe2336485e4722c3b@dev.tdt.de> X-Sender: fe@dev.tdt.de User-Agent: Roundcube Webmail/1.3.17 X-Spam-Status: No, score=-0.8 required=5.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on agentk.vger.email X-purgate-type: clean X-purgate-ID: 151534::1697447540-65079C7C-307F4F24/0/0 X-purgate: clean Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (agentk.vger.email [0.0.0.0]); Mon, 16 Oct 2023 02:12:45 -0700 (PDT) On 2023-10-16 10:46, m.brock@vanmierlo.com wrote: > Florian Eckert wrote on 2023-10-16 09:13: >> Has complained about the following construct: > > Who is "Has" or who/what has complained? The test robot who does not agree with my change in the v1 patchset. >> drivers/leds/trigger/ledtrig-tty.c:362:3: error: a label can only be >> part of a statement and a declaration is not a statement >> >> Hence move the variable definition to the beginning of the function. >> >> Reported-by: kernel test robot >> Closes: >> https://lore.kernel.org/oe-kbuild-all/202309270440.IJB24Xap-lkp@intel.com/ >> Signed-off-by: Florian Eckert >> --- >> @@ -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; >> - > > Is this kernel test robot broken? The test robot does nothing wrong. > I see no label definition here. > And this variable declaration is at the start of a new block which does > not > even require C99 support. I made change in patch set v1, that moves the definition of the variable `interval` into the switch case statement. https://lore.kernel.org/linux-leds/20230926093607.59536-3-fe@dev.tdt.de/ The robot complained about this. So I decided to move the definition of the variable 'interval' to function head to make the test robot happy in the commit. So this commit prepares the code for my change. If it is more common, I can merge this patch [1] into the next patch [2] of this set. [1] https://lore.kernel.org/linux-leds/20231016071332.597654-4-fe@dev.tdt.de/ [2] https://lore.kernel.org/linux-leds/20231016071332.597654-5-fe@dev.tdt.de/ Florian