From 3c270e713fc4894013015cb189cfb30b7a3d5371 Mon Sep 17 00:00:00 2001 From: Vladislav Bolkhovitin Date: Mon, 6 Oct 2008 17:24:49 +0000 Subject: [PATCH] The patch below fixes the following class of checkpatch warnings: WARNING: externs should be avoided in .c files This patch has been tested by verifying that the SCST sources still compile fine (make -s clean && make -C srpt -s clean && make -s scst iscsi-scst && make -C srpt -s). Signed-off-by: Bart Van Assche git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@515 d57e44dd-8a1f-0410-8b47-8ef2f437770f --- scst/src/dev_handlers/scst_cdrom.c | 8 ++++---- scst/src/dev_handlers/scst_changer.c | 12 ++++++++---- scst/src/dev_handlers/scst_disk.c | 10 +++++----- scst/src/dev_handlers/scst_modisk.c | 10 +++++----- scst/src/dev_handlers/scst_processor.c | 12 ++++++++---- scst/src/dev_handlers/scst_raid.c | 12 ++++++++---- scst/src/dev_handlers/scst_tape.c | 10 +++++----- 7 files changed, 43 insertions(+), 31 deletions(-) diff --git a/scst/src/dev_handlers/scst_cdrom.c b/scst/src/dev_handlers/scst_cdrom.c index 121477392..1808c796e 100644 --- a/scst/src/dev_handlers/scst_cdrom.c +++ b/scst/src/dev_handlers/scst_cdrom.c @@ -45,10 +45,10 @@ struct cdrom_params { int block_shift; }; -int cdrom_attach(struct scst_device *); -void cdrom_detach(struct scst_device *); -int cdrom_parse(struct scst_cmd *); -int cdrom_done(struct scst_cmd *); +static int cdrom_attach(struct scst_device *); +static void cdrom_detach(struct scst_device *); +static int cdrom_parse(struct scst_cmd *); +static int cdrom_done(struct scst_cmd *); static struct scst_dev_type cdrom_devtype = CDROM_TYPE; diff --git a/scst/src/dev_handlers/scst_changer.c b/scst/src/dev_handlers/scst_changer.c index 1cb7f4c9e..c7d42dcca 100644 --- a/scst/src/dev_handlers/scst_changer.c +++ b/scst/src/dev_handlers/scst_changer.c @@ -41,10 +41,10 @@ #define CHANGER_RETRIES 2 #define READ_CAP_LEN 8 -int changer_attach(struct scst_device *); -void changer_detach(struct scst_device *); -int changer_parse(struct scst_cmd *); -int changer_done(struct scst_cmd *); +static int changer_attach(struct scst_device *); +/* static void changer_detach(struct scst_device *); */ +static int changer_parse(struct scst_cmd *); +/* static int changer_done(struct scst_cmd *); */ static struct scst_dev_type changer_devtype = CHANGER_TYPE; @@ -121,6 +121,7 @@ out: * * Description: Called to detach this device type driver ************************************************************/ +#if 0 void changer_detach(struct scst_device *dev) { TRACE_ENTRY(); @@ -128,6 +129,7 @@ void changer_detach(struct scst_device *dev) TRACE_EXIT(); return; } +#endif /******************************************************************** * Function: changer_parse @@ -162,6 +164,7 @@ int changer_parse(struct scst_cmd *cmd) * it is used to extract any necessary information * about a command. ********************************************************************/ +#if 0 int changer_done(struct scst_cmd *cmd) { int res = SCST_CMD_STATE_DEFAULT; @@ -185,6 +188,7 @@ int changer_done(struct scst_cmd *cmd) TRACE_EXIT(); return res; } +#endif static int __init changer_init(void) { diff --git a/scst/src/dev_handlers/scst_disk.c b/scst/src/dev_handlers/scst_disk.c index 26b9faf67..bc33da2e8 100644 --- a/scst/src/dev_handlers/scst_disk.c +++ b/scst/src/dev_handlers/scst_disk.c @@ -64,11 +64,11 @@ struct disk_params { int block_shift; }; -int disk_attach(struct scst_device *dev); -void disk_detach(struct scst_device *dev); -int disk_parse(struct scst_cmd *cmd); -int disk_done(struct scst_cmd *cmd); -int disk_exec(struct scst_cmd *cmd); +static int disk_attach(struct scst_device *dev); +static void disk_detach(struct scst_device *dev); +static int disk_parse(struct scst_cmd *cmd); +static int disk_done(struct scst_cmd *cmd); +static int disk_exec(struct scst_cmd *cmd); static struct scst_dev_type disk_devtype = DISK_TYPE; static struct scst_dev_type disk_devtype_perf = DISK_PERF_TYPE; diff --git a/scst/src/dev_handlers/scst_modisk.c b/scst/src/dev_handlers/scst_modisk.c index 8bd0a2d1b..00b9d9788 100644 --- a/scst/src/dev_handlers/scst_modisk.c +++ b/scst/src/dev_handlers/scst_modisk.c @@ -64,11 +64,11 @@ struct modisk_params { int block_shift; }; -int modisk_attach(struct scst_device *); -void modisk_detach(struct scst_device *); -int modisk_parse(struct scst_cmd *); -int modisk_done(struct scst_cmd *); -int modisk_exec(struct scst_cmd *); +static int modisk_attach(struct scst_device *); +static void modisk_detach(struct scst_device *); +static int modisk_parse(struct scst_cmd *); +static int modisk_done(struct scst_cmd *); +static int modisk_exec(struct scst_cmd *); static struct scst_dev_type modisk_devtype = MODISK_TYPE; static struct scst_dev_type modisk_devtype_perf = MODISK_PERF_TYPE; diff --git a/scst/src/dev_handlers/scst_processor.c b/scst/src/dev_handlers/scst_processor.c index 6d744f3a9..4f187f44d 100644 --- a/scst/src/dev_handlers/scst_processor.c +++ b/scst/src/dev_handlers/scst_processor.c @@ -41,10 +41,10 @@ #define PROCESSOR_RETRIES 2 #define READ_CAP_LEN 8 -int processor_attach(struct scst_device *); -void processor_detach(struct scst_device *); -int processor_parse(struct scst_cmd *); -int processor_done(struct scst_cmd *); +static int processor_attach(struct scst_device *); +/*static void processor_detach(struct scst_device *);*/ +static int processor_parse(struct scst_cmd *); +/*static int processor_done(struct scst_cmd *);*/ static struct scst_dev_type processor_devtype = PROCESSOR_TYPE; @@ -121,6 +121,7 @@ out: * * Description: Called to detach this device type driver ************************************************************/ +#if 0 void processor_detach(struct scst_device *dev) { TRACE_ENTRY(); @@ -128,6 +129,7 @@ void processor_detach(struct scst_device *dev) TRACE_EXIT(); return; } +#endif /******************************************************************** * Function: processor_parse @@ -162,6 +164,7 @@ int processor_parse(struct scst_cmd *cmd) * it is used to extract any necessary information * about a command. ********************************************************************/ +#if 0 int processor_done(struct scst_cmd *cmd) { int res = SCST_CMD_STATE_DEFAULT; @@ -185,6 +188,7 @@ int processor_done(struct scst_cmd *cmd) TRACE_EXIT(); return res; } +#endif static int __init processor_init(void) { diff --git a/scst/src/dev_handlers/scst_raid.c b/scst/src/dev_handlers/scst_raid.c index ddba26d55..746ba0a2f 100644 --- a/scst/src/dev_handlers/scst_raid.c +++ b/scst/src/dev_handlers/scst_raid.c @@ -41,10 +41,10 @@ #define RAID_RETRIES 2 #define READ_CAP_LEN 8 -int raid_attach(struct scst_device *); -void raid_detach(struct scst_device *); -int raid_parse(struct scst_cmd *); -int raid_done(struct scst_cmd *); +static int raid_attach(struct scst_device *); +/* static void raid_detach(struct scst_device *); */ +static int raid_parse(struct scst_cmd *); +/* static int raid_done(struct scst_cmd *); */ static struct scst_dev_type raid_devtype = RAID_TYPE; @@ -121,6 +121,7 @@ out: * * Description: Called to detach this device type driver ************************************************************/ +#if 0 void raid_detach(struct scst_device *dev) { TRACE_ENTRY(); @@ -128,6 +129,7 @@ void raid_detach(struct scst_device *dev) TRACE_EXIT(); return; } +#endif /******************************************************************** * Function: raid_parse @@ -162,6 +164,7 @@ int raid_parse(struct scst_cmd *cmd) * it is used to extract any necessary information * about a command. ********************************************************************/ +#if 0 int raid_done(struct scst_cmd *cmd) { int res = SCST_CMD_STATE_DEFAULT; @@ -185,6 +188,7 @@ int raid_done(struct scst_cmd *cmd) TRACE_EXIT(); return res; } +#endif static int __init raid_init(void) { diff --git a/scst/src/dev_handlers/scst_tape.c b/scst/src/dev_handlers/scst_tape.c index f2b4e0d3f..e80a03709 100644 --- a/scst/src/dev_handlers/scst_tape.c +++ b/scst/src/dev_handlers/scst_tape.c @@ -69,11 +69,11 @@ struct tape_params { int block_size; }; -int tape_attach(struct scst_device *); -void tape_detach(struct scst_device *); -int tape_parse(struct scst_cmd *); -int tape_done(struct scst_cmd *); -int tape_exec(struct scst_cmd *); +static int tape_attach(struct scst_device *); +static void tape_detach(struct scst_device *); +static int tape_parse(struct scst_cmd *); +static int tape_done(struct scst_cmd *); +static int tape_exec(struct scst_cmd *); static struct scst_dev_type tape_devtype = TAPE_TYPE; static struct scst_dev_type tape_devtype_perf = TAPE_PERF_TYPE;