From 6e9c85dd91dfd300c51d66cee1639989613c5c31 Mon Sep 17 00:00:00 2001 From: Jon Hunter Date: Thu, 25 Jul 2024 07:42:17 +0100 Subject: [PATCH] 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 Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3181508 Tested-by: mobile promotions Reviewed-by: mobile promotions --- scripts/conftest/conftest.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/scripts/conftest/conftest.sh b/scripts/conftest/conftest.sh index 77668220..c5d03d14 100755 --- a/scripts/conftest/conftest.sh +++ b/scripts/conftest/conftest.sh @@ -7562,8 +7562,8 @@ compile_test() { # CODE=" #include - int conftest_pci_epc_features_struct_has_core_init_notifier(void) { - return offsetof(struct pci_epc_features, core_init_notifier); + unsigned int conftest(struct pci_epc_features *epf) { + return epf->core_init_notifier; }" compile_check_conftest "$CODE" "NV_PCI_EPC_FEATURES_STRUCT_HAS_CORE_INIT_NOTIFIER" "" "types"