conftest: Fix PCI EPC has core_init_notifier

The conftest test for detecting if the structure 'pci_epc_features' has
the member 'core_init_notifier' is not working as expected because it is
a bit field in the structure. Re-work the conftest test to fix this.

Bug 4593750
Bug 4748899

Change-Id: Ib93e4ae869c6a28922c0feed28ce90912371ff66
Signed-off-by: Jon Hunter <jonathanh@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3181508
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
This commit is contained in:
Jon Hunter
2024-07-25 07:42:17 +01:00
committed by mobile promotions
parent 8bb21ea435
commit 6e9c85dd91

View File

@@ -7562,8 +7562,8 @@ compile_test() {
# #
CODE=" CODE="
#include <linux/pci-epc.h> #include <linux/pci-epc.h>
int conftest_pci_epc_features_struct_has_core_init_notifier(void) { unsigned int conftest(struct pci_epc_features *epf) {
return offsetof(struct pci_epc_features, core_init_notifier); return epf->core_init_notifier;
}" }"
compile_check_conftest "$CODE" "NV_PCI_EPC_FEATURES_STRUCT_HAS_CORE_INIT_NOTIFIER" "" "types" compile_check_conftest "$CODE" "NV_PCI_EPC_FEATURES_STRUCT_HAS_CORE_INIT_NOTIFIER" "" "types"