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 <redacted>
---
arch/powerpc/platforms/pseries/lpar.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
From: Daniel Axtens <hidden> Date: 2019-02-19 03:47:10
Hi YueHaibing, [off-list ref] 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 <redacted>
Regards,
Daniel
From: Michael Ellerman <hidden> Date: 2019-11-14 09:08:51
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 <redacted>