Linux EDAC development
 help / color / mirror / Atom feed
* [PATCH] EDAC/ghes: change ghes_hw from global to static
@ 2022-04-21 13:53 Tom Rix
  2022-04-29  9:26 ` Borislav Petkov
  0 siblings, 1 reply; 2+ messages in thread
From: Tom Rix @ 2022-04-21 13:53 UTC (permalink / raw)
  To: mchehab, bp, tony.luck, james.morse, rric
  Cc: linux-edac, linux-kernel, Tom Rix

Smatch reports this issue
ghes_edac.c:44:3: warning: symbol 'ghes_hw' was not declared. Should it be static?

ghes_hw is only used in ghes_edac.c so change its
storage-class specifier to static.

Signed-off-by: Tom Rix <trix@redhat.com>
---
 drivers/edac/ghes_edac.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/edac/ghes_edac.c b/drivers/edac/ghes_edac.c
index 2805d5610300..59b0bedc9c24 100644
--- a/drivers/edac/ghes_edac.c
+++ b/drivers/edac/ghes_edac.c
@@ -38,7 +38,7 @@ static struct ghes_pvt *ghes_pvt;
  * This driver's representation of the system hardware, as collected
  * from DMI.
  */
-struct ghes_hw_desc {
+static struct ghes_hw_desc {
 	int num_dimms;
 	struct dimm_info *dimms;
 } ghes_hw;
-- 
2.27.0


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

* Re: [PATCH] EDAC/ghes: change ghes_hw from global to static
  2022-04-21 13:53 [PATCH] EDAC/ghes: change ghes_hw from global to static Tom Rix
@ 2022-04-29  9:26 ` Borislav Petkov
  0 siblings, 0 replies; 2+ messages in thread
From: Borislav Petkov @ 2022-04-29  9:26 UTC (permalink / raw)
  To: Tom Rix; +Cc: mchehab, tony.luck, james.morse, rric, linux-edac, linux-kernel

On Thu, Apr 21, 2022 at 09:53:19AM -0400, Tom Rix wrote:
> Smatch reports this issue
> ghes_edac.c:44:3: warning: symbol 'ghes_hw' was not declared. Should it be static?
> 
> ghes_hw is only used in ghes_edac.c so change its
> storage-class specifier to static.
> 
> Signed-off-by: Tom Rix <trix@redhat.com>
> ---
>  drivers/edac/ghes_edac.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/edac/ghes_edac.c b/drivers/edac/ghes_edac.c
> index 2805d5610300..59b0bedc9c24 100644
> --- a/drivers/edac/ghes_edac.c
> +++ b/drivers/edac/ghes_edac.c
> @@ -38,7 +38,7 @@ static struct ghes_pvt *ghes_pvt;
>   * This driver's representation of the system hardware, as collected
>   * from DMI.
>   */
> -struct ghes_hw_desc {
> +static struct ghes_hw_desc {
>  	int num_dimms;
>  	struct dimm_info *dimms;
>  } ghes_hw;
> -- 

Applied, thanks.

-- 
Regards/Gruss,
    Boris.

https://people.kernel.org/tglx/notes-about-netiquette

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

end of thread, other threads:[~2022-04-29  9:27 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-04-21 13:53 [PATCH] EDAC/ghes: change ghes_hw from global to static Tom Rix
2022-04-29  9:26 ` Borislav Petkov

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