Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

target: Remove unused struct members in se_dev_entry

Some were incremented, but never used anywhere from what I could tell.

Signed-off-by: Andy Grover <agrover@redhat.com>
Signed-off-by: Nicholas Bellinger <nab@linux-iscsi.org>

authored by

Andy Grover and committed by
Nicholas Bellinger
2acd09f3 b8d26b3b

-21
-14
drivers/target/target_core_device.c
··· 68 68 struct se_dev_entry *deve = se_cmd->se_deve; 69 69 70 70 deve->total_cmds++; 71 - deve->total_bytes += se_cmd->data_length; 72 71 73 72 if ((se_cmd->data_direction == DMA_TO_DEVICE) && 74 73 (deve->lun_flags & TRANSPORT_LUNFLAGS_READ_ONLY)) { ··· 83 84 deve->write_bytes += se_cmd->data_length; 84 85 else if (se_cmd->data_direction == DMA_FROM_DEVICE) 85 86 deve->read_bytes += se_cmd->data_length; 86 - 87 - deve->deve_cmds++; 88 87 89 88 se_lun = deve->se_lun; 90 89 se_cmd->se_lun = deve->se_lun; ··· 270 273 nacl->device_list = NULL; 271 274 272 275 return 0; 273 - } 274 - 275 - void core_dec_lacl_count(struct se_node_acl *se_nacl, struct se_cmd *se_cmd) 276 - { 277 - struct se_dev_entry *deve; 278 - unsigned long flags; 279 - 280 - spin_lock_irqsave(&se_nacl->device_list_lock, flags); 281 - deve = se_nacl->device_list[se_cmd->orig_fe_lun]; 282 - deve->deve_cmds--; 283 - spin_unlock_irqrestore(&se_nacl->device_list_lock, flags); 284 276 } 285 277 286 278 void core_update_device_list_access(
-1
drivers/target/target_core_internal.h
··· 8 8 struct se_dev_entry *core_get_se_deve_from_rtpi(struct se_node_acl *, u16); 9 9 int core_free_device_list_for_node(struct se_node_acl *, 10 10 struct se_portal_group *); 11 - void core_dec_lacl_count(struct se_node_acl *, struct se_cmd *); 12 11 void core_update_device_list_access(u32, u32, struct se_node_acl *); 13 12 int core_enable_device_list_for_node(struct se_lun *, struct se_lun_acl *, 14 13 u32, u32, struct se_node_acl *, struct se_portal_group *);
-2
drivers/target/target_core_transport.c
··· 2163 2163 if (wait_for_tasks) 2164 2164 transport_wait_for_tasks(cmd); 2165 2165 2166 - core_dec_lacl_count(cmd->se_sess->se_node_acl, cmd); 2167 - 2168 2166 if (cmd->se_lun) 2169 2167 transport_lun_remove_cmd(cmd); 2170 2168
-4
include/target/target_core_base.h
··· 572 572 bool def_pr_registered; 573 573 /* See transport_lunflags_table */ 574 574 u32 lun_flags; 575 - u32 deve_cmds; 576 575 u32 mapped_lun; 577 - u32 average_bytes; 578 - u32 last_byte_count; 579 576 u32 total_cmds; 580 - u32 total_bytes; 581 577 u64 pr_res_key; 582 578 u64 creation_time; 583 579 u32 attach_count;