All of lore.kernel.org
 help / color / mirror / Atom feed
From: Alexander Shishkin <alexander.shishkin@linux.intel.com>
To: Yu Kuai <yukuai3@huawei.com>,
	mcoquelin.stm32@gmail.com, alexandre.torgue@foss.st.com
Cc: linux-stm32@st-md-mailman.stormreply.com,
	linux-arm-kernel@lists.infradead.org,
	linux-kernel@vger.kernel.org, yukuai3@huawei.com,
	yi.zhang@huawei.com, zhangxiaoxu5@huawei.com,
	alexander.shishkin@linux.intel.com
Subject: Re: [PATCH] stm class: initialize static variable in declaration
Date: Thu, 22 Apr 2021 09:34:55 +0300	[thread overview]
Message-ID: <87o8e6esj4.fsf@ashishki-desk.ger.corp.intel.com> (raw)
In-Reply-To: <20210407125358.4135345-1-yukuai3@huawei.com>

Yu Kuai <yukuai3@huawei.com> 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

WARNING: multiple messages have this Message-ID (diff)
From: Alexander Shishkin <alexander.shishkin@linux.intel.com>
To: Yu Kuai <yukuai3@huawei.com>,
	mcoquelin.stm32@gmail.com, alexandre.torgue@foss.st.com
Cc: linux-stm32@st-md-mailman.stormreply.com,
	linux-arm-kernel@lists.infradead.org,
	linux-kernel@vger.kernel.org, yukuai3@huawei.com,
	yi.zhang@huawei.com, zhangxiaoxu5@huawei.com,
	alexander.shishkin@linux.intel.com
Subject: Re: [PATCH] stm class: initialize static variable in declaration
Date: Thu, 22 Apr 2021 09:34:55 +0300	[thread overview]
Message-ID: <87o8e6esj4.fsf@ashishki-desk.ger.corp.intel.com> (raw)
In-Reply-To: <20210407125358.4135345-1-yukuai3@huawei.com>

Yu Kuai <yukuai3@huawei.com> 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

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

  reply	other threads:[~2021-04-22  6:35 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-04-07 12:53 [PATCH] stm class: initialize static variable in declaration Yu Kuai
2021-04-07 12:53 ` Yu Kuai
2021-04-22  6:34 ` Alexander Shishkin [this message]
2021-04-22  6:34   ` Alexander Shishkin

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87o8e6esj4.fsf@ashishki-desk.ger.corp.intel.com \
    --to=alexander.shishkin@linux.intel.com \
    --cc=alexandre.torgue@foss.st.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-stm32@st-md-mailman.stormreply.com \
    --cc=mcoquelin.stm32@gmail.com \
    --cc=yi.zhang@huawei.com \
    --cc=yukuai3@huawei.com \
    --cc=zhangxiaoxu5@huawei.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.