From 459f213ba162bd13e113d6f92a8fa6c780fd67ed Mon Sep 17 00:00:00 2001 From: Andy Grover Date: Thu, 16 May 2013 10:41:02 -0700 Subject: target: Allocate aptpl_buf inside update_and_write_aptpl() Instead of taking the buffer and length, update_and_write_aptpl() will allocate the buffer as needed, and then free it. Instead, the function takes an 'aptpl' boolean parameter. This enables us to remove memory alloc/frees from struct t10_pr_registration and other spots. There is a slight loss of functionality because each callsite doesn't get its own pr_debug any more, but this info can be cleaned via ftrace if necessary and I think the shorter code is worth it. Signed-off-by: Andy Grover Signed-off-by: Nicholas Bellinger --- include/target/target_core_base.h | 2 -- 1 file changed, 2 deletions(-) (limited to 'include/target') diff --git a/include/target/target_core_base.h b/include/target/target_core_base.h index 5976dc3e4066..8952ee9f7cef 100644 --- a/include/target/target_core_base.h +++ b/include/target/target_core_base.h @@ -339,8 +339,6 @@ struct t10_pr_registration { /* Used during APTPL metadata reading */ #define PR_APTPL_MAX_TPORT_LEN 256 unsigned char pr_tport[PR_APTPL_MAX_TPORT_LEN]; - /* For writing out live meta data */ - unsigned char *pr_aptpl_buf; u16 pr_aptpl_rpti; u16 pr_reg_tpgt; /* Reservation effects all target ports */ -- cgit v1.2.3-59-g8ed1b