From 4bb4b914cb9c99a09d6fb26924e3cc20a8528187 Mon Sep 17 00:00:00 2001 From: Robert Baldyga Date: Fri, 1 Sep 2023 19:02:49 +0200 Subject: [PATCH] Remove unneeded ifdefs Signed-off-by: Robert Baldyga --- modules/cas_cache/exp_obj.c | 5 +---- modules/cas_cache/linux_kernel_version.h | 28 +----------------------- 2 files changed, 2 insertions(+), 31 deletions(-) diff --git a/modules/cas_cache/exp_obj.c b/modules/cas_cache/exp_obj.c index d4b329a..fce9714 100644 --- a/modules/cas_cache/exp_obj.c +++ b/modules/cas_cache/exp_obj.c @@ -37,12 +37,9 @@ static inline void bd_release_from_disk(struct block_device *bdev, #elif LINUX_VERSION_CODE >= KERNEL_VERSION(4, 3, 0) #define KRETURN(x) ({ return (x); }) #define MAKE_RQ_RET_TYPE blk_qc_t -#elif LINUX_VERSION_CODE >= KERNEL_VERSION(3, 2, 0) +#else #define KRETURN(x) return #define MAKE_RQ_RET_TYPE void -#else - #define KRETURN(x) ({ return (x); }) - #define MAKE_RQ_RET_TYPE int #endif /* For RHEL 9.x we assume backport from kernel 5.18+ */ diff --git a/modules/cas_cache/linux_kernel_version.h b/modules/cas_cache/linux_kernel_version.h index a9682fd..41eda5b 100644 --- a/modules/cas_cache/linux_kernel_version.h +++ b/modules/cas_cache/linux_kernel_version.h @@ -1,5 +1,6 @@ /* * Copyright(c) 2012-2022 Intel Corporation +* Copyright(c) 2024 Huawei Technologies * SPDX-License-Identifier: BSD-3-Clause */ @@ -47,23 +48,6 @@ #include #endif -#if LINUX_VERSION_CODE > KERNEL_VERSION(3, 0, 0) - #include - #ifdef UTS_UBUNTU_RELEASE_ABI - #define CAS_UBUNTU - #endif -#endif - -/* - * For 8KB process kernel stack check if request is not continous and - * submit each bio as separate request. This prevent nvme driver from - * splitting requests. - * For large requests, nvme splitting causes stack overrun. - */ -#if THREAD_SIZE <= 8192 - #define RQ_CHECK_CONTINOUS -#endif - #ifndef SHRT_MIN #define SHRT_MIN ((s16)-32768) #endif @@ -74,16 +58,6 @@ #define ENOTSUP ENOTSUPP -#ifdef RHEL_RELEASE_VERSION - #if RHEL_RELEASE_CODE == RHEL_RELEASE_VERSION(7, 3) - #define CAS_RHEL_73 - #endif -#endif - -#if LINUX_VERSION_CODE >= KERNEL_VERSION(3,8,0) - #define CAS_GARBAGE_COLLECTOR -#endif - /* rate-limited printk */ #define CAS_PRINT_RL(...) \ if (printk_ratelimit()) \