diff mbox series

[-next,7/8] acpi/ghes: Make cxl_cper_fifo and cxl_cper_work static

Message ID 20240819120055.3884953-1-ruanjinjie@huawei.com (mailing list archive)
State Handled Elsewhere, archived
Headers show
Series None | expand

Commit Message

Jinjie Ruan Aug. 19, 2024, noon UTC
The sparse tool complains as follows:

drivers/acpi/apei/ghes.c:681:1: warning:
	symbol 'cxl_cper_fifo' was not declared. Should it be static?

drivers/acpi/apei/ghes.c:685:20: warning:
	symbol 'cxl_cper_work' was not declared. Should it be static?

These symbols are not used outside ghes.c, so marks them static.

Signed-off-by: Jinjie Ruan <ruanjinjie@huawei.com>
---
 drivers/acpi/apei/ghes.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

Comments

Ira Weiny Aug. 21, 2024, 8:28 p.m. UTC | #1
Jinjie Ruan wrote:
> The sparse tool complains as follows:
> 
> drivers/acpi/apei/ghes.c:681:1: warning:
> 	symbol 'cxl_cper_fifo' was not declared. Should it be static?
> 
> drivers/acpi/apei/ghes.c:685:20: warning:
> 	symbol 'cxl_cper_work' was not declared. Should it be static?
> 
> These symbols are not used outside ghes.c, so marks them static.

Reviewed-by: Ira Weiny <ira.weiny@intel.com>

> 
> Signed-off-by: Jinjie Ruan <ruanjinjie@huawei.com>
> ---
>  drivers/acpi/apei/ghes.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/acpi/apei/ghes.c b/drivers/acpi/apei/ghes.c
> index 623cc0cb4a65..df31b3acaf0c 100644
> --- a/drivers/acpi/apei/ghes.c
> +++ b/drivers/acpi/apei/ghes.c
> @@ -678,11 +678,11 @@ static void ghes_defer_non_standard_event(struct acpi_hest_generic_data *gdata,
>  
>  /* Room for 8 entries for each of the 4 event log queues */
>  #define CXL_CPER_FIFO_DEPTH 32
> -DEFINE_KFIFO(cxl_cper_fifo, struct cxl_cper_work_data, CXL_CPER_FIFO_DEPTH);
> +static DEFINE_KFIFO(cxl_cper_fifo, struct cxl_cper_work_data, CXL_CPER_FIFO_DEPTH);
>  
>  /* Synchronize schedule_work() with cxl_cper_work changes */
>  static DEFINE_SPINLOCK(cxl_cper_work_lock);
> -struct work_struct *cxl_cper_work;
> +static struct work_struct *cxl_cper_work;
>  
>  static void cxl_cper_post_event(enum cxl_event_type event_type,
>  				struct cxl_cper_event_rec *rec)
> -- 
> 2.34.1
>
diff mbox series

Patch

diff --git a/drivers/acpi/apei/ghes.c b/drivers/acpi/apei/ghes.c
index 623cc0cb4a65..df31b3acaf0c 100644
--- a/drivers/acpi/apei/ghes.c
+++ b/drivers/acpi/apei/ghes.c
@@ -678,11 +678,11 @@  static void ghes_defer_non_standard_event(struct acpi_hest_generic_data *gdata,
 
 /* Room for 8 entries for each of the 4 event log queues */
 #define CXL_CPER_FIFO_DEPTH 32
-DEFINE_KFIFO(cxl_cper_fifo, struct cxl_cper_work_data, CXL_CPER_FIFO_DEPTH);
+static DEFINE_KFIFO(cxl_cper_fifo, struct cxl_cper_work_data, CXL_CPER_FIFO_DEPTH);
 
 /* Synchronize schedule_work() with cxl_cper_work changes */
 static DEFINE_SPINLOCK(cxl_cper_work_lock);
-struct work_struct *cxl_cper_work;
+static struct work_struct *cxl_cper_work;
 
 static void cxl_cper_post_event(enum cxl_event_type event_type,
 				struct cxl_cper_event_rec *rec)