* [PATCH net-next] rtlwifi: rtl8192de: Use DEFINE_SPINLOCK() for spinlock
@ 2021-04-06 12:16 Huang Guobin
2021-04-17 17:34 ` Kalle Valo
0 siblings, 1 reply; 2+ messages in thread
From: Huang Guobin @ 2021-04-06 12:16 UTC (permalink / raw)
To: huangguobin4, Ping-Ke Shih, Kalle Valo, Jakub Kicinski
Cc: linux-wireless, netdev, linux-kernel
From: Guobin Huang <huangguobin4@huawei.com>
spinlock can be initialized automatically with DEFINE_SPINLOCK()
rather than explicitly calling spin_lock_init().
Reported-by: Hulk Robot <hulkci@huawei.com>
Signed-off-by: Guobin Huang <huangguobin4@huawei.com>
---
.../realtek/rtlwifi/rtl8192de/sw.c | 10 +++-------
1 file changed, 3 insertions(+), 7 deletions(-)
diff --git a/drivers/net/wireless/realtek/rtlwifi/rtl8192de/sw.c b/drivers/net/wireless/realtek/rtlwifi/rtl8192de/sw.c
index 1dbdddce0823..a74724c971b9 100644
--- a/drivers/net/wireless/realtek/rtlwifi/rtl8192de/sw.c
+++ b/drivers/net/wireless/realtek/rtlwifi/rtl8192de/sw.c
@@ -372,18 +372,14 @@ static struct pci_driver rtl92de_driver = {
/* add global spin lock to solve the problem that
* Dul mac register operation on the same time */
-spinlock_t globalmutex_power;
-spinlock_t globalmutex_for_fwdownload;
-spinlock_t globalmutex_for_power_and_efuse;
+DEFINE_SPINLOCK(globalmutex_power);
+DEFINE_SPINLOCK(globalmutex_for_fwdownload);
+DEFINE_SPINLOCK(globalmutex_for_power_and_efuse);
static int __init rtl92de_module_init(void)
{
int ret = 0;
- spin_lock_init(&globalmutex_power);
- spin_lock_init(&globalmutex_for_fwdownload);
- spin_lock_init(&globalmutex_for_power_and_efuse);
-
ret = pci_register_driver(&rtl92de_driver);
if (ret)
WARN_ONCE(true, "rtl8192de: No device found\n");
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH net-next] rtlwifi: rtl8192de: Use DEFINE_SPINLOCK() for spinlock
2021-04-06 12:16 [PATCH net-next] rtlwifi: rtl8192de: Use DEFINE_SPINLOCK() for spinlock Huang Guobin
@ 2021-04-17 17:34 ` Kalle Valo
0 siblings, 0 replies; 2+ messages in thread
From: Kalle Valo @ 2021-04-17 17:34 UTC (permalink / raw)
To: Huang Guobin
Cc: huangguobin4, Ping-Ke Shih, Jakub Kicinski, linux-wireless,
netdev, linux-kernel
Huang Guobin <huangguobin4@huawei.com> wrote:
> From: Guobin Huang <huangguobin4@huawei.com>
>
> spinlock can be initialized automatically with DEFINE_SPINLOCK()
> rather than explicitly calling spin_lock_init().
>
> Reported-by: Hulk Robot <hulkci@huawei.com>
> Signed-off-by: Guobin Huang <huangguobin4@huawei.com>
Patch applied to wireless-drivers-next.git, thanks.
e9642be26a37 rtlwifi: rtl8192de: Use DEFINE_SPINLOCK() for spinlock
--
https://patchwork.kernel.org/project/linux-wireless/patch/1617711406-49649-1-git-send-email-huangguobin4@huawei.com/
https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2021-04-17 17:34 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-04-06 12:16 [PATCH net-next] rtlwifi: rtl8192de: Use DEFINE_SPINLOCK() for spinlock Huang Guobin
2021-04-17 17:34 ` Kalle Valo
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.