* [PATCH -next] soc: fsl: qe: use DEFINE_SPINLOCK() for spinlock
@ 2021-04-09 9:51 Ye Bin
2021-04-09 21:56 ` Leo Li
0 siblings, 1 reply; 3+ messages in thread
From: Ye Bin @ 2021-04-09 9:51 UTC (permalink / raw)
To: yebin10, Qiang Zhao, Li Yang
Cc: linuxppc-dev, linux-arm-kernel, linux-kernel, kernel-janitors,
Hulk Robot
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: Ye Bin <yebin10@huawei.com>
---
drivers/soc/fsl/qe/qe_common.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/drivers/soc/fsl/qe/qe_common.c b/drivers/soc/fsl/qe/qe_common.c
index 654e9246ce6b..a0cb8e746879 100644
--- a/drivers/soc/fsl/qe/qe_common.c
+++ b/drivers/soc/fsl/qe/qe_common.c
@@ -26,7 +26,7 @@
#include <soc/fsl/qe/qe.h>
static struct gen_pool *muram_pool;
-static spinlock_t cpm_muram_lock;
+static DEFINE_SPINLOCK(cpm_muram_lock);
static void __iomem *muram_vbase;
static phys_addr_t muram_pbase;
@@ -54,7 +54,6 @@ int cpm_muram_init(void)
if (muram_pbase)
return 0;
- spin_lock_init(&cpm_muram_lock);
np = of_find_compatible_node(NULL, NULL, "fsl,cpm-muram-data");
if (!np) {
/* try legacy bindings */
^ permalink raw reply related [flat|nested] 3+ messages in thread
* RE: [PATCH -next] soc: fsl: qe: use DEFINE_SPINLOCK() for spinlock
2021-04-09 9:51 [PATCH -next] soc: fsl: qe: use DEFINE_SPINLOCK() for spinlock Ye Bin
@ 2021-04-09 21:56 ` Leo Li
0 siblings, 0 replies; 3+ messages in thread
From: Leo Li @ 2021-04-09 21:56 UTC (permalink / raw)
To: Ye Bin, Qiang Zhao
Cc: linuxppc-dev, linux-arm-kernel, linux-kernel, kernel-janitors,
Hulk Robot
> -----Original Message-----
> From: Ye Bin <yebin10@huawei.com>
> Sent: Friday, April 9, 2021 4:52 AM
> To: yebin10@huawei.com; Qiang Zhao <qiang.zhao@nxp.com>; Leo Li
> <leoyang.li@nxp.com>
> Cc: linuxppc-dev@lists.ozlabs.org; linux-arm-kernel@lists.infradead.org;
> linux-kernel@vger.kernel.org; kernel-janitors@vger.kernel.org; Hulk Robot
> <hulkci@huawei.com>
> Subject: [PATCH -next] soc: fsl: qe: use DEFINE_SPINLOCK() for spinlock
>
> spinlock can be initialized automatically with DEFINE_SPINLOCK() rather than
> explicitly calling spin_lock_init().
The previous version has been applied. Thanks.
>
> Reported-by: Hulk Robot <hulkci@huawei.com>
> Signed-off-by: Ye Bin <yebin10@huawei.com>
> ---
> drivers/soc/fsl/qe/qe_common.c | 3 +--
> 1 file changed, 1 insertion(+), 2 deletions(-)
>
> diff --git a/drivers/soc/fsl/qe/qe_common.c
> b/drivers/soc/fsl/qe/qe_common.c index 654e9246ce6b..a0cb8e746879
> 100644
> --- a/drivers/soc/fsl/qe/qe_common.c
> +++ b/drivers/soc/fsl/qe/qe_common.c
> @@ -26,7 +26,7 @@
> #include <soc/fsl/qe/qe.h>
>
> static struct gen_pool *muram_pool;
> -static spinlock_t cpm_muram_lock;
> +static DEFINE_SPINLOCK(cpm_muram_lock);
> static void __iomem *muram_vbase;
> static phys_addr_t muram_pbase;
>
> @@ -54,7 +54,6 @@ int cpm_muram_init(void)
> if (muram_pbase)
> return 0;
>
> - spin_lock_init(&cpm_muram_lock);
> np = of_find_compatible_node(NULL, NULL, "fsl,cpm-muram-data");
> if (!np) {
> /* try legacy bindings */
^ permalink raw reply [flat|nested] 3+ messages in thread
* [PATCH -next] soc: fsl: qe: Use DEFINE_SPINLOCK() for spinlock
@ 2020-12-23 14:14 Zheng Yongjun
0 siblings, 0 replies; 3+ messages in thread
From: Zheng Yongjun @ 2020-12-23 14:14 UTC (permalink / raw)
To: qiang.zhao, leoyang.li, linuxppc-dev, linux-arm-kernel, linux-kernel
Cc: Zheng Yongjun
spinlock can be initialized automatically with DEFINE_SPINLOCK()
rather than explicitly calling spin_lock_init().
Signed-off-by: Zheng Yongjun <zhengyongjun3@huawei.com>
---
drivers/soc/fsl/qe/qe_common.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/drivers/soc/fsl/qe/qe_common.c b/drivers/soc/fsl/qe/qe_common.c
index 75075591f630..111a36be6983 100644
--- a/drivers/soc/fsl/qe/qe_common.c
+++ b/drivers/soc/fsl/qe/qe_common.c
@@ -26,7 +26,7 @@
#include <soc/fsl/qe/qe.h>
static struct gen_pool *muram_pool;
-static spinlock_t cpm_muram_lock;
+static DEFINE_SPINLOCK(cpm_muram_lock);
static u8 __iomem *muram_vbase;
static phys_addr_t muram_pbase;
@@ -54,7 +54,6 @@ int cpm_muram_init(void)
if (muram_pbase)
return 0;
- spin_lock_init(&cpm_muram_lock);
np = of_find_compatible_node(NULL, NULL, "fsl,cpm-muram-data");
if (!np) {
/* try legacy bindings */
--
2.22.0
^ permalink raw reply related [flat|nested] 3+ messages in thread
end of thread, other threads:[~2021-04-09 21:56 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-04-09 9:51 [PATCH -next] soc: fsl: qe: use DEFINE_SPINLOCK() for spinlock Ye Bin
2021-04-09 21:56 ` Leo Li
-- strict thread matches above, loose matches on Subject: below --
2020-12-23 14:14 [PATCH -next] soc: fsl: qe: Use " Zheng Yongjun
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).