Skip to contentSkip to conversation

platform/x86: hp-bioscfg: Removed needless asm-generic

PATCH In review Tanzir Hasan 3 participants 3 messages Dec 19, 2023 – Dec 21, 2023

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 platform/x86: hp-bioscfg: Removed needless asm-generic

asm-generic/posix-types.h is obtained through bioscfg.h so there is no need to include it. It is also an asm-generic file which should be avoided if possible.

---
 drivers/platform/x86/hp/hp-bioscfg/passwdobj-attributes.c | 1 -
 1 file changed, 1 deletion(-)
drivers/platform/x86/hp/hp-bioscfg/passwdobj-attributes.c +0 -1
index 03d0188804ba..f7efe217a4bb 100644
@@ -7,7 +7,6 @@
  */
 
 #include "bioscfg.h"
-#include <asm-generic/posix_types.h>
 
 GET_INSTANCE_ID(password);
 /*

---
base-commit: 3fb7c66ac51a87984e043d9f47b7a509e3f53906
change-id: 20231219-hp-password-19068dc438b5

Best regards,

Signature · 1 line
Tanzir Hasan <[email protected]>
Reviewed-by Tested-by on v1 1/1
#1 lore raw
Quoted 2 lines · Tanzir Hasan

asm-generic/posix-types.h is obtained through bioscfg.h so there is no need to include it.

I verified that by:
1. building with V=1
2. taking the compiler invocation and adding -H

. drivers/platform/x86/hp/hp-bioscfg/bioscfg.h
.. ./include/linux/wmi.h
... ./include/linux/device.h
.... ./include/linux/dev_printk.h
..... ./include/linux/compiler.h
...... ./arch/x86/include/generated/asm/rwonce.h ....... ./include/asm-generic/rwonce.h
........ ./include/linux/kasan-checks.h
......... ./include/linux/types.h
.......... ./include/uapi/linux/types.h ........... ./arch/x86/include/generated/uapi/asm/types.h ............ ./arch/x86/include/asm/posix_types.h ............. ./arch/x86/include/uapi/asm/posix_types_64.h .............. ./include/uapi/asm-generic/posix_types.h

Quoted 2 lines

It is also an asm-generic file which should be
avoided if possible.

Correct, though there is a linux/posix_types.h file.

biocfg.h hasn't seen any changes since introduction; perhaps some reference was removed in follow up changes to passwdobj-attributes.c, but nothing stood out.

Regardless, this file builds just fine without either (asm/posix_types.h or linux/posix_types.h), and asm-generic should not be used (as suggested by Al).

Quoted 28 lines
---
 drivers/platform/x86/hp/hp-bioscfg/passwdobj-attributes.c | 1 -
 1 file changed, 1 deletion(-)
drivers/platform/x86/hp/hp-bioscfg/passwdobj-attributes.c +0 -2
index 03d0188804ba..f7efe217a4bb 100644
@@ -7,7 +7,6 @@
  */
 
 #include "bioscfg.h"
-#include <asm-generic/posix_types.h>
 
 GET_INSTANCE_ID(password);
 /*
 
---

base-commit: 3fb7c66ac51a87984e043d9f47b7a509e3f53906
change-id: 20231219-hp-password-19068dc438b5

Best regards,

Signature · 1 line
Tanzir Hasan <[email protected]>
#2 lore raw

Hi,

Quoted 28 lines · Nick Desaulniers
Quoted 2 lines · Tanzir Hasan

asm-generic/posix-types.h is obtained through bioscfg.h so there is no need to include it.

I verified that by:
1. building with V=1
2. taking the compiler invocation and adding -H

. drivers/platform/x86/hp/hp-bioscfg/bioscfg.h
.. ./include/linux/wmi.h
... ./include/linux/device.h
.... ./include/linux/dev_printk.h
..... ./include/linux/compiler.h
...... ./arch/x86/include/generated/asm/rwonce.h ....... ./include/asm-generic/rwonce.h
........ ./include/linux/kasan-checks.h
......... ./include/linux/types.h
.......... ./include/uapi/linux/types.h ........... ./arch/x86/include/generated/uapi/asm/types.h ............ ./arch/x86/include/asm/posix_types.h ............. ./arch/x86/include/uapi/asm/posix_types_64.h .............. ./include/uapi/asm-generic/posix_types.h

Quoted 2 lines

It is also an asm-generic file which should be
avoided if possible.

Correct, though there is a linux/posix_types.h file.

Quoted 8 lines

biocfg.h hasn't seen any changes since introduction; perhaps some reference was removed in follow up changes to passwdobj-attributes.c, but nothing stood out.

Regardless, this file builds just fine without either (asm/posix_types.h or linux/posix_types.h), and asm-generic should not be used (as suggested by Al).

Thank you both for the patch + review, I've applied this patch to my review-hans branch:
https://git.kernel.org/pub/scm/linux/kernel/git/pdx86/platform-drivers-x86.git/log/?h=review-hans

Once I've run some tests on this branch the patches there will be added to the platform-drivers-x86/for-next branch and eventually will be included in the pdx86 pull-request to Linus for the next merge-window.

Regards,

Hans

Quoted 28 lines
Quoted 27 lines
---
 drivers/platform/x86/hp/hp-bioscfg/passwdobj-attributes.c | 1 -
 1 file changed, 1 deletion(-)
drivers/platform/x86/hp/hp-bioscfg/passwdobj-attributes.c +0 -2
index 03d0188804ba..f7efe217a4bb 100644
@@ -7,7 +7,6 @@
  */
 
 #include "bioscfg.h"
-#include <asm-generic/posix_types.h>
 
 GET_INSTANCE_ID(password);
 /*
 
---

base-commit: 3fb7c66ac51a87984e043d9f47b7a509e3f53906
change-id: 20231219-hp-password-19068dc438b5

Best regards,

Signature · 1 line
Tanzir Hasan <[email protected]>