From 93cb0bea8bf9f7b507327829195e2e2aa2226224 Mon Sep 17 00:00:00 2001 From: Bart Van Assche Date: Mon, 3 Aug 2020 03:03:47 +0000 Subject: [PATCH] ib_srpt, iscsi-scst: Add the configure tests necessary for building against kernel v5.8 (merge r9073 from trunk) git-svn-id: http://svn.code.sf.net/p/scst/svn/branches/3.4.x@9100 d57e44dd-8a1f-0410-8b47-8ef2f437770f --- iscsi-scst/conftest/rdma_reject/Makefile | 3 +++ iscsi-scst/conftest/rdma_reject/rdma_reject.c | 11 +++++++++++ srpt/conftest/ib_client_add_one/Makefile | 3 +++ srpt/conftest/ib_client_add_one/add_one.c | 18 ++++++++++++++++++ srpt/conftest/rdma_reject/Makefile | 3 +++ srpt/conftest/rdma_reject/rdma_reject.c | 11 +++++++++++ 6 files changed, 49 insertions(+) create mode 100644 iscsi-scst/conftest/rdma_reject/Makefile create mode 100644 iscsi-scst/conftest/rdma_reject/rdma_reject.c create mode 100644 srpt/conftest/ib_client_add_one/Makefile create mode 100644 srpt/conftest/ib_client_add_one/add_one.c create mode 100644 srpt/conftest/rdma_reject/Makefile create mode 100644 srpt/conftest/rdma_reject/rdma_reject.c diff --git a/iscsi-scst/conftest/rdma_reject/Makefile b/iscsi-scst/conftest/rdma_reject/Makefile new file mode 100644 index 000000000..f0c628d38 --- /dev/null +++ b/iscsi-scst/conftest/rdma_reject/Makefile @@ -0,0 +1,3 @@ +LINUXINCLUDE := $(PRE_CFLAGS) $(LINUXINCLUDE) + +obj-m += rdma_reject.o diff --git a/iscsi-scst/conftest/rdma_reject/rdma_reject.c b/iscsi-scst/conftest/rdma_reject/rdma_reject.c new file mode 100644 index 000000000..d54852a1e --- /dev/null +++ b/iscsi-scst/conftest/rdma_reject/rdma_reject.c @@ -0,0 +1,11 @@ +#include +#include + +static struct rdma_cm_id id; + +static int __init modinit(void) +{ + return rdma_reject(&id, NULL, 0, 0); +} + +module_init(modinit); diff --git a/srpt/conftest/ib_client_add_one/Makefile b/srpt/conftest/ib_client_add_one/Makefile new file mode 100644 index 000000000..7f052cf2b --- /dev/null +++ b/srpt/conftest/ib_client_add_one/Makefile @@ -0,0 +1,3 @@ +LINUXINCLUDE := $(PRE_CFLAGS) $(LINUXINCLUDE) + +obj-m += add_one.o diff --git a/srpt/conftest/ib_client_add_one/add_one.c b/srpt/conftest/ib_client_add_one/add_one.c new file mode 100644 index 000000000..6dba90898 --- /dev/null +++ b/srpt/conftest/ib_client_add_one/add_one.c @@ -0,0 +1,18 @@ +#include +#include + +static int add_one(struct ib_device *device) +{ + return 0; +} + +static struct ib_client test_client = { + .add = add_one, +}; + +static int __init modinit(void) +{ + return ib_register_client(&test_client); +} + +module_init(modinit); diff --git a/srpt/conftest/rdma_reject/Makefile b/srpt/conftest/rdma_reject/Makefile new file mode 100644 index 000000000..f0c628d38 --- /dev/null +++ b/srpt/conftest/rdma_reject/Makefile @@ -0,0 +1,3 @@ +LINUXINCLUDE := $(PRE_CFLAGS) $(LINUXINCLUDE) + +obj-m += rdma_reject.o diff --git a/srpt/conftest/rdma_reject/rdma_reject.c b/srpt/conftest/rdma_reject/rdma_reject.c new file mode 100644 index 000000000..d54852a1e --- /dev/null +++ b/srpt/conftest/rdma_reject/rdma_reject.c @@ -0,0 +1,11 @@ +#include +#include + +static struct rdma_cm_id id; + +static int __init modinit(void) +{ + return rdma_reject(&id, NULL, 0, 0); +} + +module_init(modinit);