linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH -next] powerpc/pseries: Drop pointless static qualifier in vpa_debugfs_init()
@ 2019-02-18 12:56 YueHaibing
  2019-02-19  3:47 ` Daniel Axtens
  2019-11-14  9:08 ` Michael Ellerman
  0 siblings, 2 replies; 3+ messages in thread
From: YueHaibing @ 2019-02-18 12:56 UTC (permalink / raw)
  To: Benjamin Herrenschmidt, Paul Mackerras, Michael Ellerman,
	Masahiro Yamada, Aravinda Prasad, Alexey Kardashevskiy,
	Aneesh Kumar K.V, Laurent Dufour
  Cc: YueHaibing, linuxppc-dev, linux-kernel, kernel-janitors

There is no need to have the 'struct dentry *vpa_dir' variable static
since new value always be assigned before use it.

Signed-off-by: YueHaibing <yuehaibing@huawei.com>
---
 arch/powerpc/platforms/pseries/lpar.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/powerpc/platforms/pseries/lpar.c b/arch/powerpc/platforms/pseries/lpar.c
index f2a9f0adc2d3..f649c1b652eb 100644
--- a/arch/powerpc/platforms/pseries/lpar.c
+++ b/arch/powerpc/platforms/pseries/lpar.c
@@ -1263,7 +1263,7 @@ static int __init vpa_debugfs_init(void)
 {
 	char name[16];
 	long i;
-	static struct dentry *vpa_dir;
+	struct dentry *vpa_dir;
 
 	if (!firmware_has_feature(FW_FEATURE_SPLPAR))
 		return 0;




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

* Re: [PATCH -next] powerpc/pseries: Drop pointless static qualifier in vpa_debugfs_init()
  2019-02-18 12:56 [PATCH -next] powerpc/pseries: Drop pointless static qualifier in vpa_debugfs_init() YueHaibing
@ 2019-02-19  3:47 ` Daniel Axtens
  2019-11-14  9:08 ` Michael Ellerman
  1 sibling, 0 replies; 3+ messages in thread
From: Daniel Axtens @ 2019-02-19  3:47 UTC (permalink / raw)
  To: YueHaibing, Benjamin Herrenschmidt, Paul Mackerras,
	Michael Ellerman, Masahiro Yamada, Aravinda Prasad,
	Alexey Kardashevskiy, Aneesh Kumar K.V, Laurent Dufour
  Cc: YueHaibing, linuxppc-dev, linux-kernel, kernel-janitors

Hi YueHaibing, <yuehaibing@huawei.com> writes:

> There is no need to have the 'struct dentry *vpa_dir' variable static
> since new value always be assigned before use it.
>

Much to my surprise this seems to be a correct change. I don't know why
the struct was ever static but it seems to have been this way since the
commit went in in October 2018. And yes, it is set every time when the
function is called (which is exactly once, it's an initcall). I wonder
if once upon a time in an earlier spin of the patch there was a method
to tear the debugfs down, so it was global, and in the revisions that
went away but the static qualifier remained.

Anyway, I think your commit message should have:

Fixes: c6c26fb55e8e ("powerpc/pseries: Export raw per-CPU VPA data via debugfs")

as this is the commit that introduced the issue.

With that change:
Reviewed-by: Daniel Axtens <dja@axtens.net>

Regards,
Daniel

> Signed-off-by: YueHaibing <yuehaibing@huawei.com>
> ---
>  arch/powerpc/platforms/pseries/lpar.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/arch/powerpc/platforms/pseries/lpar.c b/arch/powerpc/platforms/pseries/lpar.c
> index f2a9f0adc2d3..f649c1b652eb 100644
> --- a/arch/powerpc/platforms/pseries/lpar.c
> +++ b/arch/powerpc/platforms/pseries/lpar.c
> @@ -1263,7 +1263,7 @@ static int __init vpa_debugfs_init(void)
>  {
>  	char name[16];
>  	long i;
> -	static struct dentry *vpa_dir;
> +	struct dentry *vpa_dir;
>  
>  	if (!firmware_has_feature(FW_FEATURE_SPLPAR))
>  		return 0;

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

* Re: [PATCH -next] powerpc/pseries: Drop pointless static qualifier in vpa_debugfs_init()
  2019-02-18 12:56 [PATCH -next] powerpc/pseries: Drop pointless static qualifier in vpa_debugfs_init() YueHaibing
  2019-02-19  3:47 ` Daniel Axtens
@ 2019-11-14  9:08 ` Michael Ellerman
  1 sibling, 0 replies; 3+ messages in thread
From: Michael Ellerman @ 2019-11-14  9:08 UTC (permalink / raw)
  To: YueHaibing, Benjamin Herrenschmidt, Paul Mackerras,
	Masahiro Yamada, Aravinda Prasad, Alexey Kardashevskiy,
	Aneesh Kumar K.V, Laurent Dufour
  Cc: linuxppc-dev, kernel-janitors, YueHaibing, linux-kernel

On Mon, 2019-02-18 at 12:56:44 UTC, YueHaibing wrote:
> There is no need to have the 'struct dentry *vpa_dir' variable static
> since new value always be assigned before use it.
> 
> Signed-off-by: YueHaibing <yuehaibing@huawei.com>

Applied to powerpc next, thanks.

https://git.kernel.org/powerpc/c/11dd34f3eae5a468013bb161a1dcf1fecd2ca321

cheers

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

end of thread, other threads:[~2019-11-14  9:08 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-02-18 12:56 [PATCH -next] powerpc/pseries: Drop pointless static qualifier in vpa_debugfs_init() YueHaibing
2019-02-19  3:47 ` Daniel Axtens
2019-11-14  9:08 ` 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).