From e66752b4fc9b3b63de0c3193663dd4ee67e1822e Mon Sep 17 00:00:00 2001 From: Vladislav Bolkhovitin Date: Wed, 14 Nov 2012 21:20:17 +0000 Subject: [PATCH] Make scst_user debug statistics available only in the debug mode git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@4620 d57e44dd-8a1f-0410-8b47-8ef2f437770f --- scst/src/dev_handlers/scst_user.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/scst/src/dev_handlers/scst_user.c b/scst/src/dev_handlers/scst_user.c index 7ae345953..5f1daef40 100644 --- a/scst/src/dev_handlers/scst_user.c +++ b/scst/src/dev_handlers/scst_user.c @@ -188,8 +188,10 @@ static int dev_user_exit_dev(struct scst_user_dev *dev); #ifdef CONFIG_SCST_PROC +#ifdef CONFIG_SCST_DEBUG static int dev_user_read_proc(struct seq_file *seq, struct scst_dev_type *dev_type); +#endif #else /* CONFIG_SCST_PROC */ @@ -228,7 +230,7 @@ static struct scst_dev_type dev_user_devtype = { .name = DEV_USER_NAME, .type = -1, .parse = dev_usr_parse, -#ifdef CONFIG_SCST_PROC +#if defined(CONFIG_SCST_PROC) && defined(CONFIG_SCST_DEBUG) .read_proc = dev_user_read_proc, #endif #if defined(CONFIG_SCST_DEBUG) || defined(CONFIG_SCST_TRACING) @@ -3644,6 +3646,7 @@ static ssize_t dev_user_sysfs_commands_show(struct kobject *kobj, #else /* CONFIG_SCST_PROC */ +#ifdef CONFIG_SCST_DEBUG /* * Called when a file in the /proc/scsi_tgt/scst_user is read */ @@ -3681,6 +3684,7 @@ static int dev_user_read_proc(struct seq_file *seq, struct scst_dev_type *dev_ty TRACE_EXIT_RES(res); return res; } +#endif /* CONFIG_SCST_DEBUG */ #endif /* CONFIG_SCST_PROC */ static inline int test_cleanup_list(void)