* [PATCH -next] staging: vc04_services: use DEFINE_MUTEX (and mutex_init() had been too late)
@ 2020-12-23 14:11 Zheng Yongjun
2020-12-23 14:18 ` Greg KH
2021-01-04 14:01 ` Dan Carpenter
0 siblings, 2 replies; 3+ messages in thread
From: Zheng Yongjun @ 2020-12-23 14:11 UTC (permalink / raw)
To: nsaenzjulienne, bcm-kernel-feedback-list, devel, linux-kernel
Cc: Zheng Yongjun
Signed-off-by: Zheng Yongjun <zhengyongjun3@huawei.com>
---
.../vc04_services/interface/vchiq_arm/vchiq_connected.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_connected.c b/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_connected.c
index 79b75efa6868..864253866155 100644
--- a/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_connected.c
+++ b/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_connected.c
@@ -12,13 +12,12 @@ static int g_connected;
static int g_num_deferred_callbacks;
static VCHIQ_CONNECTED_CALLBACK_T g_deferred_callback[MAX_CALLBACKS];
static int g_once_init;
-static struct mutex g_connected_mutex;
+static DEFINE_MUTEX(g_connected_mutex);
/* Function to initialize our lock */
static void connected_init(void)
{
if (!g_once_init) {
- mutex_init(&g_connected_mutex);
g_once_init = 1;
}
}
--
2.22.0
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH -next] staging: vc04_services: use DEFINE_MUTEX (and mutex_init() had been too late)
2020-12-23 14:11 [PATCH -next] staging: vc04_services: use DEFINE_MUTEX (and mutex_init() had been too late) Zheng Yongjun
@ 2020-12-23 14:18 ` Greg KH
2021-01-04 14:01 ` Dan Carpenter
1 sibling, 0 replies; 3+ messages in thread
From: Greg KH @ 2020-12-23 14:18 UTC (permalink / raw)
To: Zheng Yongjun
Cc: nsaenzjulienne, bcm-kernel-feedback-list, devel, linux-kernel
On Wed, Dec 23, 2020 at 10:11:29PM +0800, Zheng Yongjun wrote:
> Signed-off-by: Zheng Yongjun <zhengyongjun3@huawei.com>
> ---
> .../vc04_services/interface/vchiq_arm/vchiq_connected.c | 3 +--
> 1 file changed, 1 insertion(+), 2 deletions(-)
I can not take patches without any changelog text :(
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH -next] staging: vc04_services: use DEFINE_MUTEX (and mutex_init() had been too late)
2020-12-23 14:11 [PATCH -next] staging: vc04_services: use DEFINE_MUTEX (and mutex_init() had been too late) Zheng Yongjun
2020-12-23 14:18 ` Greg KH
@ 2021-01-04 14:01 ` Dan Carpenter
1 sibling, 0 replies; 3+ messages in thread
From: Dan Carpenter @ 2021-01-04 14:01 UTC (permalink / raw)
To: Zheng Yongjun
Cc: nsaenzjulienne, bcm-kernel-feedback-list, devel, linux-kernel
On Wed, Dec 23, 2020 at 10:11:29PM +0800, Zheng Yongjun wrote:
> Signed-off-by: Zheng Yongjun <zhengyongjun3@huawei.com>
> ---
> .../vc04_services/interface/vchiq_arm/vchiq_connected.c | 3 +--
> 1 file changed, 1 insertion(+), 2 deletions(-)
>
> diff --git a/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_connected.c b/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_connected.c
> index 79b75efa6868..864253866155 100644
> --- a/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_connected.c
> +++ b/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_connected.c
> @@ -12,13 +12,12 @@ static int g_connected;
> static int g_num_deferred_callbacks;
> static VCHIQ_CONNECTED_CALLBACK_T g_deferred_callback[MAX_CALLBACKS];
> static int g_once_init;
> -static struct mutex g_connected_mutex;
> +static DEFINE_MUTEX(g_connected_mutex);
>
> /* Function to initialize our lock */
> static void connected_init(void)
> {
> if (!g_once_init) {
> - mutex_init(&g_connected_mutex);
> g_once_init = 1;
> }
Delete the extra curly braces.
regards,
dan carpenter
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2021-01-04 14:04 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-12-23 14:11 [PATCH -next] staging: vc04_services: use DEFINE_MUTEX (and mutex_init() had been too late) Zheng Yongjun
2020-12-23 14:18 ` Greg KH
2021-01-04 14:01 ` Dan Carpenter
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).