From ae1bede207e8131e4834b7460d654314891496d3 Mon Sep 17 00:00:00 2001 From: Adam Rutkowski Date: Mon, 27 Jun 2022 16:25:15 +0200 Subject: [PATCH] remove unused config options Signed-off-by: Adam Rutkowski --- configure.d/1_block_pc.conf | 49 -------------------------------- configure.d/2_make_req.conf | 56 ------------------------------------- 2 files changed, 105 deletions(-) delete mode 100644 configure.d/1_block_pc.conf delete mode 100644 configure.d/2_make_req.conf diff --git a/configure.d/1_block_pc.conf b/configure.d/1_block_pc.conf deleted file mode 100644 index eb6f5fa..0000000 --- a/configure.d/1_block_pc.conf +++ /dev/null @@ -1,49 +0,0 @@ -#!/bin/bash -# -# Copyright(c) 2012-2021 Intel Corporation -# SPDX-License-Identifier: BSD-3-Clause -# - -. $(dirname $3)/conf_framework - -check() { - cur_name=$(basename $2) - config_file_path=$1 - if compile_module $cur_name "blk_rq_set_block_pc(NULL)" "linux/blkdev.h" - then - echo $cur_name "1" >> $config_file_path - else - echo $cur_name "2" >> $config_file_path - fi -} - -apply() { - case "$1" in - "1") - add_function " - static inline void cas_blk_rq_set_block_pc(struct request *rq) - { - blk_rq_set_block_pc(rq); - }" ;; - "2") - add_function " - #include - #include - #include - static inline void cas_blk_rq_set_block_pc(struct request *rq) - { - struct scsi_cmnd *cmd = blk_mq_rq_to_pdu(rq); - - struct scsi_request *req = &cmd->req; - - memset(req->__cmd, 0, sizeof(req->__cmd)); - req->cmd = req->__cmd; - req->cmd_len = BLK_MAX_CDB; - req->sense_len = 0; - }" ;; - *) - exit 1 - esac -} - -conf_run $@ diff --git a/configure.d/2_make_req.conf b/configure.d/2_make_req.conf deleted file mode 100644 index 0b960d1..0000000 --- a/configure.d/2_make_req.conf +++ /dev/null @@ -1,56 +0,0 @@ -#!/bin/bash -# -# Copyright(c) 2012-2021 Intel Corporation -# SPDX-License-Identifier: BSD-3-Clause -# - -. $(dirname $3)/conf_framework - -check() { - cur_name=$(basename $2) - config_file_path=$1 - if compile_module $cur_name "blk_make_request(NULL, NULL, 0)" "linux/blkdev.h" - then - echo $cur_name "1" >> $config_file_path - else - echo $cur_name "2" >> $config_file_path - fi -} - -apply() { - case "$1" in - "1") - add_function " - static inline struct request *cas_blk_make_request(struct request_queue *q, - struct bio *bio, gfp_t gfp_mask) - { - return blk_make_request(q, bio, gfp_mask); - }" ;; - "2") - add_function " - static inline struct request *cas_blk_make_request(struct request_queue *q, - struct bio *bio, gfp_t gfp_mask) - { - struct request *rq = blk_get_request(q, bio_data_dir(bio), gfp_mask); - if (IS_ERR(rq)) - return rq; - cas_blk_rq_set_block_pc(rq); - rq->q = q; - for_each_bio(bio) { - struct bio *bounce_bio = bio; - int ret; - cas_blk_queue_bounce(q, &bounce_bio); - ret = cas_blk_rq_append_bio(rq, bounce_bio); - if (unlikely(ret)) { - blk_put_request(rq); - return ERR_PTR(ret); - } - } - return rq; - }" ;; - *) - exit 1 - esac -} - -conf_run $@