[PATCH v3 3/7] efi/cper, cxl: Remove cper_cxl.h

Smita Koralahalli posted 7 patches 1 year, 2 months ago
There is a newer version of this series
[PATCH v3 3/7] efi/cper, cxl: Remove cper_cxl.h
Posted by Smita Koralahalli 1 year, 2 months ago
Move the declaration of cxl_cper_print_prot_err() to include/linux/cper.h
to avoid maintaining a separate header file just for this function
declaration. Remove drivers/firmware/efi/cper_cxl.h as its contents have
been reorganized.

Eliminate its corresponding #include directives from source files that
previously included it, since the header file has been removed.

No functional changes.

Signed-off-by: Smita Koralahalli <Smita.KoralahalliChannabasappa@amd.com>
---
 drivers/firmware/efi/cper.c     |  1 -
 drivers/firmware/efi/cper_cxl.c |  1 -
 drivers/firmware/efi/cper_cxl.h | 16 ----------------
 include/linux/cper.h            |  4 ++++
 4 files changed, 4 insertions(+), 18 deletions(-)
 delete mode 100644 drivers/firmware/efi/cper_cxl.h

diff --git a/drivers/firmware/efi/cper.c b/drivers/firmware/efi/cper.c
index ae1953e2b214..928409199a1a 100644
--- a/drivers/firmware/efi/cper.c
+++ b/drivers/firmware/efi/cper.c
@@ -25,7 +25,6 @@
 #include <acpi/ghes.h>
 #include <ras/ras_event.h>
 #include <cxl/event.h>
-#include "cper_cxl.h"
 
 /*
  * CPER record ID need to be unique even after reboot, because record
diff --git a/drivers/firmware/efi/cper_cxl.c b/drivers/firmware/efi/cper_cxl.c
index 64c0dd27be6e..8a7667faf953 100644
--- a/drivers/firmware/efi/cper_cxl.c
+++ b/drivers/firmware/efi/cper_cxl.c
@@ -9,7 +9,6 @@
 
 #include <linux/cper.h>
 #include <cxl/event.h>
-#include "cper_cxl.h"
 
 static const char * const prot_err_agent_type_strs[] = {
 	"Restricted CXL Device",
diff --git a/drivers/firmware/efi/cper_cxl.h b/drivers/firmware/efi/cper_cxl.h
deleted file mode 100644
index 5ce1401ee17a..000000000000
--- a/drivers/firmware/efi/cper_cxl.h
+++ /dev/null
@@ -1,16 +0,0 @@
-/* SPDX-License-Identifier: GPL-2.0-only */
-/*
- * UEFI Common Platform Error Record (CPER) support for CXL Section.
- *
- * Copyright (C) 2022 Advanced Micro Devices, Inc.
- *
- * Author: Smita Koralahalli <Smita.KoralahalliChannabasappa@amd.com>
- */
-
-#ifndef LINUX_CPER_CXL_H
-#define LINUX_CPER_CXL_H
-
-void cxl_cper_print_prot_err(const char *pfx,
-			     const struct cxl_cper_sec_prot_err *prot_err);
-
-#endif //__CPER_CXL_
diff --git a/include/linux/cper.h b/include/linux/cper.h
index 5c6d4d5b9975..0ed60a91eca9 100644
--- a/include/linux/cper.h
+++ b/include/linux/cper.h
@@ -605,4 +605,8 @@ void cper_estatus_print(const char *pfx,
 int cper_estatus_check_header(const struct acpi_hest_generic_status *estatus);
 int cper_estatus_check(const struct acpi_hest_generic_status *estatus);
 
+struct cxl_cper_sec_prot_err;
+void cxl_cper_print_prot_err(const char *pfx,
+			     const struct cxl_cper_sec_prot_err *prot_err);
+
 #endif
-- 
2.17.1
Re: [PATCH v3 3/7] efi/cper, cxl: Remove cper_cxl.h
Posted by Ira Weiny 1 year, 2 months ago
Smita Koralahalli wrote:
> Move the declaration of cxl_cper_print_prot_err() to include/linux/cper.h
> to avoid maintaining a separate header file just for this function
> declaration. Remove drivers/firmware/efi/cper_cxl.h as its contents have
> been reorganized.
> 
> Eliminate its corresponding #include directives from source files that
> previously included it, since the header file has been removed.
> 
> No functional changes.
> 
> Signed-off-by: Smita Koralahalli <Smita.KoralahalliChannabasappa@amd.com>

I was going to make a comment on this header being pretty sparse after
patch 2.  Thanks!

Reviewed-by: Ira Weiny <ira.weiny@intel.com>
Re: [PATCH v3 3/7] efi/cper, cxl: Remove cper_cxl.h
Posted by Jonathan Cameron 1 year, 2 months ago
On Tue, 19 Nov 2024 00:39:11 +0000
Smita Koralahalli <Smita.KoralahalliChannabasappa@amd.com> wrote:

> Move the declaration of cxl_cper_print_prot_err() to include/linux/cper.h
> to avoid maintaining a separate header file just for this function
> declaration. Remove drivers/firmware/efi/cper_cxl.h as its contents have
> been reorganized.
> 
> Eliminate its corresponding #include directives from source files that
> previously included it, since the header file has been removed.

You lost me on this one.  Looks like only place these existed was the now
empty header?  I'd not mention that as it's just bit confusing.


> 
> No functional changes.
> 
> Signed-off-by: Smita Koralahalli <Smita.KoralahalliChannabasappa@amd.com>
> diff --git a/drivers/firmware/efi/cper_cxl.h b/drivers/firmware/efi/cper_cxl.h
> deleted file mode 100644
> index 5ce1401ee17a..000000000000
> --- a/drivers/firmware/efi/cper_cxl.h
> +++ /dev/null
> @@ -1,16 +0,0 @@
> -/* SPDX-License-Identifier: GPL-2.0-only */
> -/*
> - * UEFI Common Platform Error Record (CPER) support for CXL Section.
> - *
> - * Copyright (C) 2022 Advanced Micro Devices, Inc.
> - *
> - * Author: Smita Koralahalli <Smita.KoralahalliChannabasappa@amd.com>
> - */
> -
> -#ifndef LINUX_CPER_CXL_H
> -#define LINUX_CPER_CXL_H
> -
> -void cxl_cper_print_prot_err(const char *pfx,
> -			     const struct cxl_cper_sec_prot_err *prot_err);
> -
> -#endif //__CPER_CXL_
Re: [PATCH v3 3/7] efi/cper, cxl: Remove cper_cxl.h
Posted by Smita Koralahalli 1 year, 2 months ago
On 11/26/2024 7:51 AM, Jonathan Cameron wrote:
> On Tue, 19 Nov 2024 00:39:11 +0000
> Smita Koralahalli <Smita.KoralahalliChannabasappa@amd.com> wrote:
> 
>> Move the declaration of cxl_cper_print_prot_err() to include/linux/cper.h
>> to avoid maintaining a separate header file just for this function
>> declaration. Remove drivers/firmware/efi/cper_cxl.h as its contents have
>> been reorganized.
>>
>> Eliminate its corresponding #include directives from source files that
>> previously included it, since the header file has been removed.
> 
> You lost me on this one.  Looks like only place these existed was the now
> empty header?  I'd not mention that as it's just bit confusing.

Yes. I will remove this sentence.

Thanks
Smita
> 
> 
>>
>> No functional changes.
>>
>> Signed-off-by: Smita Koralahalli <Smita.KoralahalliChannabasappa@amd.com>
>> diff --git a/drivers/firmware/efi/cper_cxl.h b/drivers/firmware/efi/cper_cxl.h
>> deleted file mode 100644
>> index 5ce1401ee17a..000000000000
>> --- a/drivers/firmware/efi/cper_cxl.h
>> +++ /dev/null
>> @@ -1,16 +0,0 @@
>> -/* SPDX-License-Identifier: GPL-2.0-only */
>> -/*
>> - * UEFI Common Platform Error Record (CPER) support for CXL Section.
>> - *
>> - * Copyright (C) 2022 Advanced Micro Devices, Inc.
>> - *
>> - * Author: Smita Koralahalli <Smita.KoralahalliChannabasappa@amd.com>
>> - */
>> -
>> -#ifndef LINUX_CPER_CXL_H
>> -#define LINUX_CPER_CXL_H
>> -
>> -void cxl_cper_print_prot_err(const char *pfx,
>> -			     const struct cxl_cper_sec_prot_err *prot_err);
>> -
>> -#endif //__CPER_CXL_