From: Heiner Kallweit <hkallweit1@gmail.com>
To: Zheng Yongjun <zhengyongjun3@huawei.com>,
kvalo@codeaurora.org, davem@davemloft.net, kuba@kernel.org,
linux-wireless@vger.kernel.org, netdev@vger.kernel.org,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH -next] intel/iwlwifi: use DEFINE_MUTEX (and mutex_init() had been too late)
Date: Wed, 23 Dec 2020 16:02:03 +0100 [thread overview]
Message-ID: <35876d6b-f5bd-daed-f2e3-cb78e9bc8206@gmail.com> (raw)
In-Reply-To: <20201223141152.32564-1-zhengyongjun3@huawei.com>
On 23.12.2020 15:11, Zheng Yongjun wrote:
> Signed-off-by: Zheng Yongjun <zhengyongjun3@huawei.com>
> ---
> drivers/net/wireless/intel/iwlwifi/iwl-drv.c | 4 +---
> 1 file changed, 1 insertion(+), 3 deletions(-)
>
> diff --git a/drivers/net/wireless/intel/iwlwifi/iwl-drv.c b/drivers/net/wireless/intel/iwlwifi/iwl-drv.c
> index 9dcd2e990c9c..71119044382f 100644
> --- a/drivers/net/wireless/intel/iwlwifi/iwl-drv.c
> +++ b/drivers/net/wireless/intel/iwlwifi/iwl-drv.c
> @@ -133,7 +133,7 @@ enum {
> };
>
> /* Protects the table contents, i.e. the ops pointer & drv list */
> -static struct mutex iwlwifi_opmode_table_mtx;
> +static DEFINE_MUTEX(iwlwifi_opmode_table_mtx);
> static struct iwlwifi_opmode_table {
> const char *name; /* name: iwldvm, iwlmvm, etc */
> const struct iwl_op_mode_ops *ops; /* pointer to op_mode ops */
> @@ -1786,8 +1786,6 @@ static int __init iwl_drv_init(void)
> {
> int i, err;
>
> - mutex_init(&iwlwifi_opmode_table_mtx);
> -
> for (i = 0; i < ARRAY_SIZE(iwlwifi_opmode_table); i++)
> INIT_LIST_HEAD(&iwlwifi_opmode_table[i].drv);
>
>
The change itself is ok, but:
- commit message is missing (did you run checkpatch?)
- Why should the current mutex_init() call be too late?
prev parent reply other threads:[~2020-12-23 15:03 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-12-23 14:11 Zheng Yongjun
2020-12-23 15:02 ` Heiner Kallweit [this message]
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=35876d6b-f5bd-daed-f2e3-cb78e9bc8206@gmail.com \
--to=hkallweit1@gmail.com \
--cc=davem@davemloft.net \
--cc=kuba@kernel.org \
--cc=kvalo@codeaurora.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-wireless@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=zhengyongjun3@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®