Re: [PATCH net-next] batman-adv: Fix the wrong definition

From: yajun . deng
Date: Thu Oct 28 2021 - 03:49:22 EST


October 28, 2021 3:35 PM, "Antonio Quartulli" <a@xxxxxxxxxxx> 写到:

> Hi,
>
> On 28/10/2021 09:23, Yajun Deng wrote:
>
>> There are three variables that are required at most,
>> no need to define four variables.
>>
>> Fixes: 0fa4c30d710d ("batman-adv: Make sysfs support optional")
>> Signed-off-by: Yajun Deng <yajun.deng@xxxxxxxxx>
>
> NAK.
>
> kobject_uevent_env() does not know how many items are stored in the
> array and thus requires it to be NULL terminated.
>
> Please check the following for reference:
>
> https://elixir.bootlin.com/linux/v5.15-rc6/source/lib/kobject_uevent.c#L548
>
Oh, I didn't notice there.
> OTOH I guess we could still use '{}' for the initialization.
>
> Regards,
>
> --
> Antonio Quartulli