public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* Re: [PATCH -next] [POWERPC] Rename get_property to of_get_property: use DEFINE_SPINLOCK() for spinlock
  2021-04-09  9:51 [PATCH -next] [POWERPC] Rename get_property to of_get_property: use DEFINE_SPINLOCK() for spinlock Ye Bin
@ 2021-04-09  9:47 ` weiyongjun (A)
  2021-04-09  9:52   ` weiyongjun (A)
  0 siblings, 1 reply; 3+ messages in thread
From: weiyongjun (A) @ 2021-04-09  9:47 UTC (permalink / raw)
  To: Ye Bin, Benjamin Herrenschmidt
  Cc: linuxppc-dev, linux-kernel, kernel-janitors, Hulk Robot

Rename get_property to of_get_property: use DEFINE_SPINLOCK() for spinlock

~~~~~~~~~~~~~

这是啥模块名?


在 2021/4/9 17:51, Ye Bin 写道:
> 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/macintosh/via-pmu-led.c | 4 +---
>   1 file changed, 1 insertion(+), 3 deletions(-)
>
> diff --git a/drivers/macintosh/via-pmu-led.c b/drivers/macintosh/via-pmu-led.c
> index ae067ab2373d..2502119cff42 100644
> --- a/drivers/macintosh/via-pmu-led.c
> +++ b/drivers/macintosh/via-pmu-led.c
> @@ -27,7 +27,7 @@
>   #include <linux/pmu.h>
>   #include <asm/prom.h>
>   
> -static spinlock_t pmu_blink_lock;
> +static DEFINE_SPINLOCK(pmu_blink_lock);
>   static struct adb_request pmu_blink_req;
>   /* -1: no change, 0: request off, 1: request on */
>   static int requested_change;
> @@ -105,8 +105,6 @@ static int __init via_pmu_led_init(void)
>   		return -ENODEV;
>   	}
>   	of_node_put(dt);
> -
> -	spin_lock_init(&pmu_blink_lock);
>   	/* no outstanding req */
>   	pmu_blink_req.complete = 1;
>   	pmu_blink_req.done = pmu_req_done;
>

^ permalink raw reply	[flat|nested] 3+ messages in thread

* [PATCH -next] [POWERPC] Rename get_property to of_get_property: use DEFINE_SPINLOCK() for spinlock
@ 2021-04-09  9:51 Ye Bin
  2021-04-09  9:47 ` weiyongjun (A)
  0 siblings, 1 reply; 3+ messages in thread
From: Ye Bin @ 2021-04-09  9:51 UTC (permalink / raw)
  To: yebin10, Benjamin Herrenschmidt
  Cc: linuxppc-dev, 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/macintosh/via-pmu-led.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/drivers/macintosh/via-pmu-led.c b/drivers/macintosh/via-pmu-led.c
index ae067ab2373d..2502119cff42 100644
--- a/drivers/macintosh/via-pmu-led.c
+++ b/drivers/macintosh/via-pmu-led.c
@@ -27,7 +27,7 @@
 #include <linux/pmu.h>
 #include <asm/prom.h>
 
-static spinlock_t pmu_blink_lock;
+static DEFINE_SPINLOCK(pmu_blink_lock);
 static struct adb_request pmu_blink_req;
 /* -1: no change, 0: request off, 1: request on */
 static int requested_change;
@@ -105,8 +105,6 @@ static int __init via_pmu_led_init(void)
 		return -ENODEV;
 	}
 	of_node_put(dt);
-
-	spin_lock_init(&pmu_blink_lock);
 	/* no outstanding req */
 	pmu_blink_req.complete = 1;
 	pmu_blink_req.done = pmu_req_done;


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH -next] [POWERPC] Rename get_property to of_get_property: use DEFINE_SPINLOCK() for spinlock
  2021-04-09  9:47 ` weiyongjun (A)
@ 2021-04-09  9:52   ` weiyongjun (A)
  0 siblings, 0 replies; 3+ messages in thread
From: weiyongjun (A) @ 2021-04-09  9:52 UTC (permalink / raw)
  To: Ye Bin, Benjamin Herrenschmidt
  Cc: linuxppc-dev, linux-kernel, kernel-janitors, Hulk Robot


Rename get_property to of_get_property: use DEFINE_SPINLOCK() for spinlock

^^^^^^^^^

Please fix the module name in the patch subject.


> 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/macintosh/via-pmu-led.c | 4 +---
>>   1 file changed, 1 insertion(+), 3 deletions(-)
>>
>> diff --git a/drivers/macintosh/via-pmu-led.c 
>> b/drivers/macintosh/via-pmu-led.c
>> index ae067ab2373d..2502119cff42 100644
>> --- a/drivers/macintosh/via-pmu-led.c
>> +++ b/drivers/macintosh/via-pmu-led.c
>> @@ -27,7 +27,7 @@
>>   #include <linux/pmu.h>
>>   #include <asm/prom.h>
>>   -static spinlock_t pmu_blink_lock;
>> +static DEFINE_SPINLOCK(pmu_blink_lock);
>>   static struct adb_request pmu_blink_req;
>>   /* -1: no change, 0: request off, 1: request on */
>>   static int requested_change;
>> @@ -105,8 +105,6 @@ static int __init via_pmu_led_init(void)
>>           return -ENODEV;
>>       }
>>       of_node_put(dt);
>> -
>> -    spin_lock_init(&pmu_blink_lock);
>>       /* no outstanding req */
>>       pmu_blink_req.complete = 1;
>>       pmu_blink_req.done = pmu_req_done;
>>

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2021-04-09  9:53 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] [POWERPC] Rename get_property to of_get_property: use DEFINE_SPINLOCK() for spinlock Ye Bin
2021-04-09  9:47 ` weiyongjun (A)
2021-04-09  9:52   ` weiyongjun (A)

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox