提交 283669d2 编写于 作者: A Andy Grover 提交者: Nicholas Bellinger

target: Cleanup transport_subsystem_check_init

Move static into function body from file scope.

Remove extraneous return statement
Signed-off-by: NAndy Grover <agrover@redhat.com>
Signed-off-by: NNicholas Bellinger <nab@linux-iscsi.org>
上级 593e9091
...@@ -55,8 +55,6 @@ ...@@ -55,8 +55,6 @@
#include "target_core_pr.h" #include "target_core_pr.h"
#include "target_core_ua.h" #include "target_core_ua.h"
static int sub_api_initialized;
static struct workqueue_struct *target_completion_wq; static struct workqueue_struct *target_completion_wq;
static struct kmem_cache *se_sess_cache; static struct kmem_cache *se_sess_cache;
struct kmem_cache *se_ua_cache; struct kmem_cache *se_ua_cache;
...@@ -195,6 +193,7 @@ u32 scsi_get_new_index(scsi_index_t type) ...@@ -195,6 +193,7 @@ u32 scsi_get_new_index(scsi_index_t type)
void transport_subsystem_check_init(void) void transport_subsystem_check_init(void)
{ {
int ret; int ret;
static int sub_api_initialized;
if (sub_api_initialized) if (sub_api_initialized)
return; return;
...@@ -212,7 +211,6 @@ void transport_subsystem_check_init(void) ...@@ -212,7 +211,6 @@ void transport_subsystem_check_init(void)
pr_err("Unable to load target_core_pscsi\n"); pr_err("Unable to load target_core_pscsi\n");
sub_api_initialized = 1; sub_api_initialized = 1;
return;
} }
struct se_session *transport_init_session(void) struct se_session *transport_init_session(void)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册