target: Core cleanups from AGrover (round 1)
[GitHub/mt8127/android_kernel_alcatel_ttab.git] / drivers / target / tcm_fc / tfc_conf.c
index fcdbbffe88ccd635c6e692d0631484a424e7f7fc..8c5067c657201be859f40d9e069cafb5f9d71c4a 100644 (file)
@@ -519,13 +519,6 @@ static u32 ft_tpg_get_inst_index(struct se_portal_group *se_tpg)
        return tpg->index;
 }
 
-static u64 ft_pack_lun(unsigned int index)
-{
-       WARN_ON(index >= 256);
-       /* Caller wants this byte-swapped */
-       return cpu_to_le64((index & 0xff) << 8);
-}
-
 static struct target_core_fabric_ops ft_fabric_ops = {
        .get_fabric_name =              ft_get_fabric_name,
        .get_fabric_proto_ident =       fc_get_fabric_proto_ident,
@@ -564,7 +557,6 @@ static struct target_core_fabric_ops ft_fabric_ops = {
        .get_fabric_sense_len =         ft_get_fabric_sense_len,
        .set_fabric_sense_len =         ft_set_fabric_sense_len,
        .is_state_remove =              ft_is_state_remove,
-       .pack_lun =                     ft_pack_lun,
        /*
         * Setup function pointers for generic logic in
         * target_core_fabric_configfs.c
@@ -590,10 +582,10 @@ int ft_register_configfs(void)
         * Register the top level struct config_item_type with TCM core
         */
        fabric = target_fabric_configfs_init(THIS_MODULE, "fc");
-       if (!fabric) {
+       if (IS_ERR(fabric)) {
                printk(KERN_INFO "%s: target_fabric_configfs_init() failed!\n",
                       __func__);
-               return -1;
+               return PTR_ERR(fabric);
        }
        fabric->tf_ops = ft_fabric_ops;