[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <34e8fcd94b4a959fe2336485e4722c3b@dev.tdt.de>
Date: Mon, 16 Oct 2023 11:12:15 +0200
From: Florian Eckert <fe@....tdt.de>
To: m.brock@...mierlo.com
Cc: Eckert.Florian@...glemail.com, gregkh@...uxfoundation.org,
jirislaby@...nel.org, pavel@....cz, lee@...nel.org,
kabel@...nel.org, u.kleine-koenig@...gutronix.de,
linux-kernel@...r.kernel.org, linux-serial@...r.kernel.org,
linux-leds@...r.kernel.org, kernel test robot <lkp@...el.com>
Subject: Re: [PATCH v3 3/4] trigger: ledtrig-tty: move variable definition to
the top
On 2023-10-16 10:46, m.brock@...mierlo.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 <lkp@...el.com>
>> Closes:
>> https://lore.kernel.org/oe-kbuild-all/202309270440.IJB24Xap-lkp@intel.com/
>> Signed-off-by: Florian Eckert <fe@....tdt.de>
>> ---
>> @@ -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
Powered by blists - more mailing lists