From 929216119211654924eb727ce873f8429c61cd26 Mon Sep 17 00:00:00 2001 From: Bart Van Assche Date: Thu, 14 Nov 2013 09:10:51 +0000 Subject: [PATCH] scst and iscsi-scst: Suppress two sparse complaints Avoid that sparse complains about a local symbol not having been declared static (scst_pool_dep_map and scst_conn_dep_map). Also avoid that sparse reports these two variables as unused in the procfs build. git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@5110 d57e44dd-8a1f-0410-8b47-8ef2f437770f --- iscsi-scst/kernel/conn.c | 4 ++-- scst/src/scst_mem.c | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/iscsi-scst/kernel/conn.c b/iscsi-scst/kernel/conn.c index fff43f035..eaf9bc9ea 100644 --- a/iscsi-scst/kernel/conn.c +++ b/iscsi-scst/kernel/conn.c @@ -23,9 +23,9 @@ #include "digest.h" #if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 29) -#ifdef CONFIG_LOCKDEP +#if defined(CONFIG_LOCKDEP) && !defined(CONFIG_SCST_PROC) static struct lock_class_key scst_conn_key; -struct lockdep_map scst_conn_dep_map = +static struct lockdep_map scst_conn_dep_map = STATIC_LOCKDEP_MAP_INIT("iscsi_conn_kref", &scst_conn_key); #endif #endif diff --git a/scst/src/scst_mem.c b/scst/src/scst_mem.c index b14759735..85a28fbca 100644 --- a/scst/src/scst_mem.c +++ b/scst/src/scst_mem.c @@ -42,9 +42,9 @@ #define MAX_PAGES_PER_POOL 50 #if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 29) -#ifdef CONFIG_LOCKDEP +#if defined(CONFIG_LOCKDEP) && !defined(CONFIG_SCST_PROC) static struct lock_class_key scst_pool_key; -struct lockdep_map scst_pool_dep_map = +static struct lockdep_map scst_pool_dep_map = STATIC_LOCKDEP_MAP_INIT("scst_pool_kref", &scst_pool_key); #endif #endif