Remove unneeded ifdefs

Signed-off-by: Robert Baldyga <robert.baldyga@huawei.com>
This commit is contained in:
Robert Baldyga 2023-09-01 19:02:49 +02:00
parent baa0eb2698
commit 4bb4b914cb
2 changed files with 2 additions and 31 deletions

View File

@ -37,12 +37,9 @@ static inline void bd_release_from_disk(struct block_device *bdev,
#elif LINUX_VERSION_CODE >= KERNEL_VERSION(4, 3, 0) #elif LINUX_VERSION_CODE >= KERNEL_VERSION(4, 3, 0)
#define KRETURN(x) ({ return (x); }) #define KRETURN(x) ({ return (x); })
#define MAKE_RQ_RET_TYPE blk_qc_t #define MAKE_RQ_RET_TYPE blk_qc_t
#elif LINUX_VERSION_CODE >= KERNEL_VERSION(3, 2, 0) #else
#define KRETURN(x) return #define KRETURN(x) return
#define MAKE_RQ_RET_TYPE void #define MAKE_RQ_RET_TYPE void
#else
#define KRETURN(x) ({ return (x); })
#define MAKE_RQ_RET_TYPE int
#endif #endif
/* For RHEL 9.x we assume backport from kernel 5.18+ */ /* For RHEL 9.x we assume backport from kernel 5.18+ */

View File

@ -1,5 +1,6 @@
/* /*
* Copyright(c) 2012-2022 Intel Corporation * Copyright(c) 2012-2022 Intel Corporation
* Copyright(c) 2024 Huawei Technologies
* SPDX-License-Identifier: BSD-3-Clause * SPDX-License-Identifier: BSD-3-Clause
*/ */
@ -47,23 +48,6 @@
#include <linux/slab_def.h> #include <linux/slab_def.h>
#endif #endif
#if LINUX_VERSION_CODE > KERNEL_VERSION(3, 0, 0)
#include <generated/utsrelease.h>
#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 #ifndef SHRT_MIN
#define SHRT_MIN ((s16)-32768) #define SHRT_MIN ((s16)-32768)
#endif #endif
@ -74,16 +58,6 @@
#define ENOTSUP ENOTSUPP #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 */ /* rate-limited printk */
#define CAS_PRINT_RL(...) \ #define CAS_PRINT_RL(...) \
if (printk_ratelimit()) \ if (printk_ratelimit()) \