]> git.kernelconcepts.de Git - karo-tx-linux.git/commitdiff
tcm_usb: remove struct usbg_nacl
authorChristoph Hellwig <hch@lst.de>
Mon, 13 Apr 2015 17:51:10 +0000 (19:51 +0200)
committerNicholas Bellinger <nab@linux-iscsi.org>
Sun, 31 May 2015 05:41:49 +0000 (22:41 -0700)
Except for the embedded struct se_node_acl none of the fields were
ever used.

Signed-off-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Nicholas Bellinger <nab@linux-iscsi.org>
drivers/usb/gadget/legacy/tcm_usb_gadget.c
drivers/usb/gadget/legacy/tcm_usb_gadget.h

index 8b80addc4ce6a5aaae4a330f4e27abd3ea67c5f8..aba80e245e44ca25a0315fbe54bb7989a59b1796 100644 (file)
@@ -1380,22 +1380,14 @@ static char *usbg_parse_pr_out_transport_id(
 
 static struct se_node_acl *usbg_alloc_fabric_acl(struct se_portal_group *se_tpg)
 {
-       struct usbg_nacl *nacl;
-
-       nacl = kzalloc(sizeof(struct usbg_nacl), GFP_KERNEL);
-       if (!nacl)
-               return NULL;
-
-       return &nacl->se_node_acl;
+       return kzalloc(sizeof(struct se_node_acl), GFP_KERNEL);
 }
 
 static void usbg_release_fabric_acl(
        struct se_portal_group *se_tpg,
        struct se_node_acl *se_nacl)
 {
-       struct usbg_nacl *nacl = container_of(se_nacl,
-                       struct usbg_nacl, se_node_acl);
-       kfree(nacl);
+       kfree(se_nacl);
 }
 
 static u32 usbg_tpg_get_inst_index(struct se_portal_group *se_tpg)
@@ -1495,8 +1487,6 @@ static struct se_node_acl *usbg_make_nodeacl(
        const char *name)
 {
        struct se_node_acl *se_nacl, *se_nacl_new;
-       struct usbg_nacl *nacl;
-       u64 wwpn = 0;
        u32 nexus_depth;
        const char *wnn_name;
 
@@ -1518,21 +1508,13 @@ static struct se_node_acl *usbg_make_nodeacl(
                usbg_release_fabric_acl(se_tpg, se_nacl_new);
                return se_nacl;
        }
-       /*
-        * Locate our struct usbg_nacl and set the FC Nport WWPN
-        */
-       nacl = container_of(se_nacl, struct usbg_nacl, se_node_acl);
-       nacl->iport_wwpn = wwpn;
-       snprintf(nacl->iport_name, sizeof(nacl->iport_name), "%s", name);
        return se_nacl;
 }
 
 static void usbg_drop_nodeacl(struct se_node_acl *se_acl)
 {
-       struct usbg_nacl *nacl = container_of(se_acl,
-                               struct usbg_nacl, se_node_acl);
        core_tpg_del_initiator_node_acl(se_acl->se_tpg, se_acl, 1);
-       kfree(nacl);
+       kfree(se_acl);
 }
 
 struct usbg_tpg *the_only_tpg_I_currently_have;
index 8289219925b87dd7b99bedd3f5c2b4205f401862..b254aec521da43e2736649d884ff8d77a5a8c11a 100644 (file)
@@ -25,15 +25,6 @@ enum {
 #define USB_G_ALT_INT_BBB       0
 #define USB_G_ALT_INT_UAS       1
 
-struct usbg_nacl {
-       /* Binary World Wide unique Port Name for SAS Initiator port */
-       u64 iport_wwpn;
-       /* ASCII formatted WWPN for Sas Initiator port */
-       char iport_name[USBG_NAMELEN];
-       /* Returned by usbg_make_nodeacl() */
-       struct se_node_acl se_node_acl;
-};
-
 struct tcm_usbg_nexus {
        struct se_session *tvn_se_sess;
 };