* [PATCH] ACPI: APEI: mark some functions __init
@ 2023-06-17 8:07 Miaohe Lin
2023-06-20 3:43 ` Shuai Xue
0 siblings, 1 reply; 3+ messages in thread
From: Miaohe Lin @ 2023-06-17 8:07 UTC (permalink / raw)
To: rafael
Cc: lenb, james.morse, tony.luck, bp, linux-acpi, linux-kernel,
linmiaohe
hest_esrc_len() and apei_hest_parse() are only called inside __init
section. So mark them __init too.
Signed-off-by: Miaohe Lin <linmiaohe@huawei.com>
---
drivers/acpi/apei/hest.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/acpi/apei/hest.c b/drivers/acpi/apei/hest.c
index 6aef1ee5e1bd..2d78e808ab8b 100644
--- a/drivers/acpi/apei/hest.c
+++ b/drivers/acpi/apei/hest.c
@@ -55,7 +55,7 @@ static inline bool is_generic_error(struct acpi_hest_header *hest_hdr)
hest_hdr->type == ACPI_HEST_TYPE_GENERIC_ERROR_V2;
}
-static int hest_esrc_len(struct acpi_hest_header *hest_hdr)
+static int __init hest_esrc_len(struct acpi_hest_header *hest_hdr)
{
u16 hest_type = hest_hdr->type;
int len;
@@ -88,7 +88,7 @@ static int hest_esrc_len(struct acpi_hest_header *hest_hdr)
typedef int (*apei_hest_func_t)(struct acpi_hest_header *hest_hdr, void *data);
-static int apei_hest_parse(apei_hest_func_t func, void *data)
+static int __init apei_hest_parse(apei_hest_func_t func, void *data)
{
struct acpi_hest_header *hest_hdr;
int i, rc, len;
--
2.27.0
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] ACPI: APEI: mark some functions __init
2023-06-17 8:07 [PATCH] ACPI: APEI: mark some functions __init Miaohe Lin
@ 2023-06-20 3:43 ` Shuai Xue
2023-06-20 3:58 ` Miaohe Lin
0 siblings, 1 reply; 3+ messages in thread
From: Shuai Xue @ 2023-06-20 3:43 UTC (permalink / raw)
To: Miaohe Lin, rafael
Cc: lenb, james.morse, tony.luck, bp, linux-acpi, linux-kernel
On 2023/6/17 16:07, Miaohe Lin wrote:
> hest_esrc_len() and apei_hest_parse() are only called inside __init
> section. So mark them __init too.
Hi, Miaohe,
should ghes_estatus_pool_init also be marked with __init?
Thanks.
Best Regards,
Shuai
>
> Signed-off-by: Miaohe Lin <linmiaohe@huawei.com>
> ---
> drivers/acpi/apei/hest.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/acpi/apei/hest.c b/drivers/acpi/apei/hest.c
> index 6aef1ee5e1bd..2d78e808ab8b 100644
> --- a/drivers/acpi/apei/hest.c
> +++ b/drivers/acpi/apei/hest.c
> @@ -55,7 +55,7 @@ static inline bool is_generic_error(struct acpi_hest_header *hest_hdr)
> hest_hdr->type == ACPI_HEST_TYPE_GENERIC_ERROR_V2;
> }
>
> -static int hest_esrc_len(struct acpi_hest_header *hest_hdr)
> +static int __init hest_esrc_len(struct acpi_hest_header *hest_hdr)
> {
> u16 hest_type = hest_hdr->type;
> int len;
> @@ -88,7 +88,7 @@ static int hest_esrc_len(struct acpi_hest_header *hest_hdr)
>
> typedef int (*apei_hest_func_t)(struct acpi_hest_header *hest_hdr, void *data);
>
> -static int apei_hest_parse(apei_hest_func_t func, void *data)
> +static int __init apei_hest_parse(apei_hest_func_t func, void *data)
> {
> struct acpi_hest_header *hest_hdr;
> int i, rc, len;
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] ACPI: APEI: mark some functions __init
2023-06-20 3:43 ` Shuai Xue
@ 2023-06-20 3:58 ` Miaohe Lin
0 siblings, 0 replies; 3+ messages in thread
From: Miaohe Lin @ 2023-06-20 3:58 UTC (permalink / raw)
To: Shuai Xue, rafael
Cc: lenb, james.morse, tony.luck, bp, linux-acpi, linux-kernel
On 2023/6/20 11:43, Shuai Xue wrote:
>
>
> On 2023/6/17 16:07, Miaohe Lin wrote:
>> hest_esrc_len() and apei_hest_parse() are only called inside __init
>> section. So mark them __init too.
>
> Hi, Miaohe,
>
> should ghes_estatus_pool_init also be marked with __init?
Yes, I think so. It's only called within __init section too. And it's in fact on my plan
in another patch. Thanks for your comment.
>
> Thanks.
>
> Best Regards,
> Shuai
>
>
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2023-06-20 3:58 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-06-17 8:07 [PATCH] ACPI: APEI: mark some functions __init Miaohe Lin
2023-06-20 3:43 ` Shuai Xue
2023-06-20 3:58 ` Miaohe Lin
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox