From e6fddfc5f6aeefa2b9ccb59640d8273b79ff35ff Mon Sep 17 00:00:00 2001 From: Jon Hunter Date: Tue, 10 Oct 2023 09:54:39 +0100 Subject: [PATCH] scripts: conftest: Fix test for __alloc_disk_node The test to see if the function __alloc_disk_node() has the 'lkclass' argument is not working as expected and so builds for Linux v5.18 and Linux v5.19 are failing. The problem is that the type 'NULL' is not defined and so the test always fails. Fix this by using the 'lock_class_key' type and including the appropriate headers. Bug 4221847 Change-Id: I6b3d6987d0d3250f00c27c586d6a971a3dceac59 Signed-off-by: Jon Hunter Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2994321 GVS: Gerrit_Virtual_Submit --- scripts/conftest/conftest.sh | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/scripts/conftest/conftest.sh b/scripts/conftest/conftest.sh index 08c6983a..d4687968 100755 --- a/scripts/conftest/conftest.sh +++ b/scripts/conftest/conftest.sh @@ -6339,10 +6339,11 @@ compile_test() { # __alloc_disk_node() function. # CODE=" - #include + #include + #include struct gendisk *conftest___alloc_disk_node_has_lkclass_arg( - struct request_queue *q) { - return __alloc_disk_node(q, 0, NULL); + struct request_queue *q, struct lock_class_key *lkclass) { + return __alloc_disk_node(q, 0, lkclass); }" compile_check_conftest "$CODE" "NV___ALLOC_DISK_NODE_HAS_LKCLASS_ARG" "" "types"