Received: by 2002:a05:6a10:f347:0:0:0:0 with SMTP id d7csp5851511pxu; Wed, 23 Dec 2020 07:05:18 -0800 (PST) X-Google-Smtp-Source: ABdhPJxmxpY4JFCWNoKrSN5opxBkLnCYDdS6FxbQ5epyFcbXXTgJfLCBal0kVyqW1ifxQsKyUDzW X-Received: by 2002:a17:906:144e:: with SMTP id q14mr23935306ejc.150.1608735918408; Wed, 23 Dec 2020 07:05:18 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1608735918; cv=none; d=google.com; s=arc-20160816; b=xtNKOkyZ+XWUuTGjPspdbx9mOO7PwYcvvzbJh1vK2ZQAjxdV8/zS6+QxsypveVfVSl aRKE2kycURu+AY20UueIMW/HPy318hn+vmntlOTqF0Yc3A6YGAXDRtjl8GRdwTQ0YTZ+ oZio3o2gpaQQTrNa8aiFJ/jBprXJaLDzwW0BVH/N9KPh37PshPuKDgz2+zz23/4fAkb9 zgJLxCO1zNIt3G+UV73KCY8Lx/oeDb1HBzzVPdxA/wi+jKyd4rsWSgySvb0SHHfNfWEv 74CrwYvdOMX7D5UNcm9+NXyiysm4NZ4P7273Mcej6MRSD7IZhlZqvAVUfsC3/wSJ9Oum Cz+g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:content-language :in-reply-to:mime-version:user-agent:date:message-id:from:references :to:subject:dkim-signature; bh=Oj1uLQphjM5m67YDASt6Wdxp/c4NyvEZdxL2VxWRwS8=; b=tMFKSwzwwp+nrM42YDkCvFyGZumrHawfzb7FJfScObS69D/ZDwlJGyYyuOTXNEiCHR bFybvME3U3u0gbLwnU2JgQUnAwVqjKBWfgWa1Xzs5aTfS2+VmpGoSSqYUhjQl0cyEb8t t3eZT/UKAYJVn5mJ/mgyNOouDsNgr3ae50al/5rb2Pqg1Xeae47v4v3BbY4yfcBPiLyZ Eb6E0nJW+898Mf9WWXROl7Lo+ZOEHELzud3ot2on+yAJ/Gw64Y/Z71G7DhAHUqNfvruY FNITOGURlr2/oxP6NobFzcoVnLquYW1zDC909Poy/JQYypuQZRI514fCC9uVYJnap+SR OJ6w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=RWOG23Ao; spf=pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-wireless-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id q11si13689620edn.225.2020.12.23.07.04.51; Wed, 23 Dec 2020 07:05:18 -0800 (PST) Received-SPF: pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=RWOG23Ao; spf=pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-wireless-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727759AbgLWPCv (ORCPT + 99 others); Wed, 23 Dec 2020 10:02:51 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40002 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725267AbgLWPCu (ORCPT ); Wed, 23 Dec 2020 10:02:50 -0500 Received: from mail-ed1-x535.google.com (mail-ed1-x535.google.com [IPv6:2a00:1450:4864:20::535]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 50F90C061793; Wed, 23 Dec 2020 07:02:10 -0800 (PST) Received: by mail-ed1-x535.google.com with SMTP id c7so16460656edv.6; Wed, 23 Dec 2020 07:02:10 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=subject:to:references:from:message-id:date:user-agent:mime-version :in-reply-to:content-language:content-transfer-encoding; bh=Oj1uLQphjM5m67YDASt6Wdxp/c4NyvEZdxL2VxWRwS8=; b=RWOG23AoTw1lOJcOYpr6/hBrgxOLufI8yrMWh9D0JjhPq4VQ4NfMXISCMAwQafwBZs tcPHIHpKKJGtUqgvn5Z5+mUhZDzhE+7+HAf/3yWam36cIwFcl2Rmpa/nYjE/btU8wsOl /XggaFpOG7IXRc6yhBcRifDapxygw4xWGvyNI5oP08+tQh7yxyz/kgv9k3zlhDpfdE9O jlGNuSCLz9Q2c/dyL9fuIUNU9K24ePegh7K2PWA7u0xfl0I3aw3h78g2kun5uUlrlYx2 QIPffj+fEOVOVejodpbrgVaI1R+vchNMn6hZOVSUDnx1QmrqFQwh7OZbtXmO2DVGTMvw ItRA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=Oj1uLQphjM5m67YDASt6Wdxp/c4NyvEZdxL2VxWRwS8=; b=t1GKhDWcebDUWQpDTAiOdStJcVsIn/24TEdO8gjP/19H1QFulSDZv7lbL1g+BDdRV0 zIOeLDei/219LdLfKv65cZZJ3kujhd9+yOs7D0THsIO9vX9F3zWifsFI98wEq97xbfjl 4Lj3AJGSxM9pNBc8D/Yb9gopNClggrLG1x9Kdqhbua2mC0xS7AmoBSlLmeId/ffjSmtL jSBCtIQ4DHDezCvPlzye9+NCFLsdUwVy9JLGA6LDg8+HGdBI6JFtd+LsJa1vfSJRtLQ2 S5W6Nt8x5J+IHhs09Tsqy9pT6DnbjFY9eW7u9Tp8io6vjUjRpRG1EVHNX+vLcuAkN2XX eAjw== X-Gm-Message-State: AOAM5318NELdMgZT1VV3s72lXzHumz5xnPZxSzGYgbdL9fmczwIJP2zG egV0cmZo022sPiXlebgsnazj4Woadac= X-Received: by 2002:a05:6402:2710:: with SMTP id y16mr14773513edd.21.1608735728783; Wed, 23 Dec 2020 07:02:08 -0800 (PST) Received: from ?IPv6:2003:ea:8f06:5500:f15a:e2ad:a009:fa06? (p200300ea8f065500f15ae2ada009fa06.dip0.t-ipconnect.de. [2003:ea:8f06:5500:f15a:e2ad:a009:fa06]) by smtp.googlemail.com with ESMTPSA id g10sm30898976edu.97.2020.12.23.07.02.07 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Wed, 23 Dec 2020 07:02:08 -0800 (PST) Subject: Re: [PATCH -next] intel/iwlwifi: use DEFINE_MUTEX (and mutex_init() had been too late) To: Zheng Yongjun , kvalo@codeaurora.org, davem@davemloft.net, kuba@kernel.org, linux-wireless@vger.kernel.org, netdev@vger.kernel.org, linux-kernel@vger.kernel.org References: <20201223141152.32564-1-zhengyongjun3@huawei.com> From: Heiner Kallweit Message-ID: <35876d6b-f5bd-daed-f2e3-cb78e9bc8206@gmail.com> Date: Wed, 23 Dec 2020 16:02:03 +0100 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:78.0) Gecko/20100101 Thunderbird/78.6.0 MIME-Version: 1.0 In-Reply-To: <20201223141152.32564-1-zhengyongjun3@huawei.com> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org On 23.12.2020 15:11, Zheng Yongjun wrote: > Signed-off-by: Zheng Yongjun > --- > 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?