Received: by 2002:a05:7412:f690:b0:e2:908c:2ebd with SMTP id ej16csp216642rdb; Thu, 19 Oct 2023 02:13:31 -0700 (PDT) X-Google-Smtp-Source: AGHT+IFGPVMe2/FEnusec1FYc5dNA9P7OmggqP5mzqj43tanEnC62HU433JHeBmu+rNLwWltn+MZ X-Received: by 2002:a17:902:dac5:b0:1c4:13cd:b85f with SMTP id q5-20020a170902dac500b001c413cdb85fmr2014199plx.5.1697706811321; Thu, 19 Oct 2023 02:13:31 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1697706811; cv=none; d=google.com; s=arc-20160816; b=GWdRcinTGZcPrRfwKnY3a5PiUoG4iDEC6j+kG+UIpB6urv/ela68wuj1agCEEklSS4 2V1QMOH4V8GEetdsRFUaw1V9YUKME1w4mX6N2O/qjM5eOTK+3bGKt/rZueJoiGjonnpe 3dbgJu2fUyKqcLwvtK27h4p9rq7n6Zh3o9XLoMQTXMbB7sF7SdEhhWjoTEdnBOZYvCS2 z7FT+zAI4arhNsnpi0d9ida1RYNwsEbFw/ezHlvtPmfdW9VLJWQ4Ta6LIfcZ8CnTdhXS q4ECIkLgtAcbwgJWLy56oAuyz7T1mC69nqp8iM8oCmhXO4N/wm/WRaEAdwZuAscbLve5 mJmQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:message-id:references :in-reply-to:subject:cc:to:from:date:mime-version; bh=2MzpXX4oJL3yzgXdUUJGlqnWSm6BZW4frLBssdTeszo=; fh=50o+e4ECQO9duwq7LcTgmJ8ZcN7eMISU7XWdLgMiomA=; b=VhrDUZYEC1Pb3FYZQ1csMdF0B14HuZrg6rqShpmBIpHXmQ9WHs734aqX7FAoxryNo6 T05EsCujvDRO+1ZRKNGjYLZc/Fa2DQxZ8YyVkb1Xbaewv0EEYc8+XjzN9r1UwEs/BiKk B49P7RQdgLJtqo2VBzFGca1UcPP52ztsZWUuPEHcvLK1K+JycmJ+Rzi5RCyT2nKHrOx7 SA+CxUh1zHy7+FIkFp86m1avUmMaspacGlmvtQGuxDh5OW19vkHFIbJojyL0DimuocwS ST6RsdMPh/9snCo/To44ABc1Cybt1B61r2eY9RKlwjA+lV0aHL0wigLB2XuGbvVcSSmB QvYg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:3 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from lipwig.vger.email (lipwig.vger.email. [2620:137:e000::3:3]) by mx.google.com with ESMTPS id n16-20020a170902969000b001c62b659f98si1672039plp.79.2023.10.19.02.13.30 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 19 Oct 2023 02:13:31 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:3 as permitted sender) client-ip=2620:137:e000::3:3; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:3 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 lipwig.vger.email (Postfix) with ESMTP id D6FD6826BB84; Thu, 19 Oct 2023 02:13:28 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at lipwig.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231792AbjJSJNS (ORCPT + 99 others); Thu, 19 Oct 2023 05:13:18 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:54106 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1345016AbjJSJNG (ORCPT ); Thu, 19 Oct 2023 05:13:06 -0400 Received: from connect.vanmierlo.com (fieber.vanmierlo.com [84.243.197.177]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 0976218C; Thu, 19 Oct 2023 02:12:57 -0700 (PDT) X-Footer: dmFubWllcmxvLmNvbQ== Received: from roundcube.vanmierlo.com ([192.168.37.37]) (authenticated user m.brock@vanmierlo.com) by connect.vanmierlo.com (Kerio Connect 9.4.2) with ESMTPA; Thu, 19 Oct 2023 11:12:53 +0200 MIME-Version: 1.0 Date: Thu, 19 Oct 2023 11:12:53 +0200 From: m.brock@vanmierlo.com To: Florian Eckert 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: <34e8fcd94b4a959fe2336485e4722c3b@dev.tdt.de> References: <20231016071332.597654-1-fe@dev.tdt.de> <20231016071332.597654-4-fe@dev.tdt.de> <93dcb9f6f218593084f834ba6b450999@vanmierlo.com> <34e8fcd94b4a959fe2336485e4722c3b@dev.tdt.de> Message-ID: <9cecf21f8691d474441f8ff30a9dcb23@vanmierlo.com> X-Sender: m.brock@vanmierlo.com Content-Type: text/plain; charset=US-ASCII; format=flowed Content-Transfer-Encoding: 7bit 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 lipwig.vger.email 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 (lipwig.vger.email [0.0.0.0]); Thu, 19 Oct 2023 02:13:29 -0700 (PDT) Florian Eckert wrote on 2023-10-16 11:12: > 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. You don't have to explain to me, just fix the comment. >>> 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. Yes, please. You're fixing a problem that does not exist yet (and never will), because the patch that introduces it is not yet applied. So fix the proposed patch instead of patching the patch. > [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 Maarten