Commit a8ac7835 authored by Max Gurtovoy's avatar Max Gurtovoy Committed by Martin K. Petersen

scsi: target: Make iscsit_register_transport() return void

This function always returns 0. We can make it return void to simplify the
code. Also, no caller ever checks the return value of this function.

Link: https://lore.kernel.org/r/20200803150008.83920-1-maxg@mellanox.comSigned-off-by: default avatarMax Gurtovoy <maxg@mellanox.com>
Signed-off-by: default avatarMartin K. Petersen <martin.petersen@oracle.com>
parent bf1a28f9
...@@ -31,7 +31,7 @@ void iscsit_put_transport(struct iscsit_transport *t) ...@@ -31,7 +31,7 @@ void iscsit_put_transport(struct iscsit_transport *t)
module_put(t->owner); module_put(t->owner);
} }
int iscsit_register_transport(struct iscsit_transport *t) void iscsit_register_transport(struct iscsit_transport *t)
{ {
INIT_LIST_HEAD(&t->t_node); INIT_LIST_HEAD(&t->t_node);
...@@ -40,8 +40,6 @@ int iscsit_register_transport(struct iscsit_transport *t) ...@@ -40,8 +40,6 @@ int iscsit_register_transport(struct iscsit_transport *t)
mutex_unlock(&transport_mutex); mutex_unlock(&transport_mutex);
pr_debug("Registered iSCSI transport: %s\n", t->name); pr_debug("Registered iSCSI transport: %s\n", t->name);
return 0;
} }
EXPORT_SYMBOL(iscsit_register_transport); EXPORT_SYMBOL(iscsit_register_transport);
......
...@@ -43,7 +43,7 @@ static inline void *iscsit_priv_cmd(struct iscsi_cmd *cmd) ...@@ -43,7 +43,7 @@ static inline void *iscsit_priv_cmd(struct iscsi_cmd *cmd)
* From iscsi_target_transport.c * From iscsi_target_transport.c
*/ */
extern int iscsit_register_transport(struct iscsit_transport *); extern void iscsit_register_transport(struct iscsit_transport *);
extern void iscsit_unregister_transport(struct iscsit_transport *); extern void iscsit_unregister_transport(struct iscsit_transport *);
extern struct iscsit_transport *iscsit_get_transport(int); extern struct iscsit_transport *iscsit_get_transport(int);
extern void iscsit_put_transport(struct iscsit_transport *); extern void iscsit_put_transport(struct iscsit_transport *);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment