From 5ca9d97b658d8917f38411bc111afadad8e4d993 Mon Sep 17 00:00:00 2001 From: Bart Van Assche Date: Mon, 23 Dec 2019 18:55:58 +0000 Subject: [PATCH] scst: Remove the code that depends on the SCSI_EXEC_REQ_FIFO_DEFINED macro The exec_req_fifo patches have been removed some time ago. Hence also remove the code that depends on these patches having been applied. See also commit 78d6da4517a4 ("scst: Remove obsolete exec_req_fifo kernel patches"; r8022). git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@8698 d57e44dd-8a1f-0410-8b47-8ef2f437770f --- scripts/generate-kernel-patch | 1 - scripts/specialize-patch | 25 +++---------------------- scst/src/scst_lib.c | 5 ----- scst/src/scst_main.c | 5 +---- scst/src/scst_priv.h | 5 +---- 5 files changed, 5 insertions(+), 36 deletions(-) diff --git a/scripts/generate-kernel-patch b/scripts/generate-kernel-patch index 5d8a61a03..8800e589e 100755 --- a/scripts/generate-kernel-patch +++ b/scripts/generate-kernel-patch @@ -114,7 +114,6 @@ function specialize_patch { "$(dirname "$0")/specialize-patch" \ "${specialize_patch_options[@]}" \ -v kernel_version="${kver3}" \ - -v SCSI_EXEC_REQ_FIFO_DEFINED="${scsi_exec_req_fifo_defined}" \ -v SCST_IO_CONTEXT="${scst_io_context}" else cat diff --git a/scripts/specialize-patch b/scripts/specialize-patch index 40563a6fa..eb28570a4 100755 --- a/scripts/specialize-patch +++ b/scripts/specialize-patch @@ -226,14 +226,6 @@ function evaluate(stmnt, pattern, arg, op, result) { gsub("defined\\(UEK_KABI_RENAME\\)", "0", stmnt) - if (SCSI_EXEC_REQ_FIFO_DEFINED != "") - { - gsub("defined[[:blank:]]+SCSI_EXEC_REQ_FIFO_DEFINED", - SCSI_EXEC_REQ_FIFO_DEFINED, stmnt) - gsub("defined[[:blank:]]*\\([[:blank:]]*SCSI_EXEC_REQ_FIFO_DEFINED[[:blank:]]*\\)", - SCSI_EXEC_REQ_FIFO_DEFINED, stmnt) - } - if (SCST_IO_CONTEXT != "") { gsub("defined[[:blank:]]+SCST_IO_CONTEXT", SCST_IO_CONTEXT, stmnt) @@ -428,7 +420,6 @@ function handle_if(evaluated) && $0 ~ "GENERATING_UPSTREAM_PATCH" \ || $0 ~ "CONFIG_TCP_ZERO_COPY_TRANSFER_COMPLETION_NOTIFICATION" \ || ($0 ~ "CONFIG_SCST_PROC" && config_scst_proc_undefined) \ - || ($0 ~ "SCSI_EXEC_REQ_FIFO_DEFINED" && SCSI_EXEC_REQ_FIFO_DEFINED!="") \ || ($0 ~ "SCST_IO_CONTEXT" && SCST_IO_CONTEXT != "")) { } @@ -523,19 +514,9 @@ function process_preprocessor_statement(evaluated, condition) { printf "/* debug specialize-patch: (g2) %s: output = %d */\n", \ evaluated, output } - if (evaluated ~ "^+#define SCSI_EXEC_REQ_FIFO_DEFINED$" \ - && SCSI_EXEC_REQ_FIFO_DEFINED != "" \ - || evaluated ~ "^+#define SCST_IO_CONTEXT$" \ - && SCST_IO_CONTEXT != "" \ - || (evaluated ~ "^+#define CONFIG_SCST_PROC$" \ - && config_scst_proc_undefined)) - { - discard = 1 - delete_next_blank_line = 1 - } - else if (output && (!condition || \ - decision[if_nesting_level + (evaluated ~ "^+#endif$")] \ - !~ "^+#(el|)if [01]")) + if (output && (!condition || \ + decision[if_nesting_level + (evaluated ~ "^+#endif$")] \ + !~ "^+#(el|)if [01]")) { if (evaluated == "+#if undecided" \ || (evaluated !~ "^+#if" \ diff --git a/scst/src/scst_lib.c b/scst/src/scst_lib.c index a0b69aa02..e3c832110 100644 --- a/scst/src/scst_lib.c +++ b/scst/src/scst_lib.c @@ -147,8 +147,6 @@ int hex_to_bin(char ch) EXPORT_SYMBOL(hex_to_bin); #endif -#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 30) || \ - !defined(SCSI_EXEC_REQ_FIFO_DEFINED) static int sg_copy(struct scatterlist *dst_sg, struct scatterlist *src_sg, #if LINUX_VERSION_CODE < KERNEL_VERSION(3, 4, 0) int nents_to_copy, size_t copy_len, @@ -156,7 +154,6 @@ static int sg_copy(struct scatterlist *dst_sg, struct scatterlist *src_sg, #else int nents_to_copy, size_t copy_len); #endif -#endif static void scst_free_descriptors(struct scst_cmd *cmd); static bool sg_cmp(struct scatterlist *dst_sg, struct scatterlist *src_sg, @@ -8393,7 +8390,6 @@ out: } #endif -#if !defined(SCSI_EXEC_REQ_FIFO_DEFINED) /* * Can switch to the next dst_sg element, so, to copy to strictly only * one dst_sg element, it must be either last in the chain, or @@ -8545,7 +8541,6 @@ static int sg_copy(struct scatterlist *dst_sg, struct scatterlist *src_sg, out: return res; } -#endif /* !defined(SCSI_EXEC_REQ_FIFO_DEFINED) */ #if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 30) #if LINUX_VERSION_CODE < KERNEL_VERSION(4, 13, 0) && \ diff --git a/scst/src/scst_main.c b/scst/src/scst_main.c index 7ea991e17..f03210d4e 100644 --- a/scst/src/scst_main.c +++ b/scst/src/scst_main.c @@ -48,10 +48,8 @@ details. #endif #if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 30) && \ - !defined(SCSI_EXEC_REQ_FIFO_DEFINED) && \ !defined(CONFIG_SCST_STRICT_SERIALIZING) -#warning Patch scst_exec_req_fifo- was not applied on \ -your kernel and CONFIG_SCST_STRICT_SERIALIZING is not defined. \ +#warning CONFIG_SCST_STRICT_SERIALIZING has not been defined. \ Pass-through dev handlers will not work. #endif @@ -1538,7 +1536,6 @@ int __scst_register_dev_driver(struct scst_dev_type *dev_type, goto out; #if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 30) && \ - !defined(SCSI_EXEC_REQ_FIFO_DEFINED) && \ !defined(CONFIG_SCST_STRICT_SERIALIZING) if (dev_type->exec == NULL) { PRINT_ERROR("Pass-through dev handlers (handler \"%s\") not " diff --git a/scst/src/scst_priv.h b/scst/src/scst_priv.h index 94d84f9eb..47483eec9 100644 --- a/scst/src/scst_priv.h +++ b/scst/src/scst_priv.h @@ -457,12 +457,9 @@ static inline int scst_exec_req(struct scsi_device *sdev, #if defined(CONFIG_SCST_STRICT_SERIALIZING) return scsi_execute_async(sdev, cmd, cmd_len, data_direction, (void *)sgl, bufflen, nents, timeout, retries, privdata, done, gfp); -#elif !defined(SCSI_EXEC_REQ_FIFO_DEFINED) +#else WARN_ON(1); return -1; -#else - return scsi_execute_async_fifo(sdev, cmd, cmd_len, data_direction, - (void *)sgl, bufflen, nents, timeout, retries, privdata, done, gfp); #endif } #endif