Re: [PATCH] stm class: initialize static variable in declaration
From: Alexander Shishkin
Date: Thu Apr 22 2021 - 02:35:07 EST
Yu Kuai <yukuai3@xxxxxxxxxx> writes:
> mutex lock can be initialized automatically with DEFINE_MUTEX()
> rather than explicitly calling mutex_init().
>
> list head can be initialized automatically with LIST_HEAD() rather
> than explicitly calling INIT_LIST_HEAD().
>
> srcu_struct can be initialized automatically with DEFINE_STATIC_SRCU()
> rather than explicitly calling init_srcu_struct().
What's missing is the "why". We can do these or we can keep them as they
are. Each choice has impact on .text/.data, for instance. Why is one
preferred over the other?
Each patch should contain some form of analysis that shows that the
author thought about why they made the patch in the first
place.
And please learn not to spam the STMicro people with patches for System
Trace Module. Sometimes the same acronym can mean multiple different
things. This is another sign that the patch author spent zero time
getting to know the code that they are patching.
Regards,
--
Alex