* [PATCH -next 7/8] acpi/ghes: Make cxl_cper_fifo and cxl_cper_work static
@ 2024-08-19 12:00 Jinjie Ruan
2024-08-21 20:28 ` Ira Weiny
0 siblings, 1 reply; 2+ messages in thread
From: Jinjie Ruan @ 2024-08-19 12:00 UTC (permalink / raw)
To: rafael, lenb, james.morse, tony.luck, bp, ira.weiny,
Jonathan.Cameron, dan.j.williams, dave.jiang, u.kleine-koenig,
xueshuai, shiju.jose, linux-kernel, linux-acpi
Cc: ruanjinjie
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(-)
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
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH -next 7/8] acpi/ghes: Make cxl_cper_fifo and cxl_cper_work static
2024-08-19 12:00 [PATCH -next 7/8] acpi/ghes: Make cxl_cper_fifo and cxl_cper_work static Jinjie Ruan
@ 2024-08-21 20:28 ` Ira Weiny
0 siblings, 0 replies; 2+ messages in thread
From: Ira Weiny @ 2024-08-21 20:28 UTC (permalink / raw)
To: Jinjie Ruan, rafael, lenb, james.morse, tony.luck, bp, ira.weiny,
Jonathan.Cameron, dan.j.williams, dave.jiang, u.kleine-koenig,
xueshuai, shiju.jose, linux-kernel, linux-acpi
Cc: ruanjinjie
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
>
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2024-08-21 20:30 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-08-19 12:00 [PATCH -next 7/8] acpi/ghes: Make cxl_cper_fifo and cxl_cper_work static Jinjie Ruan
2024-08-21 20:28 ` Ira Weiny
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox