From cf94272cea0f1cc5e118a4a07bcbffdbc2279a8f Mon Sep 17 00:00:00 2001 From: Gleb Chesnokov Date: Fri, 28 Apr 2023 12:26:40 +0300 Subject: [PATCH] scst: Remove scst_module.c file I haven't been able to find any sign of this file being used since the initial commit, so remove this dead code. --- debian/copyright | 1 - scripts/generate-kernel-patch | 2 +- scst/src/scst_module.c | 69 ----------------------------------- 3 files changed, 1 insertion(+), 71 deletions(-) delete mode 100644 scst/src/scst_module.c diff --git a/debian/copyright b/debian/copyright index 25f2f543c..dbbe70263 100644 --- a/debian/copyright +++ b/debian/copyright @@ -225,7 +225,6 @@ Files: scst/Makefile scst/src/scst_main.c scst/src/scst_mem.c scst/src/scst_mem.h - scst/src/scst_module.c scst/src/scst_no_dlm.c scst/src/scst_pres.c scst/src/scst_pres.h diff --git a/scripts/generate-kernel-patch b/scripts/generate-kernel-patch index 7a3bcb904..09715c993 100755 --- a/scripts/generate-kernel-patch +++ b/scripts/generate-kernel-patch @@ -306,7 +306,7 @@ scst_io_context=0 scst_03_public_headers="scst/include/scst.h scst/include/scst_const.h \ scst/include/scst_event.h scst/include/backport.h" -scst_04_main="scst/src/scst_main.c scst/src/scst_module.c scst/src/scst_priv.h \ +scst_04_main="scst/src/scst_main.c scst/src/scst_priv.h \ scst/src/scst_copy_mgr.c scst/src/scst_dlm.c scst/src/scst_dlm.h \ scst/src/scst_event.c scst/src/scst_no_dlm.c" scst_05_targ="scst/src/scst_targ.c scst/src/scst_local_cmd.c \ diff --git a/scst/src/scst_module.c b/scst/src/scst_module.c deleted file mode 100644 index 1dcd71cc3..000000000 --- a/scst/src/scst_module.c +++ /dev/null @@ -1,69 +0,0 @@ -/* - * scst_module.c - * - * Copyright (C) 2004 - 2018 Vladislav Bolkhovitin - * Copyright (C) 2004 - 2005 Leonid Stoljar - * Copyright (C) 2007 - 2018 Western Digital Corporation - * - * Support for loading target modules. The usage is similar to scsi_module.c - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation, version 2 - * of the License. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - */ - -#include -#include - -#include - -static int __init init_this_scst_driver(void) -{ - int res; - - TRACE_ENTRY(); - - res = scst_register_target_template(&driver_target_template); - TRACE_DBG("scst_register_target_template() returned %d", res); - if (res < 0) - goto out; - -#ifdef SCST_REGISTER_INITIATOR_DRIVER - driver_template.module = THIS_MODULE; - scsi_register_module(MODULE_SCSI_HA, &driver_template); - TRACE_DBG("driver_template.present=%d", - driver_template.present); - if (driver_template.present == 0) { - res = -ENODEV; - MOD_DEC_USE_COUNT; - goto out; - } -#endif - -out: - TRACE_EXIT_RES(res); - return res; -} - -static void __exit exit_this_scst_driver(void) -{ - TRACE_ENTRY(); - -#ifdef SCST_REGISTER_INITIATOR_DRIVER - scsi_unregister_module(MODULE_SCSI_HA, &driver_template); -#endif - - scst_unregister_target_template(&driver_target_template); - - TRACE_EXIT(); - return; -} - -module_init(init_this_scst_driver); -module_exit(exit_this_scst_driver);