EDAC/amd64: set variable gpu_node_map storage-class-specifier to static
Subsystems (2)
PATCH 1/1 EDAC/amd64: set variable gpu_node_map storage-class-specifier to static
smatch reports drivers/edac/amd64_edac.c:990:3: warning: symbol
'gpu_node_map' was not declared. Should it be static?
This variable is only used in its defining file, so it should be static.
--- drivers/edac/amd64_edac.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/edac/amd64_edac.c +1 -1
@@ -984,7 +984,7 @@ static int sys_addr_to_csrow(struct mem_ctl_info *mci, u64 sys_addr)* system and what the lowest AMD Node ID value is for the GPU nodes. Use this * info to fixup the Linux logical "Node ID" value set in the AMD NB code and EDAC. */ -struct local_node_map { +static struct local_node_map {u16 node_count;u16 base_node_id; } gpu_node_map;
Signature · 1 line
2.27.0
Quoted 6 lines · Tom Rix
smatch reports
drivers/edac/amd64_edac.c:990:3: warning: symbol
'gpu_node_map' was not declared. Should it be static?This variable is only used in its defining file, so it should be static.
Hi Tom,
Please use "imperative mood" when describing the change.
"This variable is only used in its defining file, so add the 'static' keyword to it."
or
"Make gpu_node_map static, since it's only used in its defining file."
Also, would a Fixes tag be appropriate?
Otherwise, looks good to me.
Thanks,
Yazen
Borislav Petkov
maintainerQuoted 1 line · Yazen Ghannam
Also, would a Fixes tag be appropriate?
No need. I've squashed this with the topmost commit in tip:ras/core which introduced gpu_node_map in the first place.
Signature · 4 lines
Regards/Gruss,
Boris.
https://people.kernel.org/tglx/notes-about-netiquette