linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] powerpc/eeh: Drop redundant spinlock initialization
@ 2022-05-10  9:53 Haowen Bai
  2022-05-10 18:54 ` Tyrel Datwyler
  0 siblings, 1 reply; 4+ messages in thread
From: Haowen Bai @ 2022-05-10  9:53 UTC (permalink / raw)
  To: Russell Currey, Oliver O'Halloran, Michael Ellerman,
	Benjamin Herrenschmidt, Paul Mackerras
  Cc: Haowen Bai, linuxppc-dev, linux-kernel

slot_errbuf_lock has declared and initialized by DEFINE_SPINLOCK,
so we don't need to spin_lock_init again, drop it.

Signed-off-by: Haowen Bai <baihaowen@meizu.com>
---
 arch/powerpc/platforms/pseries/eeh_pseries.c | 1 -
 1 file changed, 1 deletion(-)

diff --git a/arch/powerpc/platforms/pseries/eeh_pseries.c b/arch/powerpc/platforms/pseries/eeh_pseries.c
index f9af879c0222..77b476093e06 100644
--- a/arch/powerpc/platforms/pseries/eeh_pseries.c
+++ b/arch/powerpc/platforms/pseries/eeh_pseries.c
@@ -848,7 +848,6 @@ static int __init eeh_pseries_init(void)
 	}
 
 	/* Initialize error log lock and size */
-	spin_lock_init(&slot_errbuf_lock);
 	eeh_error_buf_size = rtas_token("rtas-error-log-max");
 	if (eeh_error_buf_size == RTAS_UNKNOWN_SERVICE) {
 		pr_info("%s: unknown EEH error log size\n",
-- 
2.7.4


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

* Re: [PATCH] powerpc/eeh: Drop redundant spinlock initialization
  2022-05-10  9:53 [PATCH] powerpc/eeh: Drop redundant spinlock initialization Haowen Bai
@ 2022-05-10 18:54 ` Tyrel Datwyler
  2022-05-11  1:27   ` [PATCH V2] " Haowen Bai
  0 siblings, 1 reply; 4+ messages in thread
From: Tyrel Datwyler @ 2022-05-10 18:54 UTC (permalink / raw)
  To: Haowen Bai, Russell Currey, Oliver O'Halloran,
	Michael Ellerman, Benjamin Herrenschmidt, Paul Mackerras
  Cc: linuxppc-dev, linux-kernel

On 5/10/22 02:53, Haowen Bai wrote:
> slot_errbuf_lock has declared and initialized by DEFINE_SPINLOCK,
> so we don't need to spin_lock_init again, drop it.
> 
> Signed-off-by: Haowen Bai <baihaowen@meizu.com>
> ---
>  arch/powerpc/platforms/pseries/eeh_pseries.c | 1 -
>  1 file changed, 1 deletion(-)
> 
> diff --git a/arch/powerpc/platforms/pseries/eeh_pseries.c b/arch/powerpc/platforms/pseries/eeh_pseries.c
> index f9af879c0222..77b476093e06 100644
> --- a/arch/powerpc/platforms/pseries/eeh_pseries.c
> +++ b/arch/powerpc/platforms/pseries/eeh_pseries.c
> @@ -848,7 +848,6 @@ static int __init eeh_pseries_init(void)
>  	}
> 
>  	/* Initialize error log lock and size */

Update the comment, or just drop it entirely?

-Tyrel

> -	spin_lock_init(&slot_errbuf_lock);
>  	eeh_error_buf_size = rtas_token("rtas-error-log-max");
>  	if (eeh_error_buf_size == RTAS_UNKNOWN_SERVICE) {
>  		pr_info("%s: unknown EEH error log size\n",


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

* [PATCH V2] powerpc/eeh: Drop redundant spinlock initialization
  2022-05-10 18:54 ` Tyrel Datwyler
@ 2022-05-11  1:27   ` Haowen Bai
  2022-05-24 11:09     ` Michael Ellerman
  0 siblings, 1 reply; 4+ messages in thread
From: Haowen Bai @ 2022-05-11  1:27 UTC (permalink / raw)
  To: tyreld
  Cc: baihaowen, benh, linux-kernel, linuxppc-dev, mpe, oohall, paulus, ruscur

slot_errbuf_lock has declared and initialized by DEFINE_SPINLOCK,
so we don't need to spin_lock_init again, drop it.

Signed-off-by: Haowen Bai <baihaowen@meizu.com>
---
V1->V2: update comment

 arch/powerpc/platforms/pseries/eeh_pseries.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/arch/powerpc/platforms/pseries/eeh_pseries.c b/arch/powerpc/platforms/pseries/eeh_pseries.c
index f9af879c0222..abf0b577d055 100644
--- a/arch/powerpc/platforms/pseries/eeh_pseries.c
+++ b/arch/powerpc/platforms/pseries/eeh_pseries.c
@@ -847,8 +847,7 @@ static int __init eeh_pseries_init(void)
 		return -EINVAL;
 	}
 
-	/* Initialize error log lock and size */
-	spin_lock_init(&slot_errbuf_lock);
+	/* Initialize error log size */
 	eeh_error_buf_size = rtas_token("rtas-error-log-max");
 	if (eeh_error_buf_size == RTAS_UNKNOWN_SERVICE) {
 		pr_info("%s: unknown EEH error log size\n",
-- 
2.7.4


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

* Re: [PATCH V2] powerpc/eeh: Drop redundant spinlock initialization
  2022-05-11  1:27   ` [PATCH V2] " Haowen Bai
@ 2022-05-24 11:09     ` Michael Ellerman
  0 siblings, 0 replies; 4+ messages in thread
From: Michael Ellerman @ 2022-05-24 11:09 UTC (permalink / raw)
  To: tyreld, Haowen Bai
  Cc: paulus, linux-kernel, oohall, benh, ruscur, mpe, linuxppc-dev

On Wed, 11 May 2022 09:27:56 +0800, Haowen Bai wrote:
> slot_errbuf_lock has declared and initialized by DEFINE_SPINLOCK,
> so we don't need to spin_lock_init again, drop it.
> 
> 

Applied to powerpc/next.

[1/1] powerpc/eeh: Drop redundant spinlock initialization
      https://git.kernel.org/powerpc/c/3def164a5cedad9117859dd4610cae2cc59cb6d2

cheers

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

end of thread, other threads:[~2022-05-24 11:15 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-05-10  9:53 [PATCH] powerpc/eeh: Drop redundant spinlock initialization Haowen Bai
2022-05-10 18:54 ` Tyrel Datwyler
2022-05-11  1:27   ` [PATCH V2] " Haowen Bai
2022-05-24 11:09     ` Michael Ellerman

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).